:root {
    --sidebar-width: 344px;
}

html.parser-shell,
body.parser-shell {
    height: 100%;
    overflow: hidden;
}

body.parser-shell {
    overscroll-behavior: none;
}

body.parser-shell .layout {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

body.parser-shell .content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0 4px 0 0;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    align-self: stretch;
    background: transparent;
    border-right: none;
    box-shadow: none;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    padding: 22px 20px 96px;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    background: linear-gradient(180deg, #1d2638 0%, #172031 100%);
    border-right: 1px solid rgba(102, 126, 171, 0.16);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.012);
    z-index: 120;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.sidebar-footer:empty {
    display: none;
}

.sidebar-footer.is-empty {
    display: none;
}

.sidebar-footer .alert {
    margin-top: 0;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.35;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f2f5fc;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 26px;
}

.logo-mark {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #e2e8f6;
}

.logo-mark svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo-label {
    min-width: 0;
}

.menu {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 4px;
    min-height: 0;
}

.menu a,
.menu .menu-action {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c9d4e8;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 13px;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.menu .menu-action {
    width: 100%;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.menu a:hover,
.menu .menu-action:hover {
    color: #eef4ff;
    background: rgba(98, 127, 182, 0.11);
    border-color: rgba(118, 148, 205, 0.08);
}

.menu a.is-active {
    color: #ffffff;
    background: rgba(86, 108, 150, 0.28);
    border-color: rgba(124, 154, 208, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.024);
}

.menu a.is-active:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.026);
}

.menu-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 20px;
    padding-left: 10px;
    border-left: 1px solid rgba(118, 142, 182, 0.14);
}

.menu-group.is-active .menu-submenu {
    border-left-color: rgba(130, 156, 199, 0.2);
}

.menu-submenu a {
    min-height: 0;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    color: #b9c5dc;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.menu-submenu a:hover {
    background: rgba(98, 127, 182, 0.08);
    border-color: rgba(118, 148, 205, 0.06);
    box-shadow: none;
}

.menu-submenu a.is-active {
    color: #ffffff;
    background: rgba(86, 108, 150, 0.22);
    border-color: rgba(124, 154, 208, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.menu-sub-link-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    flex: 0 0 5px;
    background: currentColor;
    opacity: 0.6;
}

.menu-link-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    opacity: 0.9;
}

.menu-link-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-link-label {
    display: block;
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-sidebar-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: auto;
    padding: 0 5px;
    color: #eaf3ff;
    background: rgba(76, 127, 203, 0.58);
    border: 1px solid rgba(164, 202, 255, 0.34);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.support-sidebar-unread-badge[hidden] {
    display: none;
}

.menu-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.menu-notifications .menu-link-icon {
    color: #aab9d1;
    opacity: 0.88;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.menu-notifications.has-unread .menu-link-icon {
    color: #facc15;
    opacity: 1;
}

.menu-notifications:hover .menu-link-icon,
.menu-notifications:focus-visible .menu-link-icon {
    color: #eef4ff;
    opacity: 1;
}

.menu-notifications.has-unread:hover .menu-link-icon,
.menu-notifications.has-unread:focus-visible .menu-link-icon {
    color: #fde68a;
}

.notification-sidebar-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: auto;
    padding: 0 5px;
    color: #f7f9fd;
    background: rgba(245, 183, 49, 0.24);
    border: 1px solid rgba(250, 204, 74, 0.42);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.notification-sidebar-unread-badge[hidden] {
    display: none;
}

.menu .menu-action:focus-visible {
    outline: none;
    color: #ffffff;
    border-color: rgba(118, 160, 232, 0.3);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.menu .menu-action.menu-notifications:focus-visible {
    background: rgba(105, 125, 160, 0.16);
    border-color: rgba(168, 188, 218, 0.24);
    box-shadow: 0 0 0 3px rgba(165, 183, 210, 0.14);
}

.menu-spacer {
    flex: 1 1 auto;
    min-height: 12px;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
}

.page-scroll-top {
    position: absolute;
    right: 20px;
    bottom: 24px;
    z-index: 160;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 18px;
    border: 1px solid rgba(101, 132, 191, 0.26);
    background: linear-gradient(180deg, rgba(24, 36, 58, 0.96), rgba(16, 25, 42, 0.98));
    color: #f3f7ff;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.page-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.page-scroll-top:hover {
    background: linear-gradient(180deg, rgba(40, 76, 140, 0.98), rgba(31, 59, 111, 0.98));
    border-color: rgba(113, 160, 241, 0.38);
}

.page-scroll-top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-scroll-top:focus-visible {
    outline: none;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.layout + .page-scroll-top {
    display: none !important;
}

.content-full {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-basis: auto;
        height: auto;
        min-height: 0;
        position: static;
        top: auto;
        align-self: stretch;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .sidebar-shell {
        position: static;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        scrollbar-gutter: auto;
        border-right: none;
        box-shadow: none;
        z-index: auto;
    }
}

@media (max-width: 760px) {
    .page-scroll-top {
        right: 16px;
        bottom: 18px;
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }
}
