/* media/com_mnzl_mf/css/structure.css */

/* ============================================================
   ROOT LAYOUT
   ============================================================ */

html,
body {
    height: 100%;
}

body {
    overflow: hidden;
}

.mf-structure {
    display: flex;
    height: calc(100vh - 56px);
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* ============================================================
   LEFT PANEL
   ============================================================ */

.mf-structure__left {
    flex: 0 0 320px;
    min-width: 220px;
    max-width: 520px;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid var(--mf-border);
}

.mf-structure__left > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.mf-structure__left .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

/* ============================================================
   RIGHT PANEL
   ============================================================ */

.mf-structure__right {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding-left: 20px;
}

#mf-structure-content {
    height: 100%;
    min-height: 0;
}

#mf-structure-content > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#mf-structure-content > .card > .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* ============================================================
   RESIZER
   ============================================================ */

.mf-structure__resizer {
    flex: 0 0 6px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: var(--mf-card-2);
    border-left: 1px solid var(--mf-border);
    border-right: 1px solid var(--mf-border);
}

.mf-structure__resizer:hover {
    background: var(--mf-accent-soft, rgba(26, 188, 156, 0.18));
}

/* ============================================================
   TOOLBAR / SEARCH
   ============================================================ */

.mf-structure__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mf-structure__actions button {
    margin-left: 6px;
}

#mf-structure-search,
#mf-functions-search {
    width: 100%;
}

#mf-structure-search {
    margin-bottom: 6px;
}

/* ============================================================
   TABS
   ============================================================ */

#mf-structure-tabs .nav-link.active {
    box-shadow: 0 -2px 0 var(--mf-accent) inset;
}

#mf-structure-tabs {
    flex: 0 0 auto;
}

#mf-structure-tabs .nav-link {
    cursor: pointer;
    background: var(--mf-card-2) !important;
    color: var(--mf-text-muted) !important;
    border: 1px solid var(--mf-border) !important;
    margin-right: 4px;
    border-radius: 6px 6px 0 0;
}

/* hover */
#mf-structure-tabs .nav-link:hover {
    background: #434a52 !important;
    color: var(--mf-heading) !important;
}

/* АКТИВНА вкладка (ключове) */
#mf-structure-tabs .nav-link.active,
#mf-structure-tabs .nav-link[aria-selected="true"] {
    background: var(--mf-card) !important;   /* світліша */
    color: var(--mf-heading) !important;
    border-bottom: 2px solid var(--mf-accent) !important;
}


#mf-structure-content > .card > .card-body > .mt-3 {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.mf-tab-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--mf-card) !important;
}

.mf-tab-panel[data-panel="people"] {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   ABOUT TAB
   ============================================================ */

.mf-tab-panel[data-panel="about"] {
    overflow: auto;
}

/* ============================================================
   PEOPLE TAB
   ============================================================ */

.mf-structure-people {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

#mf-structure-people-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--mf-bg);
    border: 1px solid var(--mf-border);
    border-top: 0;
}

#mf-structure-people-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #394047;
    color: var(--mf-heading);
    border-bottom: 1px solid var(--mf-border);
}

#mf-structure-people-table-wrap .mf-lv__table {
    width: 100%;
    table-layout: fixed;
    color: var(--mf-text);
}

#mf-structure-people-table-wrap .mf-lv__table tbody tr {
    background: #2f3439;
}

#mf-structure-people-table-wrap .mf-lv__table tbody tr:hover {
    background: #383e44;
}

#mf-structure-people-table-wrap .mf-lv__table th,
#mf-structure-people-table-wrap .mf-lv__table td {
    border-color: var(--mf-border);
    color: var(--mf-text);
}

#mf-structure-people-table-wrap .mf-lv__table tbody tr.selected,
#mf-structure-people-table-wrap .mf-lv__table tbody tr.is-selected {
    background: rgba(26, 188, 156, 0.14) !important;
}

/* ============================================================
   JSTREE FIXES — DEPARTMENTS
   ============================================================ */

#mf-dept-tree .jstree-ocl {
    display: none !important;
    width: 0 !important;
}

#mf-dept-tree .jstree-node,
#mf-dept-tree .jstree-anchor {
    white-space: normal !important;
}

#mf-dept-tree .jstree-anchor {
    height: auto !important;
    line-height: 1.35;
    padding-right: 6px;
}

/* ============================================================
   VISUAL UX — DEPARTMENTS
   ============================================================ */

#mf-dept-tree .jstree-parent > .jstree-anchor {
    font-weight: 600;
}


/* ============================================================
   FUNCTIONS TAB LAYOUT
   ============================================================ */

.mf-tab-panel[data-panel="functions"] {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.mf-structure-functions {
    display: flex;
    gap: 20px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.mf-structure-functions__left,
.mf-structure-functions__right {
    min-height: 0;
    overflow: hidden;
}

.mf-structure-functions__left {
    flex: 0 0 52%;
    min-width: 320px;
}

.mf-structure-functions__right {
    flex: 1 1 auto;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

#mf-structure-functions-tree,
#mf-structure-functions-selected {
    min-height: 220px;
    height: 100%;
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
}

/* ============================================================
   JSTREE FIXES — FUNCTIONS
   ============================================================ */

#mf-structure-functions-tree .jstree-node,
#mf-structure-functions-tree .jstree-anchor {
    white-space: normal !important;
}

#mf-structure-functions-tree .jstree-anchor {
    height: auto !important;
    line-height: 1.35;
    word-break: break-word;
    padding-right: 6px;
}

#mf-structure-functions-tree .jstree-anchor:not(.jstree-clicked):hover {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

/* ============================================================
   FUNCTIONS TREE STATE COLORS
   ============================================================ */

#mf-structure-functions-tree li.mf-func-node--own > a.jstree-anchor,
#mf-structure-functions-tree li.mf-func-node--has-own > a.jstree-anchor {
    color: #4fd18b !important;
    font-weight: 600;
}

#mf-structure-functions-tree li.mf-func-node--inherited > a.jstree-anchor,
#mf-structure-functions-tree li.mf-func-node--has-inherited > a.jstree-anchor {
    color: #ff7474 !important;
    font-weight: 600;
}

#mf-structure-functions-tree li.mf-func-node--has-both > a.jstree-anchor {
    color: #b78cff !important;
    font-weight: 700;
}

/* FUNCTIONS TREE CHECKBOX STATES */

/* частково вибрана гілка */
#mf-structure-functions-tree .jstree-checkbox.jstree-undetermined.mf-own-partial {
    background-image: none !important;
    position: relative;
    border: 1px solid rgba(79, 209, 139, 0.95);
    border-radius: 3px;
}

#mf-structure-functions-tree .jstree-checkbox.jstree-undetermined.mf-own-partial::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(79, 209, 139, 0.95);
}

/* повністю вибрана гілка — лишаємо штатний jsTree чек */
#mf-structure-functions-tree .jstree-checkbox.jstree-checked {
    border-radius: 3px;
}








/* частково вибрані власні функції */
#mf-structure-functions-tree .jstree-checkbox.mf-own-partial {
    outline: 2px solid rgba(79, 209, 139, 0.85);
}

/* частково вибрані успадковані функції */
#mf-structure-functions-tree .jstree-checkbox.mf-inherited-partial {
    outline: 2px solid rgba(255, 116, 116, 0.85);
}

/* змішаний стан */
#mf-structure-functions-tree .jstree-checkbox.mf-both-partial {
    outline: 2px solid rgba(183, 140, 255, 0.85);
}


/* ============================================================
   SELECTED FUNCTIONS LIST
   ============================================================ */

.mf-func-selected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mf-func-selected-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--mf-border);
    border-radius: 6px;
    background: var(--mf-card-2);
    color: var(--mf-text);
}

.mf-func-selected-item__title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    word-break: break-word;
}

.mf-func-selected-item__remove {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #ff7c87;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.mf-func-selected-item__remove:hover {
    color: #ff4d5f;
}

/* ============================================================
   ABOUT FUNCTIONS TREE
   ============================================================ */

.mf-about-func-tree__node {
    margin-bottom: 8px;
}

.mf-about-func-tree__title {
    margin: 6px 0;
    font-weight: 600;
    line-height: 1.45;
}

.mf-about-func-tree__title-text {
    font-weight: 700;
}

.mf-about-func-tree__title-desc,
.mf-about-func-tree__item-desc {
    color: var(--mf-text-muted);
    font-weight: 400;
}

.mf-about-func-tree__item-title {
    font-weight: 500;
    color: var(--mf-text);
}

.mf-about-func-tree__children {
    margin-left: 18px;
}

.mf-about-func-tree__item {
    position: relative;
    margin: 4px 0;
    padding-right: 28px;
    line-height: 1.45;
    border: none;
    background: none;
    border-radius: 0;
    color: var(--mf-text);
}

.mf-about-func-tree__num {
    margin-right: 6px;
    color: inherit;
    font-weight: 700;
}

.mf-about-func-tree__item .mf-func-selected-item__remove {
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    background: transparent;
    color: #ff7c87;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.mf-about-func-tree__item .mf-func-selected-item__remove:hover {
    color: #ff4d5f;
}

/* ============================================================
   MODALS
   ============================================================ */

.mf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.mf-modal.is-open {
    display: block;
}

.mf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .68);
}

.mf-modal__dialog {
    position: relative;
    background: var(--mf-card);
    color: var(--mf-text);
    margin: 5vh auto;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--mf-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.mf-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: var(--mf-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mf-modal__close:hover {
    color: var(--mf-accent);
}

.mf-modal__title {
    margin-bottom: 12px;
    padding-right: 28px;
    font-size: 18px;
    font-weight: 600;
    color: var(--mf-heading);
}

/* PHOTO MODAL */

.mf-photo-dialog {
    width: calc(100vw - 32px);
    max-width: 720px;
    text-align: center;
}

#mfPhotoModalImg {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    margin: 0 auto;
    border-radius: 10px;
}

/* LIST MODAL */

.mf-list-dialog {
    display: flex;
    flex-direction: column;
    width: 720px;
    max-width: 95vw;
    height: 520px;
    max-height: 90vh;
    overflow: hidden;
    resize: both;
}

.mf-list-header {
    flex: 0 0 auto;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mf-border);
}

.mf-list-desc {
    margin-top: 4px;
    color: var(--mf-text-muted);
    font-size: 14px;
}

.mf-list-body {
    flex: 1 1 auto;
    padding-top: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.mf-list-scroll {
    max-width: 100%;
}

.mf-list-table {
    width: 100%;
    table-layout: fixed;
    color: var(--mf-text);
}

.mf-list-table th,
.mf-list-table td {
    vertical-align: top;
    border-color: var(--mf-border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .mf-structure-functions {
        flex-direction: column;
        align-items: stretch;
    }

    .mf-structure-functions__left,
    .mf-structure-functions__right {
        flex: 1 1 auto;
        min-width: 0;
    }

    #mf-structure-functions-tree,
    #mf-structure-functions-selected {
        max-height: none;
        height: auto;
    }
}



/* трохи компактніше фото в таблиці */
#mf-structure-people-table-wrap .mf-contact-photo {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--mf-border);
}

/* щоб ПІБ і списки нормально переносились */
#mf-structure-people-table-wrap .mf-lv__table td:nth-child(3),
#mf-structure-people-table-wrap .mf-lv__table td:nth-child(11) {
    word-break: break-word;
    white-space: normal;
}

/* вертикальне вирівнювання по верху */
#mf-structure-people-table-wrap .mf-lv__table td {
    vertical-align: top;
}

/* ============================================================
   PEOPLE TABLE COLUMN WIDTH TUNING — CLASS BASED
   ============================================================ */

#mf-structure-people-table-wrap .mf-lv__table .mf-col-check {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-num {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    text-align: center;
    white-space: nowrap;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-name {
    width: 170px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-photo {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    text-align: center;
}


#mf-structure-people-table-wrap .mf-lv__table .mf-col-birth {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    text-align: center;
    white-space: nowrap;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-lists {
    width: auto;
    min-width: 300px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-name,
#mf-structure-people-table-wrap .mf-lv__table .mf-col-lists {
    word-break: break-word;
    white-space: normal;
}

/* ============================================================
   PEOPLE TABLE — EXTENDED / GUEST MODE
   ============================================================ */

#mf-structure-people-table-wrap:not(.mf-can-extended) .mf-col-contact,
#mf-structure-people-table-wrap:not(.mf-can-extended) .mf-col-birth {
    display: none;
}

#mf-structure-people-table-wrap.mf-can-extended .mf-col-contact,
#mf-structure-people-table-wrap.mf-can-extended .mf-col-birth {
    display: table-cell;
}

#mf-structure-people-table-wrap .mf-list-badge {
    cursor: pointer;
}

#mf-structure-people-table-wrap .mf-list-badge:hover {
    filter: brightness(1.08);
}

.mf-tab-panel[data-panel="about"] .card-body {
    padding-left: 0;
    padding-right: 0;
}



/* ============================================================
   DARK THEME PATCH — STRUCTURE
   ============================================================ */

/* ---------- TABS ---------- */

#mf-structure-tabs.nav-tabs {
    border-bottom: 1px solid var(--mf-border);
}

#mf-structure-tabs .nav-link {
    background: var(--mf-card-2) !important;
    color: var(--mf-text) !important;
    border: 1px solid var(--mf-border) !important;
    border-bottom-color: var(--mf-border) !important;
}

#mf-structure-tabs .nav-link:hover,
#mf-structure-tabs .nav-link:focus {
    background: #434a52 !important;
    color: var(--mf-heading) !important;
}

#mf-structure-tabs .nav-link.active,
#mf-structure-tabs .nav-item.show .nav-link,
#mf-structure-tabs .nav-link[aria-selected="true"] {
    background: var(--mf-card) !important;
    color: var(--mf-heading) !important;
    border-color: var(--mf-border) !important;
    border-bottom: 2px solid var(--mf-accent) !important;
}

/* ---------- PEOPLE TABLE WRAP ---------- */

#mf-structure-people-table-wrap {
    background: #2f3439 !important;
    border: 1px solid var(--mf-border) !important;
    border-top: 0 !important;
}

/* якщо bootstrap/table styles десь дають білий фон */
#mf-structure-people-table-wrap table,
#mf-structure-people-table-wrap .mf-lv__table,
#mf-structure-people-table-wrap .table {
    background: #2f3439 !important;
    color: var(--mf-text) !important;
}

#mf-structure-people-table-wrap .mf-lv__table thead,
#mf-structure-people-table-wrap .mf-lv__table thead tr,
#mf-structure-people-table-wrap .mf-lv__table thead th {
    background: #394047 !important;
    color: var(--mf-heading) !important;
    border-color: var(--mf-border) !important;
}

#mf-structure-people-table-wrap .mf-lv__table tbody,
#mf-structure-people-table-wrap .mf-lv__table tbody tr,
#mf-structure-people-table-wrap .mf-lv__table tbody td {
    background: #2f3439 !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

#mf-structure-people-table-wrap .mf-lv__table tbody tr:hover,
#mf-structure-people-table-wrap .mf-lv__table tbody tr:hover td {
    background: #383e44 !important;
}

#mf-structure-people-table-wrap .mf-lv__table tbody tr.selected,
#mf-structure-people-table-wrap .mf-lv__table tbody tr.selected td,
#mf-structure-people-table-wrap .mf-lv__table tbody tr.is-selected,
#mf-structure-people-table-wrap .mf-lv__table tbody tr.is-selected td {
    background: rgba(26, 188, 156, 0.14) !important;
}

/* ---------- PEOPLE TABLE TEXT / BADGES ---------- */

#mf-structure-people-table-wrap .mf-lv__table td a {
    color: #7ddfcd !important;
}

#mf-structure-people-table-wrap .mf-lv__table td a:hover {
    color: #a5efe2 !important;
}

#mf-structure-people-table-wrap .mf-list-badge,
#mf-structure-people-table-wrap .badge {
    background: #40474f !important;
    color: #f2f4f5 !important;
    border: 1px solid #515961 !important;
}

/* ---------- FUNCTIONS TREE ACTIVE NODE ---------- */

#mf-structure-functions-tree .jstree-clicked,
#mf-structure-functions-tree .jstree-anchor.jstree-clicked {
    background: var(--mf-accent) !important;
    color: #081311 !important;
    border-radius: 3px;
    box-shadow: none !important;
}

#mf-structure-functions-tree .jstree-anchor.jstree-clicked *,
#mf-structure-functions-tree .jstree-clicked * {
    color: #081311 !important;
}

#mf-structure-functions-tree .jstree-hovered {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--mf-heading) !important;
    border-radius: 3px;
}

/* щоб кольори own/inherited не вбивали читабельність при active */
#mf-structure-functions-tree li.mf-func-node--own > a.jstree-anchor.jstree-clicked,
#mf-structure-functions-tree li.mf-func-node--has-own > a.jstree-anchor.jstree-clicked,
#mf-structure-functions-tree li.mf-func-node--inherited > a.jstree-anchor.jstree-clicked,
#mf-structure-functions-tree li.mf-func-node--has-inherited > a.jstree-anchor.jstree-clicked,
#mf-structure-functions-tree li.mf-func-node--has-both > a.jstree-anchor.jstree-clicked {
    color: #081311 !important;
    font-weight: 700;
}





/* ---------- ABOUT TEXT FIX ---------- */

.mf-tab-panel[data-panel="about"] {
    color: var(--mf-text);
}

.mf-tab-panel[data-panel="about"] * {
    color: inherit;
}

/* конкретно для цього кейсу */
.mf-tab-panel[data-panel="about"] .text-muted {
    color: var(--mf-text-muted) !important;
}

/* fallback */
.mf-tab-panel[data-panel="about"] p,
.mf-tab-panel[data-panel="about"] div {
    color: var(--mf-text) !important;
}


/* ---------- DEPARTMENT TREE: CLEAN STATES ---------- */

/* базовий вигляд вузлів */
#mf-dept-tree .jstree-anchor {
    height: auto !important;
    line-height: 1.35;
    padding-right: 6px;
    background: transparent !important;
    color: var(--mf-text) !important;
    border-radius: 3px;
}

/* hover повністю вимкнений */
#mf-dept-tree .jstree-anchor:hover,
#mf-dept-tree .jstree-hovered {
    background: transparent !important;
    color: var(--mf-text) !important;
}


/* ---------- DEPARTMENT TREE: CLEAN STATES ---------- */

#mf-dept-tree .jstree-anchor {
    height: auto !important;
    line-height: 1.35;
    padding-right: 6px;
    background: transparent !important;
    color: var(--mf-text) !important;
    border-radius: 3px;
}

/* hover без затирання іконок */
#mf-dept-tree .jstree-anchor:hover,
#mf-dept-tree .jstree-hovered {
    background: transparent !important;
    color: var(--mf-text) !important;
}

/* фіксація іконок */
#mf-dept-tree .jstree-themeicon,
#mf-dept-tree .jstree-icon {
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* тільки активний вузол має підсвітку */
#mf-dept-tree .jstree-clicked,
#mf-dept-tree .jstree-anchor.jstree-clicked {
    background: #9fdcff !important;
    color: #081311 !important;
    border-radius: 3px;
}

#mf-dept-tree .jstree-clicked *,
#mf-dept-tree .jstree-anchor.jstree-clicked * {
    color: #081311 !important;
}

/* no wholerow paint */
#mf-dept-tree .jstree-wholerow-hovered,
#mf-dept-tree .jstree-wholerow-clicked {
    background: transparent !important;
}



/* structure: dept tree uses its own active highlight, no wholerow paint */
#mf-dept-tree .jstree-wholerow-hovered {
    background: transparent !important;
}

#mf-dept-tree .jstree-wholerow-clicked {
    background: transparent !important;
}


/* контейнер вкладок */
#mf-structure-tabs {
    background: var(--mf-card) !important;
    padding: 8px 8px 0;
}



/* ============================================================
   DARK THEME PATCH — LIST MODAL
   ============================================================ */

/* сама модалка */
.mf-list-dialog,
.mf-list-dialog .mf-modal__dialog {
    background: var(--mf-card) !important;
    color: var(--mf-text) !important;
    border: 1px solid var(--mf-border) !important;
}

/* верх модалки */
.mf-list-header {
    background: var(--mf-card) !important;
    color: var(--mf-heading) !important;
    border-bottom: 1px solid var(--mf-border) !important;
}

.mf-list-desc {
    color: var(--mf-text-muted) !important;
}

/* тіло */
.mf-list-body,
.mf-list-scroll {
    background: var(--mf-card) !important;
    color: var(--mf-text) !important;
}

/* таблиця повністю */
.mf-list-table,
.mf-list-table.table {
    background: #2f3439 !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

/* шапка */
.mf-list-table thead,
.mf-list-table thead tr,
.mf-list-table thead th {
    background: #394047 !important;
    color: var(--mf-heading) !important;
    border-color: var(--mf-border) !important;
}

/* рядки */
.mf-list-table tbody,
.mf-list-table tbody tr,
.mf-list-table tbody td {
    background: #2f3439 !important;
    color: var(--mf-text) !important;
    border-color: var(--mf-border) !important;
}

/* hover */
.mf-list-table tbody tr:hover,
.mf-list-table tbody tr:hover td {
    background: #383e44 !important;
}

/* selected row */
.mf-list-table tbody tr.selected,
.mf-list-table tbody tr.selected td,
.mf-list-table tbody tr.is-selected,
.mf-list-table tbody tr.is-selected td {
    background: rgba(26, 188, 156, 0.14) !important;
}

/* посилання */
.mf-list-table a {
    color: #7ddfcd !important;
}

.mf-list-table a:hover {
    color: #a5efe2 !important;
}

/* СПИСКИ*/

/* badge/мітки всередині таблиці */
.mf-list-table .badge,
.mf-list-table .mf-list-badge {
    background: #40474f !important;
    color: #f2f4f5 !important;
    border: 1px solid #515961 !important;
}

/* checkbox у темній темі */
.mf-list-table input[type="checkbox"] {
    accent-color: var(--mf-accent);
}

/* якщо bootstrap впирається білим фоном */
.mf-list-table.table-striped > tbody > tr:nth-of-type(odd) > *,
.mf-list-table.table-hover > tbody > tr:hover > *,
.mf-list-table.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}



#mf-dept-tree .jstree-leaf > .jstree-ocl {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#mf-dept-tree .jstree-leaf > .jstree-anchor {
    padding-left: 0 !important;
}


/* ============================================================
   JSTREE: REMOVE TREE LINES (VERTICAL / CONNECTORS)
   ============================================================ */

/* прибрати всі лінії дерева */
#mf-dept-tree .jstree-node,
#mf-dept-tree .jstree-container-ul,
#mf-dept-tree ul {
    background: none !important;
}

/* прибрати вертикальні/горизонтальні конектори */
#mf-dept-tree .jstree-node::before,
#mf-dept-tree .jstree-node::after {
    display: none !important;
}

/* прибрати службові елементи (якщо ще щось лишиться) */
#mf-dept-tree .jstree-ocl {
    display: none !important;
    width: 0 !important;
}

#mf-dept-tree .jstree-container-ul,
#mf-dept-tree .jstree-node,
#mf-dept-tree ul {
    background: none !important;
}

#mf-dept-tree .jstree-ocl {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}



/* 🔥 ВБИТИ ВСІ ЛІНІЇ jsTree НАХРЕН */
#mf-dept-tree .jstree-node {
    background-image: none !important;
}

#mf-dept-tree .jstree-container-ul {
    background-image: none !important;
}

/* якщо тема підтягує спрайт */
#mf-dept-tree .jstree-icon,
#mf-dept-tree .jstree-themeicon {
    background-image: none !important;
}


/* ================= COLLEGIAL BODIES ================= */

.mf-bodies {
    display: flex;
    gap: 12px;
    height: 100%;
    min-height: 0;
}

.mf-bodies__left,
.mf-bodies__right {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* картки всередині */
.mf-bodies__left .card,
.mf-bodies__right .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* ОЦЕ КЛЮЧ */
.mf-bodies__left .card-body,
.mf-bodies__right .card-body {
    overflow: auto;
    min-height: 0;
}



/* ============================================================
   MOBILE LAYOUT — STRUCTURE
   ============================================================ */

@media (max-width: 768px) {
    html,
    body {
        height: auto;
        overflow: auto;
    }

    body {
        overflow-x: hidden;
    }

    .mf-structure {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .mf-structure__left,
    .mf-structure__right {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
    }

    .mf-structure__left {
        border-right: 0;
        border-bottom: 1px solid var(--mf-border);
    }

    .mf-structure__right {
        padding-left: 0;
        padding-top: 12px;
        overflow: visible;
    }

    .mf-structure__resizer {
        display: none !important;
    }

    .mf-structure__left > .card,
    #mf-structure-content,
    #mf-structure-content > .card,
    #mf-structure-content > .card > .card-body {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .mf-structure__left .card-body,
    .mf-tab-panel,
    .mf-tab-panel[data-panel="about"],
    .mf-tab-panel[data-panel="people"],
    .mf-tab-panel[data-panel="functions"] {
        overflow: visible;
        height: auto;
    }

    /* toolbar у стовпчик */
    .mf-structure__toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .mf-structure__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mf-structure__actions button {
        margin-left: 0;
    }

    /* вкладки щоб не ламалися */
    #mf-structure-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 0 0;
    }

    #mf-structure-tabs .nav-link {
        margin-right: 0;
    }

    /* people table — даємо горизонтальний скрол, а не ламаємо все */
    #mf-structure-people-table-wrap {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #mf-structure-people-table-wrap .mf-lv__table {
        min-width: 900px;
        table-layout: fixed;
    }

    /* functions tab теж у стовпчик */
    .mf-structure-functions {
        flex-direction: column;
        gap: 12px;
        height: auto;
        overflow: visible;
    }

    .mf-structure-functions__left,
    .mf-structure-functions__right {
        min-width: 0;
        width: 100%;
        overflow: visible;
    }

    #mf-structure-functions-tree,
    #mf-structure-functions-selected {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    /* модалка списку на телефоні */
    .mf-list-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        height: auto;
        max-height: 92dvh;
        margin: 4vh auto;
        resize: none;
    }
}


.mf-tab-panel[data-panel="about"] .row.g-2.mb-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* всі верхні поля */
.mf-tab-panel[data-panel="about"] .row.g-2.mb-2 > .col-md-3 {
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
    max-width: 220px;
}

/* ЄДРПОУ — дуже вузьке */
#dept-edrpou,
.mf-tab-panel[data-panel="about"] strong:has(+ span) {
    max-width: 120px;
}

/* Телефон */
#dept-phone {
    max-width: 150px;
}

/* IP телефон */
#dept-phone-ip {
    max-width: 120px;
}

/* Email ширший */
#dept-email {
    min-width: 260px;
    max-width: 420px;
    width: 100%;
}

#dept-edrpou {
    max-width: 110px;
}

#dept-phone {
    max-width: 140px;
}

#dept-phone-ip {
    max-width: 100px;
}


#mf-functions-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.mf-functions-busy-box {
    min-width: 280px;
    padding: 18px 22px;
    border-radius: 10px;
    background: var(--mf-card);
    color: var(--mf-heading);
    border: 1px solid var(--mf-border);
    text-align: center;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
}

.mf-functions-busy-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: var(--mf-accent);
    border-radius: 50%;
    animation: mf-spin .8s linear infinite;
}

@keyframes mf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* повністю вибрана гілка функцій */
#mf-structure-functions-tree .jstree-checkbox.mf-own-full {
    background-image: none !important;
    position: relative;
    border: 1px solid rgba(79, 209, 139, 0.95);
    border-radius: 3px;
}

#mf-structure-functions-tree .jstree-checkbox.mf-own-full::after {
    content: "✓";
    position: absolute;
    left: 3px;
    top: -3px;
    font-size: 16px;
    line-height: 18px;
    color: rgba(79, 209, 139, 1);
    font-weight: 700;
}


.mf-col-contact {
    text-align: center;
    width: 140px;
}

.mf-contact-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.mf-contact-phone {
    font-size: 13px;
}

.mf-contact-meta {
    margin-top: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.mf-contact-voip {
    color: #2bb673;
    font-weight: 600;
    text-decoration: none;
}

.mf-contact-voip:hover {
    text-decoration: underline;
}

.mf-contact-tg-icon {
    font-size: 12px;
    opacity: 0.8;
}


.mf-contact-tg-icon svg {
    display: block;
}

/* ===== НОВА СІТКА КОЛОНОК ===== */

#mf-structure-people-table-wrap .mf-lv__table .mf-col-check {
    width: 28px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-num {
    width: 46px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-name {
    width: 140px; /* було 170 — звужаємо */
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-photo {
    width: 64px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-dept-role {
    width: auto;       /* 🔥 головне */
    min-width: 320px;  /* 🔥 даємо дихати */
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-contact {
    width: 120px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-birth {
    width: 90px;
}

#mf-structure-people-table-wrap .mf-lv__table .mf-col-lists {
    width: auto;
    min-width: 220px;
}

/* підрозділ — трохи менший і приглушений */
.mf-dept {
    font-size: 12px;
    color: var(--mf-text-muted);
    line-height: 1.35;
}

/* посада — основний акцент */
.mf-role {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mf-text);
    margin-top: 2px;
}

.mf-dept {
    opacity: 0.85;
}

.mf-role {
    letter-spacing: 0.2px;
}

/* ============================================================
   J5/J6 modal hard-dark override
   ============================================================ */
#mfListModal.mf-modal,
#mfPersonCardROModal.mf-modal,
#mfPersonCardRWModal.mf-modal {
    color: #e6edf3;
}

#mfListModal .mf-modal__backdrop,
#mfPersonCardROModal .mf-modal__backdrop,
#mfPersonCardRWModal .mf-modal__backdrop {
    background: rgba(0, 0, 0, .82) !important;
}

#mfListModal .mf-modal__dialog,
#mfPersonCardROModal .mf-modal__dialog,
#mfPersonCardRWModal .mf-modal__dialog {
    background: #11161d !important;
    color: #e6edf3 !important;
    border: 1px solid #313b48 !important;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .72) !important;
}

#mfListModal .mf-modal__head,
#mfListModal .mf-modal__body,
#mfListModal .mf-modal__footer,
#mfPersonCardROModal .mf-modal__head,
#mfPersonCardROModal .mf-modal__body,
#mfPersonCardROModal .mf-modal__footer,
#mfPersonCardRWModal .mf-modal__head,
#mfPersonCardRWModal .mf-modal__body,
#mfPersonCardRWModal .mf-modal__footer {
    background: #11161d !important;
    color: #e6edf3 !important;
}

#mfListModal table,
#mfListModal .table,
#mfPersonCardROModal table,
#mfPersonCardROModal .table,
#mfPersonCardRWModal table,
#mfPersonCardRWModal .table {
    --bs-table-bg: #18202a;
    --bs-table-color: #e6edf3;
    --bs-table-border-color: #3a4552;
    background-color: #18202a !important;
    color: #e6edf3 !important;
}

#mfListModal th,
#mfListModal td,
#mfPersonCardROModal th,
#mfPersonCardROModal td,
#mfPersonCardRWModal th,
#mfPersonCardRWModal td {
    background-color: #18202a !important;
    color: #e6edf3 !important;
    border-color: #3a4552 !important;
}

#mfPersonCardROModal .btn-close,
#mfPersonCardRWModal .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: .85;
}

/* ============================================================
   STRUCTURE CUSTOM MODALS — SINGLE SCROLL STANDARD
   Do not stack .mf-list-body and .mf-list-scroll vertical scrolls.
   ============================================================ */
.mf-modal .mf-modal__dialog,
.mf-list-dialog{
    max-height: calc(100dvh - 48px);
    overflow: hidden;
}

.mf-modal__head,
.mf-modal__footer,
.mf-list-header{
    flex: 0 0 auto;
}

.mf-modal__body,
.mf-list-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
}

.mf-list-scroll{
    max-height: none !important;
    overflow: visible !important;
}

/* ============================================================
   1.0.63 — GITHUB DARK UI STANDARD FOR STRUCTURE
   ============================================================ */

.mf-structure {
    --mf-gh-bg: #0d1117;
    --mf-gh-panel: #161b22;
    --mf-gh-panel-subtle: #21262d;
    --mf-gh-border: #30363d;
    --mf-gh-border-muted: #21262d;
    --mf-gh-text: #e6edf3;
    --mf-gh-muted: #8b949e;
    --mf-gh-link: #58a6ff;
    --mf-gh-link-hover: #79c0ff;
    --mf-gh-blue-soft: rgba(47, 129, 247, .14);
    --mf-gh-green: #3fb950;
    --mf-gh-orange: #f78166;

    box-sizing: border-box;
    gap: 0;
    padding: 12px 16px 16px;
    background: var(--mf-gh-bg);
    color: var(--mf-gh-text);
}

.mf-structure *,
.mf-structure *::before,
.mf-structure *::after {
    box-sizing: border-box;
}

.mf-structure__left {
    border-right: 0;
}

.mf-structure__right {
    padding-left: 12px;
}

.mf-structure__resizer {
    position: relative;
    flex-basis: 6px;
    width: 6px;
    border: 0;
    background: transparent;
}

.mf-structure__resizer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    border-radius: 2px;
    background: var(--mf-gh-border);
    transition: background-color .15s ease, width .15s ease;
}

.mf-structure__resizer:hover {
    background: transparent;
}

.mf-structure__resizer:hover::after {
    left: 1px;
    width: 4px;
    background: #1f6feb;
}

.mf-structure .mf-structure-panel,
.mf-structure #mf-structure-content > .mf-structure-panel {
    border: 1px solid var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-panel) !important;
    box-shadow: none;
    overflow: hidden;
}

.mf-structure .mf-structure-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text);
}

.mf-structure .mf-structure-panel__header--content {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.mf-structure .mf-structure-panel__title {
    color: var(--mf-gh-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.mf-structure .mf-structure-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.mf-structure .mf-structure-panel__actions .btn,
.mf-structure .mf-structure-edit-toggle {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-panel-subtle) !important;
    color: var(--mf-gh-text) !important;
    box-shadow: 0 1px 0 rgba(27, 31, 36, .1), inset 0 1px 0 rgba(255,255,255,.03);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    text-decoration: none !important;
}

.mf-structure .mf-structure-panel__actions .btn:hover,
.mf-structure .mf-structure-edit-toggle:hover {
    border-color: #8b949e !important;
    background: #30363d !important;
    color: #ffffff !important;
}

.mf-structure .mf-structure-edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.mf-structure .mf-structure-edit-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.mf-structure .mf-structure-edit-toggle:has(input:checked) {
    border-color: rgba(63, 185, 80, .55) !important;
    background: rgba(46, 160, 67, .15) !important;
    color: #7ee787 !important;
}

.mf-structure .mf-structure-edit-warning {
    margin: 8px 10px 0;
    padding: 7px 10px;
    border: 1px solid rgba(210, 153, 34, .4);
    border-radius: 6px;
    background: rgba(187, 128, 9, .12);
    color: #e3b341;
    font-size: 12px;
}

.mf-structure .mf-structure-search {
    padding: 10px;
    border-bottom: 1px solid var(--mf-gh-border);
    background: var(--mf-gh-panel);
}

.mf-structure #mf-structure-search,
.mf-structure #mf-functions-search {
    min-height: 32px;
    margin: 0;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-bg);
    color: var(--mf-gh-text);
    box-shadow: inset 0 1px 0 rgba(1, 4, 9, .2);
}

.mf-structure #mf-structure-search::placeholder,
.mf-structure #mf-functions-search::placeholder {
    color: var(--mf-gh-muted);
}

.mf-structure #mf-structure-search:focus,
.mf-structure #mf-functions-search:focus {
    border-color: #1f6feb !important;
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .25) !important;
}

.mf-structure .mf-structure-panel--tree > .card-body {
    padding: 8px 6px 12px 8px;
    background: var(--mf-gh-panel);
}

.mf-structure .mf-structure-panel--content > .card-body {
    padding: 0;
    background: var(--mf-gh-panel);
}

.mf-structure .mf-structure-dept-caption {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid var(--mf-gh-border);
    border-radius: 999px;
    background: var(--mf-gh-panel-subtle);
    color: var(--mf-gh-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
}

/* GitHub underline tabs */
.mf-structure #mf-structure-tabs {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    min-height: 45px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid var(--mf-gh-border);
    background: var(--mf-gh-panel);
}

.mf-structure #mf-structure-tabs .nav-item {
    margin: 0;
}

.mf-structure #mf-structure-tabs .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px 9px;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 6px 6px 0 0;
    background: transparent !important;
    color: var(--mf-gh-muted) !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
}

.mf-structure #mf-structure-tabs .nav-link:hover {
    background: var(--mf-gh-panel-subtle) !important;
    color: var(--mf-gh-text) !important;
}

.mf-structure #mf-structure-tabs .nav-link.active,
.mf-structure #mf-structure-tabs .nav-link[aria-selected="true"] {
    border-bottom-color: var(--mf-gh-orange) !important;
    background: transparent !important;
    color: var(--mf-gh-text) !important;
    font-weight: 600;
}

.mf-structure #mf-structure-content > .card > .card-body > .mt-3 {
    margin-top: 0 !important;
    padding: 12px;
    background: var(--mf-gh-bg);
}

.mf-structure .mf-tab-panel {
    background: transparent !important;
}

.mf-structure .mf-tab-panel[data-panel="about"] {
    padding: 0 2px 12px;
}

/* jsTree in GitHub style */
.mf-structure #mf-dept-tree .jstree-anchor {
    display: inline-flex;
    align-items: flex-start;
    width: calc(100% - 4px);
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--mf-gh-text) !important;
    line-height: 18px;
}

.mf-structure #mf-dept-tree .jstree-anchor:not(.jstree-clicked):hover {
    border-color: transparent;
    background: var(--mf-gh-panel-subtle) !important;
    color: #ffffff !important;
}

.mf-structure #mf-dept-tree .jstree-clicked {
    border-color: rgba(47, 129, 247, .35) !important;
    background: var(--mf-gh-blue-soft) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.mf-structure #mf-dept-tree .jstree-clicked * {
    color: inherit !important;
}

/* Department contact card */
.mf-dept-contact-card {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #161b22;
}

.mf-dept-contact-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.mf-dept-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.mf-dept-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #0d1117;
    transition: border-color .15s ease, background-color .15s ease;
}

.mf-dept-meta-item:hover {
    border-color: #484f58;
    background: #111720;
}

.mf-dept-meta-item--wide {
    grid-column: 1 / -1;
}

.mf-dept-meta-item--edit {
    cursor: text;
}

.mf-dept-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(47, 129, 247, .14);
    color: #58a6ff;
}

.mf-dept-meta-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.mf-dept-meta-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.mf-dept-meta-label {
    margin-bottom: 2px;
    color: #8b949e;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mf-dept-meta-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #e6edf3;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none !important;
}

.mf-dept-meta-item a.mf-dept-meta-value {
    color: #58a6ff;
}

.mf-dept-meta-item a.mf-dept-meta-value:hover {
    color: #79c0ff;
    text-decoration: underline !important;
}

.mf-dept-meta-value--mono,
.mf-dept-meta-input--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: .02em;
}

.mf-dept-meta-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid #30363d !important;
    border-radius: 6px;
    background: #161b22 !important;
    color: #e6edf3 !important;
    font-size: 13px;
}

.mf-dept-meta-input:focus {
    border-color: #1f6feb !important;
    background: #0d1117 !important;
    color: #e6edf3 !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .25) !important;
}

.mf-dept-section-title {
    color: #e6edf3;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}

.mf-dept-section-hint {
    margin-top: 1px;
    color: #8b949e;
    font-size: 11px;
    line-height: 16px;
}

.mf-dept-save-status {
    min-width: 90px;
    color: #3fb950;
    font-size: 12px;
    text-align: right;
}

.mf-dept-info-section,
.mf-about-functions-wrap {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #161b22;
}

.mf-dept-info-section .mf-dept-section-title {
    margin-bottom: 8px;
}

.mf-dept-info-text {
    color: #e6edf3;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    text-align: left;
    overflow-wrap: anywhere;
}

.mf-dept-info-text a {
    color: #58a6ff;
}

.mf-dept-info-section textarea {
    min-height: 220px;
    border-color: #30363d !important;
    background: #0d1117 !important;
    color: #e6edf3 !important;
    line-height: 1.55;
}

.mf-dept-info-section textarea:focus {
    border-color: #1f6feb !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .25) !important;
}

.mf-structure-loading {
    color: #8b949e;
    font-size: 13px;
}

/* Nested cards in other tabs use the same restrained GitHub surface */
.mf-structure .mf-tab-panel .card {
    border: 1px solid var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-panel) !important;
    box-shadow: none;
}

.mf-structure .mf-tab-panel .card > .card-header {
    min-height: 40px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    background: var(--mf-gh-panel-subtle) !important;
    color: var(--mf-gh-text);
    font-size: 13px;
    font-weight: 600;
}

.mf-structure .mf-tab-panel .card > .card-body {
    background: var(--mf-gh-panel) !important;
}

@media (max-width: 1100px) {
    .mf-structure .mf-structure-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mf-structure .mf-structure-panel__actions {
        justify-content: flex-start;
    }

    .mf-dept-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .mf-structure {
        padding: 8px;
    }

    .mf-structure__right {
        padding-top: 8px;
    }

    .mf-structure #mf-structure-tabs {
        padding: 6px 8px 0;
    }

    .mf-structure #mf-structure-tabs .nav-link {
        min-height: 36px;
        padding: 7px 9px 6px;
    }

    .mf-structure #mf-structure-content > .card > .card-body > .mt-3 {
        padding: 8px;
    }

    .mf-dept-meta-grid {
        grid-template-columns: 1fr;
    }

    .mf-dept-meta-item--wide {
        grid-column: auto;
    }

    .mf-dept-contact-card,
    .mf-dept-info-section,
    .mf-about-functions-wrap {
        padding: 10px;
    }
}

/* People tab: same GitHub toolbar and table language */
.mf-structure .mf-structure-people > .d-flex:first-child {
    margin: 0 0 8px !important;
    padding: 8px 10px;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-panel);
}

.mf-structure .mf-structure-people label,
.mf-structure #mf-structure-bodies label {
    color: var(--mf-gh-text);
    font-size: 12px;
}

.mf-structure input[type="checkbox"] {
    accent-color: #1f6feb;
}

.mf-structure #mf-structure-people-search,
.mf-structure #mf-structure-people-list-filter {
    min-height: 30px;
    border: 1px solid var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
}

.mf-structure #mf-structure-people-search {
    width: 260px !important;
}

.mf-structure #mf-structure-people-search:focus,
.mf-structure #mf-structure-people-list-filter:focus {
    border-color: #1f6feb !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .25) !important;
}

.mf-structure #mf-structure-people-search-btn,
.mf-structure #mf-structure-people-send-btn,
.mf-structure #mf-bodies-send-btn {
    min-height: 30px;
    border-radius: 6px;
}

.mf-structure #mf-structure-people-table-wrap {
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-bg);
}

.mf-structure #mf-structure-people-table-wrap .mf-lv__table {
    --bs-table-bg: var(--mf-gh-bg);
    --bs-table-striped-bg: #111720;
    --bs-table-hover-bg: var(--mf-gh-panel);
    --bs-table-color: var(--mf-gh-text);
    --bs-table-border-color: var(--mf-gh-border);
    margin: 0;
    color: var(--mf-gh-text);
}

.mf-structure #mf-structure-people-table-wrap thead th {
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text) !important;
    border-color: var(--mf-gh-border) !important;
    font-size: 12px;
    font-weight: 600;
}

.mf-structure #mf-structure-people-table-wrap tbody tr,
.mf-structure #mf-structure-people-table-wrap tbody td {
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    border-color: var(--mf-gh-border) !important;
}

.mf-structure #mf-structure-people-table-wrap tbody tr:nth-child(even) td {
    background: #111720 !important;
}

.mf-structure #mf-structure-people-table-wrap tbody tr:hover td {
    background: var(--mf-gh-panel) !important;
}

.mf-structure #mf-structure-people-selected-count {
    color: var(--mf-gh-muted) !important;
}

.mf-structure .mf-list-badge {
    display: inline-flex;
    align-items: center;
    margin: 2px 3px 2px 0;
    padding: 3px 7px;
    border: 1px solid #3d444d;
    border-radius: 999px;
    background: #21262d !important;
    color: #e6edf3 !important;
    font-size: 11px;
    font-weight: 500;
}

.mf-structure .mf-list-badge:hover {
    border-color: #58a6ff;
    color: #79c0ff !important;
}

.mf-structure .mf-contact-voip,
.mf-structure .mf-contact-name {
    color: var(--mf-gh-link) !important;
}

/* About/functions tree typography */
.mf-structure .mf-about-func-tree {
    color: var(--mf-gh-text);
}

.mf-structure .mf-about-func-tree__num {
    color: var(--mf-gh-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mf-structure .mf-about-func-tree__item-title,
.mf-structure .mf-about-func-tree__node-title {
    color: var(--mf-gh-text);
}

.mf-structure .mf-about-func-tree__item-desc,
.mf-structure .mf-about-func-tree__node-desc {
    color: #b1bac4;
}

/* Left panel always uses a compact two-line header at its narrow width. */
.mf-structure .mf-structure-panel--tree > .mf-structure-panel__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
}

.mf-structure .mf-structure-panel--tree .mf-structure-panel__actions {
    width: 100%;
    justify-content: flex-start;
}

/* ============================================================
   1.0.64 — STRUCTURE TREE + META GRID REFINEMENTS
   ============================================================ */

/* Контактні картки: email ширше, адреса окремим рядом */
.mf-dept-meta-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.mf-dept-meta-item {
    grid-column: span 2;
}

.mf-dept-meta-item--email {
    grid-column: span 4;
}

.mf-dept-meta-item--wide {
    grid-column: 1 / -1;
}

/* Ліве дерево: більш виразна ієрархія */
.mf-structure-panel--tree .card-body {
    padding-top: 10px;
}

#mf-dept-tree {
    padding: 2px 2px 12px;
}

#mf-dept-tree .jstree-container-ul,
#mf-dept-tree .jstree-children {
    margin: 0;
    padding-left: 0;
}

#mf-dept-tree > .jstree-container-ul > .jstree-node {
    margin-bottom: 6px;
}

#mf-dept-tree .jstree-children {
    margin-top: 6px;
    margin-left: 14px;
    padding-left: 18px;
    border-left: 1px dashed rgba(139, 148, 158, .35);
}

#mf-dept-tree .jstree-node {
    position: relative;
    margin: 0;
}

#mf-dept-tree .jstree-children > .jstree-node {
    margin-bottom: 4px;
}

#mf-dept-tree .jstree-children > .jstree-node::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -18px;
    width: 12px;
    border-top: 1px dashed rgba(139, 148, 158, .35);
}

#mf-dept-tree .jstree-anchor {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    width: calc(100% - 2px);
    min-height: 38px;
    padding: 8px 10px !important;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent !important;
    color: #e6edf3 !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

#mf-dept-tree .jstree-anchor:hover,
#mf-dept-tree .jstree-hovered {
    background: rgba(110, 118, 129, .12) !important;
    border-color: rgba(110, 118, 129, .28) !important;
    color: #f0f6fc !important;
}

#mf-dept-tree .jstree-anchor > .jstree-themeicon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px !important;
    margin: 2px 0 0 !important;
    border-radius: 999px;
    background: rgba(63, 185, 80, .18) !important;
    position: relative;
}

#mf-dept-tree .jstree-anchor > .jstree-themeicon::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #3fb950;
}

#mf-dept-tree > .jstree-container-ul > .jstree-node > .jstree-anchor > .jstree-themeicon {
    background: rgba(88, 166, 255, .18) !important;
}

#mf-dept-tree > .jstree-container-ul > .jstree-node > .jstree-anchor > .jstree-themeicon::after {
    width: 7px;
    height: 7px;
    background: #58a6ff;
}

#mf-dept-tree .jstree-clicked,
#mf-dept-tree .jstree-anchor.jstree-clicked {
    background: rgba(31, 111, 235, .18) !important;
    border-color: rgba(47, 129, 247, .36) !important;
    color: #ffffff !important;
}

#mf-dept-tree .jstree-clicked *,
#mf-dept-tree .jstree-anchor.jstree-clicked * {
    color: inherit !important;
}

#mf-dept-tree .jstree-wholerow-hovered,
#mf-dept-tree .jstree-wholerow-clicked {
    background: transparent !important;
}

@media (max-width: 1100px) {
    .mf-dept-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mf-dept-meta-item,
    .mf-dept-meta-item--email {
        grid-column: span 1;
    }

    .mf-dept-meta-item--wide,
    .mf-dept-meta-item--email {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    #mf-dept-tree .jstree-children {
        margin-left: 10px;
        padding-left: 14px;
    }

    #mf-dept-tree .jstree-children > .jstree-node::before {
        left: -14px;
        width: 10px;
    }
}

/* ============================================================
   1.0.67 — CLEAN JSTREE HIERARCHY
   ============================================================ */

/* Дерево показує ієрархію тільки відступами. Жодних кульок і ліній. */
#mf-dept-tree,
#mf-dept-tree ul,
#mf-dept-tree li,
#mf-dept-tree .jstree-container-ul,
#mf-dept-tree .jstree-children,
#mf-dept-tree .jstree-node {
    background: none !important;
    background-image: none !important;
}

#mf-dept-tree .jstree-container-ul,
#mf-dept-tree .jstree-children {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Кожен наступний рівень має однаковий крок відступу. */
#mf-dept-tree .jstree-children {
    padding-left: 24px !important;
}

#mf-dept-tree .jstree-node {
    position: relative;
    margin: 2px 0 !important;
    min-height: 34px;
}

#mf-dept-tree .jstree-node::before,
#mf-dept-tree .jstree-node::after,
#mf-dept-tree .jstree-children > .jstree-node::before,
#mf-dept-tree .jstree-children > .jstree-node::after {
    display: none !important;
    content: none !important;
}

/* Вимикаємо всі штатні/штучні іконки jsTree — саме вони дали кульки. */
#mf-dept-tree .jstree-themeicon,
#mf-dept-tree .jstree-anchor > .jstree-themeicon,
#mf-dept-tree .jstree-anchor > .jstree-themeicon::before,
#mf-dept-tree .jstree-anchor > .jstree-themeicon::after {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    content: none !important;
    background: none !important;
    background-image: none !important;
}

/* Шеврон займає однакове місце у батьківських і листових вузлів. */
#mf-dept-tree .jstree-node > .jstree-ocl {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: 8px 4px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px;
    color: #8b949e;
    background: transparent !important;
    background-image: none !important;
    vertical-align: top;
    position: relative;
    cursor: pointer;
}

#mf-dept-tree .jstree-node > .jstree-ocl::before {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform-origin: 50% 50%;
    transition: transform .12s ease, color .12s ease;
}

#mf-dept-tree .jstree-closed > .jstree-ocl::before {
    transform: rotate(-45deg);
}

#mf-dept-tree .jstree-open > .jstree-ocl::before {
    transform: rotate(45deg);
}

/* Листовий вузол залишає порожнє місце замість шеврона — текст не скаче. */
#mf-dept-tree .jstree-leaf > .jstree-ocl {
    visibility: hidden !important;
    cursor: default;
}

/* Назви всіх вузлів одного рівня починаються з однієї вертикалі. */
#mf-dept-tree .jstree-anchor {
    position: relative;
    display: inline-block !important;
    width: calc(100% - 24px) !important;
    min-height: 34px;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    box-sizing: border-box;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.4 !important;
    color: #e6edf3 !important;
    background: transparent !important;
    border: 1px solid transparent;
    border-radius: 6px;
    vertical-align: top;
}

#mf-dept-tree .jstree-anchor:hover,
#mf-dept-tree .jstree-hovered {
    color: #f0f6fc !important;
    background: rgba(110, 118, 129, .10) !important;
    border-color: rgba(110, 118, 129, .22) !important;
}

/* Увесь батьківський шлях активного вузла. */
#mf-dept-tree li.mf-tree-node--active-path > .jstree-anchor {
    color: #c9d1d9 !important;
    background: rgba(56, 139, 253, .08) !important;
    border-color: rgba(56, 139, 253, .18) !important;
}

#mf-dept-tree li.mf-tree-node--active-path > .jstree-ocl {
    color: #58a6ff !important;
}

/* Поточний вузол. */
#mf-dept-tree li.mf-tree-node--selected > .jstree-anchor,
#mf-dept-tree .jstree-anchor.jstree-clicked,
#mf-dept-tree .jstree-clicked {
    color: #ffffff !important;
    background: rgba(31, 111, 235, .22) !important;
    border-color: rgba(47, 129, 247, .46) !important;
    box-shadow: inset 3px 0 0 #58a6ff !important;
}

#mf-dept-tree li.mf-tree-node--selected > .jstree-ocl {
    color: #79c0ff !important;
}

/* jsTree wholerow не повинен домальовувати окремий фон. */
#mf-dept-tree .jstree-wholerow,
#mf-dept-tree .jstree-wholerow-hovered,
#mf-dept-tree .jstree-wholerow-clicked {
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    #mf-dept-tree .jstree-children {
        padding-left: 20px !important;
    }
}

/* ============================================================
   1.0.68 — TREE ALIGN / COMPACT SPACING
   ============================================================ */

/* Менше відступ зліва для всього дерева */
.mf-structure__left .card-body {
    padding: 6px 8px 8px !important;
}

#mf-dept-tree {
    padding: 0 0 6px !important;
    margin: 0 !important;
}

#mf-dept-tree > .jstree-container-ul {
    margin: 0 !important;
    padding-left: 0 !important;
}

/* Крок ієрархії трохи компактніший */
#mf-dept-tree .jstree-children {
    padding-left: 20px !important;
}

/* Менше вертикального повітря між рядками */
#mf-dept-tree .jstree-node {
    margin: 1px 0 !important;
    min-height: 30px !important;
}

#mf-dept-tree > .jstree-container-ul > .jstree-node {
    margin-bottom: 2px !important;
}

/* Для листових вузлів обов'язково резервуємо місце під шеврон,
   щоб текст не зміщувався вліво відносно вузлів того ж рівня */
#mf-dept-tree .jstree-leaf > .jstree-ocl {
    display: inline-flex !important;
    visibility: hidden !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: 6px 4px 0 0 !important;
}

#mf-dept-tree .jstree-node > .jstree-ocl {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: 6px 4px 0 0 !important;
}

#mf-dept-tree .jstree-anchor {
    width: calc(100% - 22px) !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
    line-height: 1.3 !important;
    border-radius: 6px !important;
}

/* Кореневий вузол ближче до лівого краю */
#mf-dept-tree > .jstree-container-ul > .jstree-node > .jstree-anchor {
    width: calc(100% - 22px) !important;
}

@media (max-width: 768px) {
    .mf-structure__left .card-body {
        padding: 6px !important;
    }

    #mf-dept-tree .jstree-children {
        padding-left: 18px !important;
    }
}

/* ============================================================
   1.0.69 — TREE LEFT SHIFT + HEADER ACTIONS
   ============================================================ */

.mf-structure .mf-structure-panel__header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.mf-structure .mf-structure-panel__header--content {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* На лівій панелі більше не тримаємо другий рядок дій */
.mf-structure .mf-structure-panel--tree > .mf-structure-panel__header {
    align-items: center;
    flex-direction: row;
    gap: 8px;
}

/* Дерево сильніше змістити вліво і зробити компактнішим */
.mf-structure__left .card-body {
    padding: 4px 6px 6px !important;
}

#mf-dept-tree {
    padding: 0 0 4px !important;
    margin: 0 !important;
}

#mf-dept-tree > .jstree-container-ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#mf-dept-tree .jstree-children {
    padding-left: 18px !important;
}

#mf-dept-tree .jstree-node {
    margin: 0 !important;
    min-height: 28px !important;
}

#mf-dept-tree > .jstree-container-ul > .jstree-node {
    margin: 0 0 1px !important;
}

#mf-dept-tree .jstree-node > .jstree-ocl,
#mf-dept-tree .jstree-leaf > .jstree-ocl {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    margin: 5px 2px 0 0 !important;
}

#mf-dept-tree .jstree-node > .jstree-ocl::before {
    width: 6px;
    height: 6px;
}

#mf-dept-tree .jstree-anchor,
#mf-dept-tree > .jstree-container-ul > .jstree-node > .jstree-anchor {
    width: calc(100% - 18px) !important;
    min-height: 28px !important;
    padding: 3px 8px !important;
    line-height: 1.25 !important;
    border-radius: 6px !important;
}

@media (max-width: 768px) {
    .mf-structure .mf-structure-panel__header--content {
        align-items: flex-start;
    }

    .mf-structure__left .card-body {
        padding: 4px !important;
    }

    #mf-dept-tree .jstree-children {
        padding-left: 16px !important;
    }
}

/* ============================================================
   1.0.70 — LEAF NODE ALIGNMENT FIX
   ============================================================ */

/* Якщо вузол без дочірніх, він все одно має починатися з тієї ж вертикалі,
   що і вузол з шевроном. Тому додаємо лівий зсув на ширину шеврона. */
#mf-dept-tree .jstree-leaf > .jstree-anchor {
    margin-left: 18px !important;
    width: calc(100% - 36px) !important;
    padding-left: 8px !important;
}

@media (max-width: 768px) {
    #mf-dept-tree .jstree-leaf > .jstree-anchor {
        margin-left: 16px !important;
        width: calc(100% - 32px) !important;
    }
}

/* ============================================================
   1.0.71 — REMOVE DOUBLE LEAF OFFSET
   ============================================================ */

/* Місце під шеврон уже резервує прихований .jstree-ocl.
   Додатковий margin-left для листових вузлів давав подвійний зсув. */
#mf-dept-tree .jstree-leaf > .jstree-anchor {
    margin-left: 0 !important;
    width: calc(100% - 18px) !important;
    padding-left: 8px !important;
}

@media (max-width: 768px) {
    #mf-dept-tree .jstree-leaf > .jstree-anchor {
        margin-left: 0 !important;
        width: calc(100% - 18px) !important;
    }
}

/* ============================================================
   1.0.72 — UNIFORM META BADGES
   ============================================================ */

/* Верхні бейджики: 5 однакових колонок на всю ширину, адреса окремим рядом */
.mf-dept-meta-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: stretch;
}

.mf-dept-meta-item,
.mf-dept-meta-item--email {
    grid-column: span 1 !important;
}

.mf-dept-meta-item--wide {
    grid-column: 1 / -1 !important;
}

/* Кожен бейдж: 1-й рядок іконка + назва, 2-й рядок значення */
.mf-dept-meta-item {
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 5px;
    min-height: 76px;
}

.mf-dept-meta-content {
    display: contents;
}

.mf-dept-meta-icon {
    grid-column: 1;
    grid-row: 1;
    margin-top: 1px;
}

.mf-dept-meta-label {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    align-self: center;
}

.mf-dept-meta-value,
.mf-dept-meta-input {
    grid-column: 1 / -1;
    grid-row: 2;
}

.mf-dept-meta-value {
    line-height: 1.35;
}

/* Адаптивність */
@media (max-width: 1400px) {
    .mf-dept-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1100px) {
    .mf-dept-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .mf-dept-meta-item,
    .mf-dept-meta-item--email {
        grid-column: span 1 !important;
    }

    .mf-dept-meta-item--wide {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 768px) {
    .mf-dept-meta-grid {
        grid-template-columns: 1fr !important;
    }

    .mf-dept-meta-item,
    .mf-dept-meta-item--email,
    .mf-dept-meta-item--wide {
        grid-column: 1 / -1 !important;
    }
}

/* ============================================================
   1.0.73 — CENTER META BADGE CONTENT
   ============================================================ */

/* Перший рядок: іконка + назва по центру. Другий рядок: значення по центру. */
.mf-dept-meta-item {
    grid-template-columns: 1fr 32px auto 1fr !important;
    text-align: center;
}

.mf-dept-meta-icon {
    grid-column: 2 !important;
    justify-self: center;
}

.mf-dept-meta-label {
    grid-column: 3 !important;
    justify-self: center;
    text-align: center;
}

.mf-dept-meta-value,
.mf-dept-meta-input {
    grid-column: 1 / -1 !important;
    justify-self: stretch;
    text-align: center !important;
}

/* ============================================================
   1.0.74 — ADDRESS BADGE LEFT ALIGN
   ============================================================ */

/* Центрування стосується лише п'яти верхніх бейджиків.
   Адреса залишається широким ліворуч вирівняним рядком. */
.mf-dept-meta-item--wide {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    text-align: left !important;
}

.mf-dept-meta-item--wide .mf-dept-meta-icon {
    grid-column: 1 !important;
    justify-self: start;
}

.mf-dept-meta-item--wide .mf-dept-meta-label {
    grid-column: 2 !important;
    justify-self: start;
    text-align: left !important;
}

.mf-dept-meta-item--wide .mf-dept-meta-value,
.mf-dept-meta-item--wide .mf-dept-meta-input {
    grid-column: 1 / -1 !important;
    justify-self: stretch;
    text-align: left !important;
}

/* ============================================================
   1.0.77 — COLLEGIAL BODIES: GITHUB TABLE STANDARD
   ============================================================ */

/* Toolbar above the two panels */
.mf-structure #mf-structure-bodies > .d-flex:first-child {
    margin: 0 0 8px !important;
    padding: 8px 10px;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-panel);
}

/* Keep both work panels on the same GitHub surfaces. */
.mf-structure #mf-structure-bodies .mf-bodies__left > .card,
.mf-structure #mf-structure-bodies .mf-bodies__right > .card {
    border: 1px solid var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-panel) !important;
    box-shadow: none !important;
    overflow: hidden;
}

.mf-structure #mf-structure-bodies .mf-bodies__left > .card > .card-header,
.mf-structure #mf-structure-bodies .mf-bodies__right > .card > .card-header {
    min-height: 40px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    background: var(--mf-gh-panel-subtle) !important;
    color: var(--mf-gh-text) !important;
    font-size: 13px;
    font-weight: 600;
}

.mf-structure #mf-structure-bodies .mf-bodies__left > .card > .card-body,
.mf-structure #mf-structure-bodies .mf-bodies__right > .card > .card-body {
    padding: 12px;
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text) !important;
}

/* Left list of collegial bodies. */
.mf-structure #mf-bodies-list .mf-bodies-list {
    margin: 0;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-bg);
    overflow: hidden;
}

.mf-structure #mf-bodies-list .mf-body-item,
.mf-structure #mf-bodies-list .list-group-item.mf-body-item {
    position: relative;
    margin: 0;
    padding: 10px 12px;
    border: 0 !important;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    border-radius: 0 !important;
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    box-shadow: none !important;
    text-align: left;
    transition: background-color .12s ease, box-shadow .12s ease;
}

.mf-structure #mf-bodies-list .mf-body-item:last-child {
    border-bottom: 0 !important;
}

.mf-structure #mf-bodies-list .mf-body-item:hover,
.mf-structure #mf-bodies-list .mf-body-item:focus {
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text) !important;
    outline: none;
}

.mf-structure #mf-bodies-list .mf-body-item.active,
.mf-structure #mf-bodies-list .list-group-item.mf-body-item.active {
    background: var(--mf-gh-blue-soft) !important;
    color: var(--mf-gh-text) !important;
    box-shadow: inset 3px 0 0 #1f6feb !important;
}

.mf-structure #mf-bodies-list .mf-body-item > div:first-child {
    color: var(--mf-gh-text) !important;
    font-size: 13px;
    font-weight: 600 !important;
    line-height: 1.35;
}

.mf-structure #mf-bodies-list .mf-body-item .text-muted,
.mf-structure #mf-bodies-list .mf-body-item.active .text-muted {
    margin-top: 3px;
    color: var(--mf-gh-muted) !important;
    font-size: 12px !important;
    line-height: 1.4;
}

.mf-structure #mf-bodies-list .mf-body-item a,
.mf-structure #mf-bodies-members a {
    color: var(--mf-gh-link) !important;
}

.mf-structure #mf-bodies-list .mf-body-item a:hover,
.mf-structure #mf-bodies-members a:hover {
    color: var(--mf-gh-link-hover) !important;
}

/* Selected body's title and description. */
.mf-structure #mf-bodies-members .mf-body-members-head {
    gap: 12px;
    margin: 0 0 10px !important;
    padding: 0;
}

.mf-structure #mf-bodies-members .mf-body-members-head > div:first-child > div:first-child {
    color: var(--mf-gh-text) !important;
    font-size: 14px;
    font-weight: 600 !important;
}

.mf-structure #mf-bodies-members .mf-body-members-head .text-muted {
    color: var(--mf-gh-muted) !important;
    font-size: 12px;
    line-height: 1.4;
}

/* Members table: the same GitHub language as the People table. */
.mf-structure #mf-body-members-table .mf-list-scroll {
    max-width: 100%;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-bg);
    overflow: auto;
}

.mf-structure #mf-body-members-table .mf-list-table,
.mf-structure #mf-body-members-table .table.mf-list-table {
    --bs-table-bg: var(--mf-gh-bg);
    --bs-table-striped-bg: #111720;
    --bs-table-hover-bg: var(--mf-gh-panel);
    --bs-table-color: var(--mf-gh-text);
    --bs-table-border-color: var(--mf-gh-border);
    width: 100%;
    min-width: 620px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    font-size: 12px;
}

.mf-structure #mf-body-members-table .mf-list-table thead,
.mf-structure #mf-body-members-table .mf-list-table thead tr,
.mf-structure #mf-body-members-table .mf-list-table thead th {
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text) !important;
    border-color: var(--mf-gh-border) !important;
    box-shadow: none !important;
}

.mf-structure #mf-body-members-table .mf-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 7px 8px;
    border-top: 0 !important;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.mf-structure #mf-body-members-table .mf-list-table tbody tr,
.mf-structure #mf-body-members-table .mf-list-table tbody td,
.mf-structure #mf-body-members-table .mf-list-table.table > :not(caption) > * > * {
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    border-color: var(--mf-gh-border) !important;
    box-shadow: none !important;
}

.mf-structure #mf-body-members-table .mf-list-table tbody td {
    padding: 7px 8px;
    border-top: 0 !important;
    border-bottom: 1px solid var(--mf-gh-border) !important;
    vertical-align: top;
    line-height: 1.35;
}

.mf-structure #mf-body-members-table .mf-list-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.mf-structure #mf-body-members-table .mf-list-table tbody tr:nth-child(even) td {
    background: #111720 !important;
}

.mf-structure #mf-body-members-table .mf-list-table tbody tr:hover td {
    background: var(--mf-gh-panel) !important;
}

.mf-structure #mf-body-members-table .mf-list-table tbody tr.is-selected td,
.mf-structure #mf-body-members-table .mf-list-table tbody tr.selected td,
.mf-structure #mf-body-members-table .mf-list-table tbody tr:has(.mf-row-check:checked) td {
    background: var(--mf-gh-blue-soft) !important;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-col-check {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    text-align: center;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-col-num {
    width: 42px !important;
    min-width: 42px;
    max-width: 42px;
    text-align: center;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-col-name-head {
    width: 24%;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-col-dept-role-head {
    width: 46%;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-col-contact {
    width: 150px;
    min-width: 150px;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-list-name {
    color: var(--mf-gh-text) !important;
    font-weight: 500;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-contact-name,
.mf-structure #mf-body-members-table .mf-list-table .mf-contact-voip {
    color: var(--mf-gh-link) !important;
    cursor: pointer;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-contact-name:hover,
.mf-structure #mf-body-members-table .mf-list-table .mf-contact-voip:hover {
    color: var(--mf-gh-link-hover) !important;
    text-decoration: underline;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-dept {
    color: var(--mf-gh-muted) !important;
    font-size: 11px;
    line-height: 1.35;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-role {
    margin-top: 3px;
    color: var(--mf-gh-text) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-leader-icon {
    color: #d29922 !important;
}

.mf-structure #mf-body-members-table .mf-list-table .mf-selected-count,
.mf-structure #mf-body-members-table #mf-list-selected-count {
    color: var(--mf-gh-muted) !important;
}

.mf-structure #mf-body-members-table input[type="checkbox"] {
    accent-color: #1f6feb;
}

.mf-structure #mf-bodies-list > .text-muted,
.mf-structure #mf-bodies-members > .text-muted,
.mf-structure #mf-body-members-table > .text-muted {
    color: var(--mf-gh-muted) !important;
}

@media (max-width: 900px) {
    .mf-structure #mf-structure-bodies .mf-bodies {
        flex-direction: column;
        height: auto;
    }

    .mf-structure #mf-structure-bodies .mf-bodies__left,
    .mf-structure #mf-structure-bodies .mf-bodies__right {
        flex: 1 1 auto;
        min-height: 280px;
    }
}

/* ============================================================
   1.0.95 — COMPACT GITHUB TREE STYLE FOR FUNCTIONS TAB
   ============================================================ */

.mf-structure .mf-tab-panel[data-panel="functions"] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 12px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions {
    gap: 12px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .card {
    border-color: var(--mf-gh-border) !important;
    background: var(--mf-gh-bg) !important;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .card > .card-header {
    min-height: 34px;
    padding: 6px 10px;
    background: var(--mf-gh-panel) !important;
    color: var(--mf-gh-text) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .card > .border-bottom {
    padding: 6px !important;
    border-color: var(--mf-gh-border) !important;
    background: var(--mf-gh-panel) !important;
}

.mf-structure .mf-tab-panel[data-panel="functions"] #mf-functions-search {
    min-height: 28px;
    padding: 3px 8px;
    border-color: var(--mf-gh-border) !important;
    border-radius: 6px;
    background: var(--mf-gh-bg) !important;
    color: var(--mf-gh-text) !important;
    font-size: 12px;
    line-height: 20px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .card > .card-body {
    padding: 6px 8px !important;
    background: var(--mf-gh-bg) !important;
}

.mf-structure #mf-structure-functions-tree,
.mf-structure #mf-structure-functions-selected {
    color: var(--mf-gh-text);
    font-size: 12px;
    line-height: 1.3;
    scrollbar-color: #484f58 var(--mf-gh-bg);
    scrollbar-width: thin;
}

.mf-structure #mf-structure-functions-tree::-webkit-scrollbar,
.mf-structure #mf-structure-functions-selected::-webkit-scrollbar {
    width: 8px;
}

.mf-structure #mf-structure-functions-tree::-webkit-scrollbar-track,
.mf-structure #mf-structure-functions-selected::-webkit-scrollbar-track {
    background: var(--mf-gh-bg);
}

.mf-structure #mf-structure-functions-tree::-webkit-scrollbar-thumb,
.mf-structure #mf-structure-functions-selected::-webkit-scrollbar-thumb {
    border: 2px solid var(--mf-gh-bg);
    border-radius: 8px;
    background: #484f58;
}

/* Left tree: compact jsTree rows without losing checkbox or branch controls. */
.mf-structure #mf-structure-functions-tree .jstree-container-ul {
    margin: 0;
}

.mf-structure #mf-structure-functions-tree .jstree-node {
    min-height: 22px;
    margin-left: 16px;
    line-height: 22px;
}

.mf-structure #mf-structure-functions-tree > .jstree-container-ul > .jstree-node {
    margin-left: 0;
}

.mf-structure #mf-structure-functions-tree .jstree-anchor {
    min-height: 22px;
    padding: 1px 4px 1px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--mf-gh-text);
    font-size: 12px;
    line-height: 20px;
}

.mf-structure #mf-structure-functions-tree .jstree-wholerow {
    height: 22px;
    border-radius: 4px;
}

.mf-structure #mf-structure-functions-tree .jstree-icon {
    width: 18px;
    height: 20px;
    line-height: 20px;
}

.mf-structure #mf-structure-functions-tree .jstree-ocl {
    width: 16px;
}

.mf-structure #mf-structure-functions-tree .jstree-checkbox {
    margin-right: 0;
    transform: scale(.86);
    transform-origin: center;
}

.mf-structure #mf-structure-functions-tree .jstree-themeicon {
    margin-right: 1px;
}

.mf-structure #mf-structure-functions-tree .jstree-wholerow-hovered,
.mf-structure #mf-structure-functions-tree .jstree-anchor:not(.jstree-clicked):hover,
.mf-structure #mf-structure-functions-tree .jstree-hovered {
    border-color: transparent !important;
    background: var(--mf-gh-panel-subtle) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.mf-structure #mf-structure-functions-tree .jstree-wholerow-clicked,
.mf-structure #mf-structure-functions-tree .jstree-clicked,
.mf-structure #mf-structure-functions-tree .jstree-anchor.jstree-clicked {
    border-color: rgba(47, 129, 247, .35) !important;
    background: var(--mf-gh-blue-soft) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.mf-structure #mf-structure-functions-tree .jstree-anchor.jstree-clicked *,
.mf-structure #mf-structure-functions-tree .jstree-clicked * {
    color: inherit !important;
}

.mf-structure #mf-structure-functions-tree .jstree-checkbox.mf-own-full::after {
    top: -1px;
    font-size: 13px;
    line-height: 18px;
}

/* Right tree: compact GitHub list-group presentation. */
.mf-structure .mf-tab-panel[data-panel="functions"] .mf-func-selected-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-func-selected-block {
    overflow: hidden;
    border: 1px solid var(--mf-gh-border);
    border-radius: 6px;
    background: var(--mf-gh-bg);
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-func-selected-block__title {
    min-height: 30px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--mf-gh-border);
    background: var(--mf-gh-panel);
    color: var(--mf-gh-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 19px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-func-selected-block > .mf-about-func-tree {
    padding: 5px 8px 7px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__node {
    margin-bottom: 2px;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__title {
    margin: 2px 0;
    color: var(--mf-gh-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.32;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__title-text {
    font-weight: 600;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__children {
    margin-left: 12px;
    padding-left: 8px;
    border-left: 1px solid var(--mf-gh-border-muted);
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__item {
    min-height: 18px;
    margin: 1px 0;
    padding: 1px 22px 1px 0;
    color: var(--mf-gh-text);
    font-size: 12px;
    line-height: 1.32;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__num {
    margin-right: 4px;
    color: var(--mf-gh-muted);
    font-size: 11px;
    font-weight: 600;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__item-title {
    color: var(--mf-gh-text);
    font-weight: 600;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__title-desc,
.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__item-desc {
    color: #b1bac4;
    font-size: 12px;
    font-weight: 400;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__item .mf-func-selected-item__remove {
    top: 1px;
    right: 1px;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 4px;
    color: #f85149;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-about-func-tree__item .mf-func-selected-item__remove:hover {
    background: rgba(248, 81, 73, .12);
    color: #ff7b72;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .text-muted {
    color: var(--mf-gh-muted) !important;
    font-size: 12px;
}

@media (max-width: 900px) {
    .mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions {
        gap: 10px;
    }
}

/* ============================================================
   1.0.96 — FUNCTIONS TREE POSITION + RESIZABLE 30/70 SPLIT
   ============================================================ */

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions {
    gap: 0;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions__left {
    flex: 0 0 52%;
    min-width: 0;
}

.mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions__right {
    flex: 1 1 0;
    min-width: 0;
}

.mf-structure-functions__resizer {
    position: relative;
    z-index: 4;
    flex: 0 0 14px;
    width: 14px;
    min-width: 14px;
    cursor: col-resize;
    touch-action: none;
    outline: none;
}

.mf-structure-functions__resizer::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: var(--mf-gh-border);
    transition: width .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.mf-structure-functions__resizer:hover::before,
.mf-structure-functions__resizer:focus-visible::before,
body.mf-functions-resizing .mf-structure-functions__resizer::before {
    width: 3px;
    background: #2f81f7;
    box-shadow: 0 0 0 1px rgba(47, 129, 247, .22);
}

body.mf-functions-resizing,
body.mf-functions-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

.mf-structure #mf-structure-functions-tree .mf-functions-node--restored > .jstree-wholerow,
.mf-structure #mf-structure-functions-tree .mf-functions-node--restored > .jstree-anchor {
    border-color: rgba(47, 129, 247, .65) !important;
    background: rgba(47, 129, 247, .20) !important;
    box-shadow: inset 3px 0 0 #2f81f7 !important;
}

@media (max-width: 1100px) {
    .mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions {
        gap: 10px;
    }

    .mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions__left,
    .mf-structure .mf-tab-panel[data-panel="functions"] .mf-structure-functions__right {
        flex: 1 1 auto !important;
        width: 100%;
    }

    .mf-structure-functions__resizer {
        display: none;
    }
}



/* ============================================================
   1.0.97 — DEPARTMENT FINANCIAL ACTIVITY FLAG
   ============================================================ */

.mf-dept-financial-flag {
    margin: 0 0 14px;
    padding: 0;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #161b22;
}

.mf-dept-financial-flag__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    cursor: pointer;
}

.mf-dept-financial-flag__label:hover {
    background: #1c2128;
}

.mf-dept-financial-flag__checkbox {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0 !important;
    border-color: #6e7681 !important;
    background-color: #0d1117 !important;
    box-shadow: none !important;
}

.mf-dept-financial-flag__checkbox:checked {
    border-color: #238636 !important;
    background-color: #238636 !important;
}

.mf-dept-financial-flag__checkbox:focus-visible {
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .3) !important;
}

.mf-dept-financial-flag__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mf-dept-financial-flag__title {
    color: #e6edf3;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.mf-dept-financial-flag__hint {
    margin-top: 1px;
    color: #8b949e;
    font-size: 11px;
    line-height: 16px;
}
