body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

/* Дизайн-токены ЛК (docs/design-system.md) */
:root {
    --primary: #36aae1;
    --primary-hover: #2d95c9;
    --focus-ring: rgba(54, 170, 225, .35);

    --success-bg: #dff5e1;
    --success-bg-hover: #cdebd1;
    --success-text: #1c6b2a;
    --success-border: #c4e8c7;
    --danger-bg: #fde0e0;
    --danger-bg-hover: #f8cfcf;
    --danger-text: #9b2323;
    --danger-border: #f3c5c5;
    --info-bg: #eef4ff;
    --info-bg-hover: #e0ecfd;
    --info-text: #355d98;
    --info-border: #c3d6f5;
    --warning-bg: #fff2d8;
    --warning-text: #966400;
    --warning-border: #f0dcab;

    --page-bg: #f2f2f2;
    --card-border: #ddd;
    --input-border: #cfcfcf;
    --row-border: #e8e8e8;
    --sub-border: #ececec;
    --th-bg: #f7f7f7;
    --text: #222;
    --text-muted: #777;

    --radius-icon-btn: 7px;
    --radius-modal: 10px;
    --radius-pill: 999px;
    --shadow-modal: 0 18px 40px rgba(0, 0, 0, .2);
}

#app-side-nav-outer-toolbar {
    flex-direction: column;
    display: flex; 
    height: 100%;
    width: 100%;
}

.layout-header {
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
    z-index: 1501;
}

.dx-toolbar .dx-toolbar-item.menu-button {
    width: 60px;
    text-align: center;
    padding: 0;
}

.dx-toolbar .dx-toolbar-item.menu-button > .dx-toolbar-item-content .dx-icon {
    color: #ff5722;
}

.dx-card {
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    border-radius: 4px;
    background-color: #fff;
    margin: 2px 2px 3px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

.with-footer > div > div > .dx-scrollable-content {
    height: 100%;
}

.with-footer > div > div > .dx-scrollable-content > .dx-scrollview-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.layout-body {
    background-color: #f2f2f2;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.layout-body .menu-container {
    height: 100%;
    width: 250px;
}

.layout-body .content {
    flex-grow: 1;
    height: 100%;
    line-height: 1.5;
}

.layout-body .content h2 {
    font-size: 30px;
    font-weight: 300;
    letter-spacing: -.5px;
}

.layout-body .content-block {
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
}

.layout-body .content-footer {
    display: block;
    color: rgba(0,0,0,.609);
    border-top: 1px solid rgba(0,0,0,.1);
    padding-top: 20px;
    padding-bottom: 24px;
}

.layout-body .responsive-paddings {
    padding: 20px;
}

@media screen and (min-width: 600px) {
    .layout-body .content-block {
        margin-left: 40px;
        margin-right: 40px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

.menu-container .dx-widget {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: Roboto,RobotoFallback,Helvetica,Arial,sans-serif;
    line-height: 24px;
}

.menu-container .dx-treeview {
    white-space: nowrap;
}

.menu-container .dx-treeview .dx-treeview-item {
    padding-left: 0;
    padding-right: 0;
}

.menu-container .dx-treeview .dx-treeview-item .dx-icon {
    width: 60px !important;
    margin: 0 !important;
}

.menu-container .dx-treeview .dx-treeview-node {
    padding: 0 0 !important;
}

.menu-container .dx-treeview .dx-treeview-toggle-item-visibility {
    right: 10px;
    left: auto;
}

.menu-container .dx-treeview .dx-rtl .dx-treeview-toggle-item-visibility {
    left: 10px;
    right: auto;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="1"] {
    font-weight: bold;
    border-bottom: 1px solid #515159;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
    font-weight: normal;
    padding: 0 60px;
}

.menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node.dx-state-selected:not(.dx-state-focused) > .dx-treeview-item {
    background: transparent;
}

.menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node.dx-state-selected > .dx-treeview-item * {
    color: #FF5722;
}

.menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node:not(.dx-state-focused) > .dx-treeview-item.dx-state-hover {
    background-color: #3F3F4B;
}

/* Notifications */
.feppb-notifications { position: relative; }
.feppb-notifications > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #cfd5dc;
    border-radius: 9px;
    background: #fff;
    color: #252b31;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(31, 42, 55, .06);
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.feppb-notifications > summary::-webkit-details-marker { display: none; }
.feppb-notifications > summary::marker { display: none; content: ''; }
.feppb-notifications > summary:hover {
    background: #f8fafc;
    border-color: #aeb8c3;
    box-shadow: 0 2px 6px rgba(31, 42, 55, .10);
}
.feppb-notifications > summary:focus-visible {
    outline: 3px solid rgba(54, 170, 225, .22);
    outline-offset: 2px;
    border-color: #36aae1;
}
.feppb-notifications[open] > summary {
    background: #eef5fc;
    border-color: #8eb4d8;
    color: #173d61;
}
.feppb-notifications__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: #355d98;
}
.feppb-notifications__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feppb-notifications__label { color: inherit; }
.feppb-notifications__count {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.feppb-notifications__panel {
    position: absolute;
    z-index: 50;
    right: 0;
    top: calc(100% + 10px);
    width: min(400px, 90vw);
    max-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8dee5;
    box-shadow: 0 18px 44px rgba(31, 42, 55, .18);
    border-radius: 10px;
    padding: 8px;
}
.feppb-notifications__list {
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}
.feppb-notification { margin: 0; }
.feppb-notification + .feppb-notification { border-top: 1px solid #edf0f3; }
.feppb-notification button {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 11px 12px;
    border-radius: 7px;
    cursor: pointer;
    color: #252b31;
}
.feppb-notification.is-unread button { background: #edf6ff; }
.feppb-notification button:hover { background: #f3f6f8; }
.feppb-notification strong, .feppb-notification small, .feppb-notification time { display: block; }
.feppb-notification strong { color: #1f2d3a; }
.feppb-notification small { margin-top: 4px; color: #52606d; line-height: 1.35; }
.feppb-notification time { margin-top: 6px; font-size: 11px; color: #77838f; }
.feppb-notifications__mark-all { flex: 0 0 auto; border-top: 1px solid #edf0f3; margin-top: 4px; padding-top: 6px; }
.feppb-notifications__mark-all button {
    width: 100%;
    border: 0;
    border-radius: 7px;
    background: #f5f8fb;
    color: #355d98;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.feppb-notifications__mark-all button:hover { background: #eaf3fc; }

.feppb-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* Общий заголовок раздела (дизайн-система, раздел 5.11) */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 16px;
    padding: 8px 4px 0;
}
.page-header__eyebrow {
    margin-bottom: 5px;
    color: #36aae1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.page-header h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
    color: #222;
}
.page-header p {
    max-width: 700px;
    margin: 7px 0 0;
    color: #777;
    font-size: 14px;
    line-height: 1.5;
}
.page-header__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 0 0 auto;
}
@media (max-width: 960px) {
    .page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
}
