/* MPRM V55 authoritative sidebar/mobile navigation stylesheet. */
/* MPRM sidebar modernization v64 — scoped to the application sidebar. */
.sidebar {
    --sidebar-control-height: 44px;
    --sidebar-utility-height: 52px;
    --sidebar-control-radius: 12px;
    --sidebar-icon-size: 32px;
    --sidebar-control-gap: 6px;
}

.sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-control-gap);
}


.sidebar .desktop-sidebar-toggle,
.sidebar .mobile-sidebar-close {
    box-sizing: border-box;
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
}

.mobile-app-nav .mobile-app-tab {
    box-sizing: border-box;
    min-height: 58px;
}

.mobile-app-nav .mobile-app-tab-icon {
    box-sizing: border-box;
    min-width: 28px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
}

.sidebar .side-link,
.sidebar .sidebar-logout {
    box-sizing: border-box;
    width: 100%;
    min-height: var(--sidebar-control-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--sidebar-control-radius);
    text-decoration: none;
    line-height: 1.2;
    transition: background-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.sidebar .side-link:hover,
.sidebar .sidebar-logout:hover {
    background: rgba(127, 127, 127, .10);
}

.sidebar .side-link:focus-visible,
.sidebar .sidebar-logout:focus-visible,
.sidebar .nav-section-toggle:focus-visible,
.sidebar .pwa-install-sidebar:focus-visible,
.sidebar .pwa-refresh-sidebar:focus-visible,
.sidebar .sidebar-theme-toggle:focus-visible,
.sidebar .offline-sync-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.sidebar .side-link.active {
    font-weight: 700;
    box-shadow: inset 3px 0 0 currentColor, 0 6px 18px rgba(0, 0, 0, .06);
}

.sidebar .side-icon,
.sidebar .pwa-install-icon,
.sidebar .theme-toggle-icon,
.sidebar .offline-status-icon {
    box-sizing: border-box;
    width: var(--sidebar-icon-size);
    min-width: var(--sidebar-icon-size);
    height: var(--sidebar-icon-size);
    display: inline-grid;
    place-items: center;
    flex: 0 0 var(--sidebar-icon-size);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.sidebar .side-link > span:not(.side-icon):not(.notification-count),
.sidebar .side-link-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .notification-count {
    margin-left: auto;
    flex: 0 0 auto;
}

.sidebar .sidebar-section {
    min-width: 0;
}

.sidebar .nav-section-toggle {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 1px;
    padding: 5px 8px 5px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    transition: background-color .16s ease, color .16s ease;
}

.sidebar .nav-section-toggle:hover {
    background: rgba(127, 127, 127, .08);
}

.sidebar .nav-section-title {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .075em;
    line-height: 1.2;
}

.sidebar .nav-section-rule {
    height: 1px;
    min-width: 10px;
    flex: 1 1 auto;
    background: currentColor;
    opacity: .14;
}

.sidebar .nav-section-chevron {
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 7px;
    background: rgba(127, 127, 127, .10);
    transition: transform .2s ease, background-color .16s ease;
}

.sidebar .nav-section-chevron::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    top: 7px;
    left: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg);
}

.sidebar .nav-section-toggle[aria-expanded="false"] .nav-section-chevron {
    transform: rotate(-90deg);
}

.sidebar .nav-section-items,
.sidebar .sidebar-tools-panel {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows .22s ease, opacity .18s ease;
}

.sidebar .nav-section-items.is-collapsed,
.sidebar .sidebar-tools-panel.is-collapsed {
    grid-template-rows: 0fr;
    opacity: .25;
    pointer-events: none;
}

.sidebar .nav-section-items-inner,
.sidebar .sidebar-tools-panel-inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-control-gap);
}

.sidebar .nav-section-items-inner > .side-link:first-child {
    margin-top: 1px;
}

.sidebar .sidebar-utility-label.nav-section-toggle {
    margin-top: 2px;
}

.sidebar .pwa-install-sidebar,
.sidebar .pwa-refresh-sidebar,
.sidebar .sidebar-theme-toggle,
.sidebar .offline-status-control,
.sidebar .sidebar-logout {
    box-sizing: border-box;
    width: 100%;
    min-height: var(--sidebar-utility-height);
    border-radius: var(--sidebar-control-radius);
}

.sidebar .pwa-install-sidebar,
.sidebar .pwa-refresh-sidebar,
.sidebar .sidebar-theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    font: inherit;
    text-align: left;
}

.sidebar .pwa-install-copy,
.sidebar .theme-toggle-copy,
.sidebar .offline-status-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar .pwa-install-copy b,
.sidebar .theme-toggle-copy b,
.sidebar .offline-status-copy b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .pwa-install-copy small,
.sidebar .theme-toggle-copy small,
.sidebar .offline-status-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: .72;
}

.sidebar .offline-status-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px 7px 10px;
}

.sidebar .offline-sync-button {
    box-sizing: border-box;
    width: 34px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 9px;
}

.sidebar .sidebar-live-status {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.sidebar .sidebar-logout {
    margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar .side-link,
    .sidebar .sidebar-logout,
    .sidebar .nav-section-toggle,
    .sidebar .nav-section-chevron,
    .sidebar .nav-section-items,
    .sidebar .sidebar-tools-panel {
        transition: none !important;
    }
}

/* MPRM sidebar refinement v66 — darker navy shell, compact logo mark, red logout. */
.sidebar {
    --sidebar-tool-height: 50px;
    --sidebar-navy-950: #01060d;
    --sidebar-navy-900: #03101c;
    --sidebar-navy-800: #071a2c;
    --sidebar-navy-700: #0d2b47;
    --sidebar-blue: #4aa3ff;
    --sidebar-blue-strong: #2f80ed;
    --sidebar-danger: #dc2626;
    --sidebar-danger-dark: #991b1b;
    --sidebar-text: #e8f2fc;
    --sidebar-muted: #9fb7ce;
    --sidebar-line: rgba(171, 207, 238, .16);
    color: var(--sidebar-text) !important;
    background:
        radial-gradient(circle at 14% 3%, rgba(74, 163, 255, .12), transparent 30%),
        linear-gradient(180deg, var(--sidebar-navy-800) 0%, var(--sidebar-navy-900) 50%, var(--sidebar-navy-950) 100%) !important;
    border-right-color: var(--sidebar-line) !important;
    box-shadow: 14px 0 36px rgba(1, 12, 28, .24) !important;
}

.sidebar .sidebar-brand,
.sidebar .sidebar-user,
.sidebar .sidebar-live-status {
    color: var(--sidebar-text) !important;
    border-color: var(--sidebar-line) !important;
    background: rgba(255, 255, 255, .035) !important;
    box-shadow: none !important;
}

.sidebar .sidebar-brand strong,
.sidebar .sidebar-user strong,
.sidebar .sidebar-brand-copy,
.sidebar .sidebar-user-copy {
    color: #ffffff !important;
}

.sidebar .sidebar-brand small,
.sidebar .sidebar-user small,
.sidebar .sidebar-live-status,
.sidebar .nav-section-title {
    color: var(--sidebar-muted) !important;
}

.sidebar .sidebar-divider {
    border-color: var(--sidebar-line) !important;
    background: var(--sidebar-line) !important;
    opacity: 1 !important;
}

.sidebar .side-link,
.sidebar .sidebar-logout {
    min-height: var(--sidebar-control-height) !important;
    color: #d8e8f6 !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sidebar .side-link:hover,
.sidebar .sidebar-logout:hover {
    color: #ffffff !important;
    border-color: rgba(157, 205, 245, .14) !important;
    background: rgba(255, 255, 255, .075) !important;
    transform: none !important;
}

.sidebar .side-link.active {
    color: #ffffff !important;
    border-color: rgba(130, 194, 255, .30) !important;
    background: linear-gradient(135deg, rgba(74, 163, 255, .96), rgba(47, 128, 237, .92)) !important;
    box-shadow: 0 8px 20px rgba(3, 28, 58, .28) !important;
}

.sidebar .side-icon,
.sidebar .pwa-install-icon,
.sidebar .theme-toggle-icon,
.sidebar .offline-status-icon {
    border: 1px solid rgba(164, 207, 244, .12) !important;
    background: rgba(255, 255, 255, .07) !important;
    color: #89c8ff !important;
    box-shadow: none !important;
}

.sidebar .side-link.active .side-icon {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .15) !important;
}

.sidebar .nav-section-toggle {
    min-height: 40px;
    margin: 6px 0 2px;
    padding: 6px 9px 6px 10px;
    border: 1px solid transparent;
    border-radius: var(--sidebar-control-radius);
    color: var(--sidebar-muted) !important;
}

.sidebar .nav-section-toggle:hover {
    color: #dcecff !important;
    border-color: rgba(148, 196, 237, .12);
    background: rgba(255, 255, 255, .045);
}

.sidebar .nav-section-rule {
    background: #87bce9;
    opacity: .18;
}

.sidebar .nav-section-chevron {
    color: #b8d8f4;
    background: rgba(255, 255, 255, .07);
}

.sidebar .sidebar-utility-label.nav-section-toggle {
    margin-top: 4px;
    border-color: rgba(102, 177, 239, .12);
    background: rgba(74, 163, 255, .06);
}

.sidebar .sidebar-tools-section {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
) {
    box-sizing: border-box;
    width: 100% !important;
    min-height: var(--sidebar-tool-height) !important;
    height: var(--sidebar-tool-height) !important;
    margin: 0 !important;
    padding: 7px 9px !important;
    gap: 10px !important;
    border: 1px solid var(--sidebar-line) !important;
    border-radius: var(--sidebar-control-radius) !important;
    color: var(--sidebar-text) !important;
    background: rgba(255, 255, 255, .055) !important;
    box-shadow: none !important;
}

.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle
):hover,
.sidebar .sidebar-tools-panel-inner > .offline-status-control:hover {
    border-color: rgba(125, 190, 244, .22) !important;
    background: rgba(255, 255, 255, .09) !important;
    transform: none !important;
}

.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
) :is(.pwa-install-icon, .theme-toggle-icon, .offline-status-icon) {
    width: var(--sidebar-icon-size) !important;
    min-width: var(--sidebar-icon-size) !important;
    height: var(--sidebar-icon-size) !important;
    flex: 0 0 var(--sidebar-icon-size) !important;
    border-radius: 9px !important;
}

.sidebar .sidebar-tools-panel-inner .pwa-install-copy b,
.sidebar .sidebar-tools-panel-inner .theme-toggle-copy b,
.sidebar .sidebar-tools-panel-inner .offline-status-copy b {
    color: #f4f9ff !important;
    font-size: 12px;
}

.sidebar .sidebar-tools-panel-inner .pwa-install-copy small,
.sidebar .sidebar-tools-panel-inner .theme-toggle-copy small,
.sidebar .sidebar-tools-panel-inner .offline-status-copy small {
    color: #9db6ce !important;
    opacity: 1;
    font-size: 9px;
}

.sidebar .sidebar-tools-panel-inner .offline-sync-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border: 1px solid rgba(160, 205, 242, .14) !important;
    border-radius: 9px !important;
    color: #a7d4fa !important;
    background: rgba(255, 255, 255, .07) !important;
}

.sidebar .sidebar-mobile-footer > .sidebar-live-status {
    color: #c9dcef !important;
    border-color: var(--sidebar-line) !important;
    background: rgba(255, 255, 255, .045) !important;
}

.sidebar .sidebar-mobile-footer > .sidebar-logout {
    color: #ffffff !important;
    border-color: rgba(254, 202, 202, .28) !important;
    background: linear-gradient(135deg, var(--sidebar-danger), var(--sidebar-danger-dark)) !important;
    box-shadow: 0 10px 22px rgba(127, 29, 29, .24) !important;
}

.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .12) !important;
}

.sidebar .sidebar-mobile-footer > .sidebar-logout:hover {
    color: #ffffff !important;
    border-color: rgba(254, 202, 202, .42) !important;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    box-shadow: 0 12px 26px rgba(127, 29, 29, .32) !important;
}

/* Desktop compact rail: every control occupies the same centered 48px square. */
@media (min-width: 901px) {
    body:not(.print-view-body).sidebar-collapsed .sidebar {
        width: 76px !important;
        padding: 14px 10px 12px !important;
    }

    body:not(.print-view-body).sidebar-collapsed .app-main,
    body:not(.print-view-body).sidebar-collapsed .reviewer-portal-body .app-main {
        margin-left: 76px !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-section,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-section {
        box-sizing: border-box;
        width: 56px !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .nav-section-toggle {
        display: none !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .nav-section-items,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel,
    body:not(.print-view-body).sidebar-collapsed .sidebar .nav-section-items.is-collapsed,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel.is-collapsed {
        display: grid !important;
        width: 56px !important;
        grid-template-rows: 1fr !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar :is(.nav-section-items-inner, .sidebar-tools-panel-inner) {
        width: 56px !important;
        gap: 0 !important;
        overflow: visible !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .side-link,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-logout,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel-inner > :is(
        .pwa-install-sidebar,
        .pwa-refresh-sidebar,
        .sidebar-theme-toggle,
        .offline-status-control
    ) {
        box-sizing: border-box !important;
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        margin: 4px auto !important;
        padding: 0 !important;
        gap: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 14px !important;
        overflow: visible !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .side-link > :not(.side-icon):not(.notification-count),
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel-inner :is(
        .pwa-install-copy,
        .theme-toggle-copy,
        .offline-status-copy,
        .offline-status-count
    ),
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel-inner .offline-sync-button,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-live-status span,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-logout > span:not(.side-icon) {
        display: none !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .side-link :is(.side-icon),
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-logout .side-icon,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-tools-panel-inner > :is(
        .pwa-install-sidebar,
        .pwa-refresh-sidebar,
        .sidebar-theme-toggle,
        .offline-status-control
    ) :is(.pwa-install-icon, .theme-toggle-icon, .offline-status-icon) {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        margin: 0 !important;
        border-radius: 10px !important;
        font-size: 13px !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-logout {
        border-color: rgba(254, 202, 202, .28) !important;
        background: linear-gradient(135deg, var(--sidebar-danger), var(--sidebar-danger-dark)) !important;
        box-shadow: 0 8px 18px rgba(127, 29, 29, .28) !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon {
        border-color: transparent !important;
        background: transparent !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .notification-count:not([hidden]) {
        top: -3px !important;
        right: -3px !important;
        border-color: var(--sidebar-navy-900) !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-live-status {
        box-sizing: border-box !important;
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 5px auto !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 14px !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-mobile-footer > .sidebar-live-status i {
        margin: 0 !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-divider {
        width: 40px !important;
        margin: 7px auto !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-brand {
        width: 48px !important;
        min-width: 48px !important;
        height: 56px !important;
        min-height: 56px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        justify-content: center !important;
        border-color: transparent !important;
        background: transparent !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-brand::before {
        content: "";
        display: block !important;
        box-sizing: border-box;
        width: 40px;
        min-width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 1px solid rgba(146, 198, 239, .18);
        border-radius: 12px;
        background-color: #061424;
        background-image: url('../sidebar-mprm.png?v=20260904-v57');
        background-repeat: no-repeat;
        background-size: 70px 70px;
        background-position: center -6px;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-brand-logo,
    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-brand-copy {
        display: none !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-user {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 7px auto 9px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 14px !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .sidebar-user > .user-avatar {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        margin: 0 !important;
    }

    body:not(.print-view-body).sidebar-collapsed .sidebar .desktop-sidebar-toggle {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        top: 13px !important;
        right: -16px !important;
        border-radius: 10px !important;
    }
}


/* v67 hard overrides: app.css has high-specificity !important sidebar rules.
   Scope to #appSidebar so these user-requested colors and compact-logo rules win reliably. */
html body:not(.print-view-body) #appSidebar.sidebar,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar {
    --sidebar-v67-bg-top: #07111f;
    --sidebar-v67-bg-mid: #040c18;
    --sidebar-v67-bg-bottom: #020814;
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, .10), transparent 28%),
        linear-gradient(180deg, var(--sidebar-v67-bg-top) 0%, var(--sidebar-v67-bg-mid) 46%, var(--sidebar-v67-bg-bottom) 100%) !important;
    background-color: #020814 !important;
    border-right-color: rgba(125, 176, 220, .14) !important;
    box-shadow: 16px 0 38px rgba(0, 0, 0, .34) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand,
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-user {
    background: rgba(255, 255, 255, .035) !important;
    border-color: rgba(148, 193, 230, .12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link {
    color: #d9e8f6 !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link:hover {
    color: #ffffff !important;
    background: rgba(96, 165, 250, .10) !important;
    border-color: rgba(125, 184, 236, .15) !important;
}

/* Destructive action: force Logout red in both themes and both rail states. */
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout {
    color: #ffffff !important;
    border: 1px solid rgba(254, 202, 202, .28) !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%) !important;
    background-color: #dc2626 !important;
    box-shadow: 0 10px 22px rgba(127, 29, 29, .30) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout :is(.side-icon, span),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout :is(.side-icon, span) {
    color: #ffffff !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon {
    border-color: rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .12) !important;
    background-color: rgba(255, 255, 255, .12) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout:hover {
    border-color: rgba(254, 226, 226, .42) !important;
    background: linear-gradient(135deg, #f05252 0%, #dc2626 42%, #991b1b 100%) !important;
    background-color: #b91c1c !important;
    box-shadow: 0 12px 26px rgba(127, 29, 29, .40) !important;
}

@media (min-width: 901px) {
    /* Compact rail gets an even cleaner solid-dark treatment. */
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar {
        background:
            radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .08), transparent 18%),
            linear-gradient(180deg, #050d18 0%, #020814 100%) !important;
        background-color: #020814 !important;
        border-right-color: rgba(116, 167, 211, .13) !important;
    }

    /* Hide the full wordmark and render only the icon portion from the same source PNG. */
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand {
        position: relative !important;
        width: 48px !important;
        min-width: 48px !important;
        height: 52px !important;
        min-height: 52px !important;
        margin: 0 auto 3px !important;
        padding: 0 !important;
        display: grid !important;
        place-items: center !important;
        overflow: visible !important;
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand::before,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand::before {
        content: "" !important;
        display: block !important;
        box-sizing: border-box !important;
        width: 42px !important;
        height: 42px !important;
        border: 1px solid rgba(139, 190, 233, .16) !important;
        border-radius: 13px !important;
        background-color: #071426 !important;
        background-image: url('../sidebar-mprm.png?v=20260904-v57') !important;
        background-repeat: no-repeat !important;
        background-size: 72px 72px !important;
        background-position: center -2px !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .30) !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-logo,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-copy,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-logo,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-copy {
        display: none !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 5px auto 0 !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 14px !important;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%) !important;
        background-color: #dc2626 !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        border-color: transparent !important;
        background: transparent !important;
        background-color: transparent !important;
        color: #ffffff !important;
    }
}


/* v68 — exact sample navy, Lucide navigation icons, and corrected compact-rail alignment. */
html body:not(.print-view-body) #appSidebar.sidebar,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar {
    --sidebar-v68-bg: #0e2c4a;
    --sidebar-v68-surface: #123858;
    --sidebar-v68-surface-hover: #174365;
    --sidebar-v68-line: rgba(190, 218, 240, .14);
    --sidebar-v68-muted: #9db7cf;
    --sidebar-v68-text: #e9f3fb;
    --sidebar-v68-accent: #2f88d8;
    --sidebar-v68-accent-2: #42c7d9;

    background: #0e2c4a !important;
    background-color: #0e2c4a !important;
    border-right: 1px solid var(--sidebar-v68-line) !important;
    box-shadow: 14px 0 30px rgba(4, 20, 35, .24) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand,
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-user {
    background: rgba(255, 255, 255, .045) !important;
    border-color: var(--sidebar-v68-line) !important;
    box-shadow: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link {
    color: var(--sidebar-v68-text) !important;
    border: 1px solid transparent !important;
    background: transparent !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link:hover {
    color: #ffffff !important;
    border-color: rgba(190, 218, 240, .11) !important;
    background: var(--sidebar-v68-surface-hover) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active {
    color: #ffffff !important;
    border-color: rgba(111, 205, 236, .20) !important;
    background: linear-gradient(135deg, #17619a 0%, #167da8 100%) !important;
    box-shadow: inset 3px 0 0 #63d9e7, 0 7px 18px rgba(3, 23, 38, .18) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-icon {
    color: #cfe9fb !important;
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(190, 218, 240, .10) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--sidebar-v68-accent), var(--sidebar-v68-accent-2)) !important;
    border-color: rgba(255, 255, 255, .16) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-icon svg,
html body:not(.print-view-body) #appSidebar.sidebar .side-icon [data-lucide],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-icon svg,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-icon [data-lucide] {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 2.15 !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon {
    position: relative !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot {
    position: absolute !important;
    right: 4px !important;
    top: 4px !important;
    width: 6px !important;
    height: 6px !important;
    border: 1px solid #0e2c4a !important;
    border-radius: 999px !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle {
    color: var(--sidebar-v68-muted) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle:hover {
    color: #d9ebf9 !important;
    background: rgba(255,255,255,.045) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
) {
    color: var(--sidebar-v68-text) !important;
    border: 1px solid var(--sidebar-v68-line) !important;
    background: var(--sidebar-v68-surface) !important;
    box-shadow: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
):hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
    .pwa-install-sidebar,
    .pwa-refresh-sidebar,
    .sidebar-theme-toggle,
    .offline-status-control
):hover {
    background: var(--sidebar-v68-surface-hover) !important;
    border-color: rgba(190, 218, 240, .22) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-copy,
    .theme-toggle-copy,
    .offline-status-copy
) :is(b, small),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-copy,
    .theme-toggle-copy,
    .offline-status-copy
) :is(b, small) {
    color: inherit !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-icon,
    .theme-toggle-icon,
    .offline-status-icon
),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-icon,
    .theme-toggle-icon,
    .offline-status-icon
) {
    color: #cfe9fb !important;
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(190, 218, 240, .10) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-icon,
    .theme-toggle-icon,
    .offline-status-icon
) svg,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner :is(
    .pwa-install-icon,
    .theme-toggle-icon,
    .offline-status-icon
) svg {
    width: 17px !important;
    height: 17px !important;
}


html body:not(.print-view-body) #appSidebar.sidebar .nav-section-leading-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-leading-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    color: #b9d7eb;
    background: rgba(255,255,255,.055);
}
html body:not(.print-view-body) #appSidebar.sidebar .nav-section-leading-icon svg,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-leading-icon svg {
    width: 14px !important;
    height: 14px !important;
}

/* Logout remains the only destructive/red control. */
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout {
    color: #ffffff !important;
    border-color: rgba(255, 211, 211, .30) !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 56%, #b91c1c 100%) !important;
    box-shadow: 0 9px 20px rgba(94, 20, 20, .28) !important;
}

/* The literal mobile × must never leak into the desktop/collapsed rail. */
@media (min-width: 901px) {
    html body:not(.print-view-body) #appSidebar.sidebar .mobile-sidebar-close,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .mobile-sidebar-close {
        display: none !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar {
        width: 72px !important;
        padding: 12px 10px 12px !important;
        background: #0e2c4a !important;
        background-color: #0e2c4a !important;
    }

    html body:not(.print-view-body).sidebar-collapsed .app-main,
    html body:not(.print-view-body).sidebar-collapsed .reviewer-portal-body .app-main {
        margin-left: 72px !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand {
        position: relative !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 88px !important;
        min-height: 88px !important;
        margin: 0 auto 4px !important;
        padding: 0 !important;
        display: block !important;
        overflow: visible !important;
        background: transparent !important;
        border: 0 !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand::before,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 44px !important;
        height: 44px !important;
        border: 1px solid rgba(190, 218, 240, .16) !important;
        border-radius: 13px !important;
        background-color: #123858 !important;
        background-image: url('../sidebar-mprm.png?v=20260904-v57') !important;
        background-repeat: no-repeat !important;
        background-size: 76px 76px !important;
        background-position: center -4px !important;
        box-shadow: 0 6px 16px rgba(3, 20, 34, .22) !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-logo,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-copy,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-logo,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-brand-copy {
        display: none !important;
    }

    /* Center the real collapse/expand chevron below the logo, instead of hanging it off the rail. */
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .desktop-sidebar-toggle,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .desktop-sidebar-toggle {
        position: absolute !important;
        top: 52px !important;
        left: 50% !important;
        right: auto !important;
        width: 30px !important;
        min-width: 30px !important;
        height: 28px !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: translateX(-50%) !important;
        border: 1px solid rgba(190, 218, 240, .18) !important;
        border-radius: 9px !important;
        color: #d9edf9 !important;
        background: #123858 !important;
        box-shadow: none !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .desktop-sidebar-toggle:hover,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .desktop-sidebar-toggle:hover {
        transform: translateX(-50%) !important;
        background: #174365 !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-section,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-section,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-section,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-section {
        width: 52px !important;
        margin: 0 auto !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar :is(
        .nav-section-items,
        .sidebar-tools-panel,
        .nav-section-items-inner,
        .sidebar-tools-panel-inner
    ),
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar :is(
        .nav-section-items,
        .sidebar-tools-panel,
        .nav-section-items-inner,
        .sidebar-tools-panel-inner
    ) {
        width: 52px !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
        .pwa-install-sidebar,
        .pwa-refresh-sidebar,
        .sidebar-theme-toggle,
        .offline-status-control
    ),
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-panel-inner > :is(
        .pwa-install-sidebar,
        .pwa-refresh-sidebar,
        .sidebar-theme-toggle,
        .offline-status-control
    ) {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        margin: 4px auto !important;
        padding: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 13px !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-icon,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-panel-inner :is(
        .pwa-install-icon,
        .theme-toggle-icon,
        .offline-status-icon
    ),
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-icon,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-tools-panel-inner :is(
        .pwa-install-icon,
        .theme-toggle-icon,
        .offline-status-icon
    ) {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        margin: 0 !important;
        border-radius: 10px !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-user,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-live-status,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-user,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-live-status {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-divider,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-divider {
        width: 36px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* Sidebar polish v69 — white active state, priority Notifications, restrained motion. */
html body:not(.print-view-body) #appSidebar.sidebar .side-link,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-icon {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link:hover {
    transform: translateX(2px) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link:hover .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link:hover .side-icon {
    transform: scale(1.04) !important;
}

/* Active/current page is a clean white card against the navy shell. */
html body:not(.print-view-body) #appSidebar.sidebar .side-link.active,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active {
    color: #0e2c4a !important;
    border-color: rgba(255, 255, 255, .96) !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(1, 18, 32, .18) !important;
    transform: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active:hover,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active:hover {
    color: #0e2c4a !important;
    background: #ffffff !important;
    transform: translateX(1px) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon {
    color: #0e2c4a !important;
    background: rgba(14, 44, 74, .08) !important;
    border-color: rgba(14, 44, 74, .12) !important;
    box-shadow: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon svg,
html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon [data-lucide],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon svg,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon [data-lucide] {
    color: #0e2c4a !important;
    stroke: currentColor !important;
}

/* Notifications stays immediately below Dashboard and remains visually obvious when unread. */
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link.has-unread:not(.active),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link.has-unread:not(.active) {
    border-color: rgba(125, 211, 252, .16) !important;
    background: rgba(255, 255, 255, .045) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-count:not([hidden]),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-count:not([hidden]) {
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 2px solid #0e2c4a !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    background: #ef4444 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, .24) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-count:not([hidden]),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-count:not([hidden]) {
    border-color: #ffffff !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-side-icon #notificationLiveDot,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-side-icon #notificationLiveDot {
    border-color: #ffffff !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle,
html body:not(.print-view-body) #appSidebar.sidebar .nav-section-chevron,
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(.pwa-install-sidebar, .pwa-refresh-sidebar, .sidebar-theme-toggle, .offline-status-control),
html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .nav-section-chevron,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(.pwa-install-sidebar, .pwa-refresh-sidebar, .sidebar-theme-toggle, .offline-status-control),
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

@media (min-width: 901px) {
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link:hover,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link:hover {
        transform: translateY(-1px) !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link.active,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link.active {
        background: #ffffff !important;
        border-color: #ffffff !important;
    }

    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link.active .side-icon,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .side-link.active .side-icon {
        color: #0e2c4a !important;
        background: transparent !important;
        border-color: transparent !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body:not(.print-view-body) #appSidebar.sidebar *,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar * {
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        animation-duration: 0s !important;
        animation-iteration-count: 1 !important;
    }
}

/* Sidebar notification alignment v71 — remove legacy pseudo-icon collisions and keep bell/badges in dedicated layout cells. */
html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon {
    position: relative !important;
    box-sizing: border-box !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    flex: 0 0 34px !important;
    display: inline-grid !important;
    place-items: center !important;
    overflow: visible !important;
    font-size: inherit !important;
}

/* app.css previously draws another large dot through ::after; it sits on top of the Lucide bell. */
html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon::after,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon::after {
    content: none !important;
    display: none !important;
}

/* Reset the pre-Lucide <i> so the bell is centered even before Lucide replaces it with SVG. */
html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon > i[data-lucide="bell"],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon > i[data-lucide="bell"] {
    position: static !important;
    inset: auto !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon > svg,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon > svg {
    position: relative !important;
    z-index: 1 !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    transform: none !important;
}

/* The real live-connection dot is deliberately small and anchored to the icon corner. */
html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot {
    position: absolute !important;
    top: 3px !important;
    right: 3px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
    width: 7px !important;
    min-width: 7px !important;
    height: 7px !important;
    min-height: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border: 1.5px solid #0e2c4a !important;
    border-radius: 999px !important;
    background: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .12) !important;
    pointer-events: none !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot[data-state="live"],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot[data-state="live"] {
    background: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, .12) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot[data-state="fallback"],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .notification-side-icon #notificationLiveDot[data-state="fallback"] {
    background: #38bdf8 !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, .12) !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-side-icon #notificationLiveDot,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active .notification-side-icon #notificationLiveDot {
    border-color: #ffffff !important;
}

/* Expanded desktop: icon, label and unread count each get their own column. */
@media (min-width: 901px) {
    html body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link,
    html[data-theme="dark"] body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link {
        display: grid !important;
        grid-template-columns: 34px minmax(0, 1fr) max-content !important;
        align-items: center !important;
        column-gap: 10px !important;
    }

    html body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .notification-side-icon,
    html[data-theme="dark"] body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .notification-side-icon {
        grid-column: 1 !important;
        justify-self: start !important;
    }

    html body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .side-link-label,
    html[data-theme="dark"] body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .side-link-label {
        grid-column: 2 !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    html body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .notification-count:not([hidden]),
    html[data-theme="dark"] body:not(.print-view-body):not(.sidebar-collapsed) #appSidebar.sidebar .sidebar-notifications-link .notification-count:not([hidden]) {
        position: static !important;
        grid-column: 3 !important;
        justify-self: end !important;
        margin: 0 !important;
    }

    /* In the compact rail, the unread-count badge is enough; hide the tiny live dot to avoid badge-on-badge collision. */
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-notifications-link .notification-side-icon #notificationLiveDot,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar .sidebar-notifications-link .notification-side-icon #notificationLiveDot {
        display: none !important;
    }
}

/* MPRM V54 authoritative mobile drawer — neutralizes legacy phone sidebar layouts. */
.sidebar-mobile-scroll,
.sidebar-mobile-footer {
    display: contents;
}

@media (max-width: 900px) {
    :root {
        --mprm-mobile-nav-height: 72px;
        --mprm-mobile-drawer-width: min(90vw, 340px);
        --mprm-mobile-drawer-line: rgba(190, 218, 240, .14);
        --mprm-mobile-drawer-muted: #9fb8cd;
        --mprm-mobile-drawer-text: #e9f3fb;
    }

    html body:not(.print-view-body) {
        padding-bottom: calc(var(--mprm-mobile-nav-height) + 22px + env(safe-area-inset-bottom)) !important;
    }

    html body:not(.print-view-body).sidebar-open {
        overflow: hidden !important;
        overscroll-behavior: none !important;
        touch-action: none !important;
    }

    /* Bottom app dock. */
    html body:not(.print-view-body) .mobile-app-nav {
        position: fixed !important;
        z-index: 985 !important;
        left: max(10px, env(safe-area-inset-left)) !important;
        right: max(10px, env(safe-area-inset-right)) !important;
        bottom: max(10px, env(safe-area-inset-bottom)) !important;
        display: grid !important;
        grid-template-columns: repeat(var(--mobile-tab-count, 5), minmax(0, 1fr)) !important;
        align-items: stretch !important;
        gap: 4px !important;
        min-height: var(--mprm-mobile-nav-height) !important;
        padding: 6px !important;
        border: 1px solid rgba(186, 218, 243, .16) !important;
        border-radius: 22px !important;
        background: rgba(14, 44, 74, .97) !important;
        box-shadow: 0 16px 42px rgba(3, 20, 35, .34) !important;
        backdrop-filter: blur(18px) saturate(135%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
        overflow: hidden !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab,
    html body:not(.print-view-body) .mobile-app-nav .mobile-sidebar-toggle.mobile-app-more {
        position: relative !important;
        inset: auto !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
        margin: 0 !important;
        padding: 6px 2px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        border: 0 !important;
        border-radius: 16px !important;
        color: #a9c3d9 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-decoration: none !important;
        font: inherit !important;
        text-align: center !important;
        cursor: pointer !important;
        transform: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab.active,
    html body:not(.print-view-body) .mobile-app-nav .mobile-sidebar-toggle.mobile-app-more.active {
        color: #0e2c4a !important;
        background: #ffffff !important;
        box-shadow: 0 7px 18px rgba(2, 17, 30, .22) !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon,
    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon-wrap {
        box-sizing: border-box !important;
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        flex: 0 0 28px !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon {
        display: inline-grid !important;
        place-items: center !important;
        border: 1px solid rgba(190, 218, 240, .10) !important;
        border-radius: 9px !important;
        color: inherit !important;
        background: rgba(255, 255, 255, .07) !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon-wrap {
        position: relative !important;
        display: inline-grid !important;
        place-items: center !important;
        overflow: visible !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab.active .mobile-app-tab-icon,
    html body:not(.print-view-body) .mobile-app-nav .mobile-app-more.active .mobile-app-tab-icon {
        color: #ffffff !important;
        border-color: transparent !important;
        background: #0e2c4a !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon svg,
    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-icon [data-lucide] {
        width: 17px !important;
        height: 17px !important;
        stroke-width: 2.2 !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-label {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        color: inherit !important;
        font-size: 9.5px !important;
        font-weight: 750 !important;
        line-height: 1.05 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-badge {
        position: absolute !important;
        z-index: 3 !important;
        top: -5px !important;
        right: -11px !important;
        min-width: 17px !important;
        height: 17px !important;
        padding: 0 4px !important;
        display: inline-grid !important;
        place-items: center !important;
        border: 2px solid #0e2c4a !important;
        border-radius: 999px !important;
        color: #ffffff !important;
        background: #ef4444 !important;
        font-size: 7.5px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
    }

    html body:not(.print-view-body).sidebar-open .mobile-app-nav {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(calc(100% + 28px)) !important;
    }

    /* Drawer overlay. */
    html body:not(.print-view-body) .mobile-sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        z-index: 990 !important;
        display: block !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        background: rgba(2, 12, 23, .60) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        transition: opacity .2s ease, visibility .2s ease !important;
    }

    html body:not(.print-view-body).sidebar-open .mobile-sidebar-overlay {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* One authoritative drawer shell. */
    html body:not(.print-view-body) #appSidebar.sidebar,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar,
    html body:not(.print-view-body).sidebar-collapsed #appSidebar.sidebar {
        position: fixed !important;
        z-index: 1000 !important;
        inset: 0 auto 0 0 !important;
        box-sizing: border-box !important;
        width: var(--mprm-mobile-drawer-width) !important;
        min-width: 0 !important;
        max-width: 340px !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: max(10px, env(safe-area-inset-top)) 10px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        border: 0 !important;
        border-right: 1px solid var(--mprm-mobile-drawer-line) !important;
        border-radius: 0 24px 24px 0 !important;
        background: radial-gradient(circle at 8% 0%, rgba(66,199,217,.10), transparent 24%), linear-gradient(180deg, #123858 0%, #0e2c4a 46%, #081f35 100%) !important;
        box-shadow: 20px 0 48px rgba(2, 13, 24, .38) !important;
        opacity: 1 !important;
        transform: translate3d(calc(-100% - 24px), 0, 0) !important;
        transition: transform .24s cubic-bezier(.2,.75,.25,1) !important;
    }

    html body:not(.print-view-body).sidebar-open #appSidebar.sidebar,
    html[data-theme="dark"] body:not(.print-view-body).sidebar-open #appSidebar.sidebar {
        transform: translate3d(0, 0, 0) !important;
    }

    /* Remove the legacy bottom-sheet drag handle: this is a left drawer, not a sheet. */
    html body:not(.print-view-body) #appSidebar.sidebar::before,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar::before {
        content: none !important;
        display: none !important;
    }

    /* Fixed brand header. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand {
        position: relative !important;
        top: auto !important;
        z-index: 4 !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 64px !important;
        margin: 0 0 8px !important;
        padding: 9px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        flex: 0 0 auto !important;
        border: 1px solid rgba(190, 218, 240, .12) !important;
        border-radius: 16px !important;
        background: rgba(9, 35, 59, .88) !important;
        box-shadow: none !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand-logo {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px !important;
        object-fit: contain !important;
        border-radius: 11px !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand-copy {
        min-width: 0 !important;
        display: block !important;
        flex: 1 1 auto !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-brand-copy strong {
        display: block !important;
        color: #ffffff !important;
        font-size: 17px !important;
        line-height: 1.05 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-system-name {
        display: block !important;
        margin-top: 4px !important;
        overflow: hidden !important;
        color: #aac2d6 !important;
        font-size: 9.5px !important;
        line-height: 1.15 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .desktop-sidebar-toggle {
        display: none !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .mobile-sidebar-close {
        box-sizing: border-box !important;
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        margin: 0 0 0 auto !important;
        padding: 0 !important;
        display: inline-grid !important;
        place-items: center !important;
        flex: 0 0 40px !important;
        border: 1px solid rgba(190, 218, 240, .16) !important;
        border-radius: 12px !important;
        color: #e9f3fb !important;
        background: rgba(255,255,255,.07) !important;
        box-shadow: none !important;
        font-size: 0 !important;
        cursor: pointer !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .mobile-sidebar-close svg {
        width: 19px !important;
        height: 19px !important;
        stroke-width: 2.2 !important;
    }

    /* Only the center region scrolls. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-scroll {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(190,218,240,.24) transparent !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 2px 10px 0 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-scroll::-webkit-scrollbar {
        width: 4px !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-scroll::-webkit-scrollbar-thumb {
        border-radius: 999px !important;
        background: rgba(190,218,240,.24) !important;
    }

    /* Compact account card. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user {
        box-sizing: border-box !important;
        width: calc(100% - 4px) !important;
        min-height: 58px !important;
        margin: 0 2px 8px !important;
        padding: 9px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        flex: 0 0 auto !important;
        border: 1px solid rgba(190,218,240,.11) !important;
        border-radius: 14px !important;
        background: rgba(255,255,255,.045) !important;
        box-shadow: none !important;
        text-align: left !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user > .user-avatar {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        border-radius: 11px !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user-copy {
        min-width: 0 !important;
        display: block !important;
        flex: 1 1 auto !important;
        text-align: left !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-user-copy strong {
        display: block !important;
        overflow: hidden !important;
        color: #ffffff !important;
        font-size: 12.5px !important;
        line-height: 1.15 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .mprm-role-chip {
        display: inline-flex !important;
        max-width: 100% !important;
        margin-top: 4px !important;
        padding: 3px 7px !important;
        overflow: hidden !important;
        border: 1px solid rgba(64, 190, 222, .18) !important;
        border-radius: 999px !important;
        color: #b9d7eb !important;
        background: rgba(16, 132, 170, .10) !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-divider {
        width: calc(100% - 12px) !important;
        height: 1px !important;
        margin: 6px auto 9px !important;
        flex: 0 0 auto !important;
        border: 0 !important;
        background: rgba(190,218,240,.13) !important;
    }

    /* Primary and grouped navigation are always horizontal rows. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-nav {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
        padding: 0 2px 4px !important;
        overflow: visible !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link,
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-logout {
        position: relative !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 48px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 7px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        border: 1px solid transparent !important;
        border-radius: 12px !important;
        color: var(--mprm-mobile-drawer-text) !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        text-align: left !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-decoration: none !important;
        white-space: normal !important;
        overflow: hidden !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-nav > .side-link {
        border-color: rgba(190,218,240,.09) !important;
        background: rgba(255,255,255,.035) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link:hover,
    html body:not(.print-view-body) #appSidebar.sidebar .side-link:active {
        color: #ffffff !important;
        border-color: rgba(190,218,240,.16) !important;
        background: rgba(255,255,255,.075) !important;
        transform: none !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link.active,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .side-link.active {
        color: #ffffff !important;
        border-color: rgba(99,217,231,.22) !important;
        background: rgba(255,255,255,.11) !important;
        box-shadow: inset 3px 0 0 #63d9e7, 0 5px 14px rgba(2,17,30,.12) !important;
        transform: none !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link > span:not(.side-icon):not(.notification-count),
    html body:not(.print-view-body) #appSidebar.sidebar .side-link-label {
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        display: block !important;
        flex: 1 1 auto !important;
        overflow: hidden !important;
        color: inherit !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-icon {
        box-sizing: border-box !important;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        display: inline-grid !important;
        place-items: center !important;
        margin: 0 !important;
        border: 1px solid rgba(190,218,240,.10) !important;
        border-radius: 10px !important;
        color: #cfe9fb !important;
        background: rgba(255,255,255,.065) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link.active .side-icon {
        color: #dff8fb !important;
        border-color: rgba(99,217,231,.18) !important;
        background: rgba(99,217,231,.10) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-icon svg,
    html body:not(.print-view-body) #appSidebar.sidebar .side-icon [data-lucide] {
        width: 17px !important;
        height: 17px !important;
        stroke-width: 2.15 !important;
    }

    /* Notifications: icon | text | badge with no overlap. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link {
        display: grid !important;
        grid-template-columns: 34px minmax(0,1fr) max-content !important;
        align-items: center !important;
        column-gap: 10px !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link .notification-side-icon {
        grid-column: 1 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link .side-link-label {
        grid-column: 2 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-notifications-link .notification-count:not([hidden]) {
        position: static !important;
        grid-column: 3 !important;
        justify-self: end !important;
        min-width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        padding: 0 6px !important;
        display: inline-grid !important;
        place-items: center !important;
        border: 2px solid #0e2c4a !important;
        border-radius: 999px !important;
        color: #ffffff !important;
        background: #ef4444 !important;
        font-size: 9px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
    }

    /* Section separators and carded link groups. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-section,
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-section {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 9px 0 0 !important;
        padding-top: 9px !important;
        border-top: 1px solid rgba(190,218,240,.12) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-toggle {
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 36px !important;
        margin: 0 0 5px !important;
        padding: 4px 6px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        border: 0 !important;
        border-radius: 10px !important;
        color: #a8c3d8 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: left !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-leading-icon {
        width: 26px !important;
        min-width: 26px !important;
        height: 26px !important;
        flex: 0 0 26px !important;
        display: inline-grid !important;
        place-items: center !important;
        border-radius: 8px !important;
        color: #c5deef !important;
        background: rgba(255,255,255,.055) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-title {
        min-width: 0 !important;
        flex: 0 1 auto !important;
        overflow: hidden !important;
        color: inherit !important;
        font-size: 9.5px !important;
        font-weight: 850 !important;
        letter-spacing: .075em !important;
        line-height: 1.1 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-rule {
        height: 1px !important;
        min-width: 10px !important;
        flex: 1 1 auto !important;
        background: #8ebbd8 !important;
        opacity: .14 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-chevron {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
        flex: 0 0 24px !important;
        border-radius: 8px !important;
        background: rgba(255,255,255,.055) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-items-inner {
        box-sizing: border-box !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 4px !important;
        border: 1px solid rgba(190,218,240,.10) !important;
        border-radius: 14px !important;
        background: rgba(3, 21, 37, .16) !important;
        overflow: hidden !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-items-inner > .side-link {
        min-height: 46px !important;
        border: 0 !important;
        border-radius: 10px !important;
        background: transparent !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-items-inner > .side-link:not(:last-child) {
        box-shadow: inset 0 -1px 0 rgba(190, 218, 240, .09) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .nav-section-items-inner > .side-link.active {
        background: rgba(255,255,255,.105) !important;
        box-shadow: inset 3px 0 0 #63d9e7 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-global-link {
        margin-top: 9px !important;
        border-color: rgba(190,218,240,.10) !important;
        background: rgba(255,255,255,.035) !important;
    }

    /* Tools use the same compact horizontal rhythm. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner {
        box-sizing: border-box !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 4px !important;
        border: 1px solid rgba(190,218,240,.10) !important;
        border-radius: 14px !important;
        background: rgba(3,21,37,.16) !important;
        overflow: hidden !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(.pwa-install-sidebar,.pwa-refresh-sidebar,.sidebar-theme-toggle,.offline-status-control) {
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 48px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 7px 9px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        border: 0 !important;
        border-radius: 10px !important;
        color: #e7f2fa !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: left !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-tools-panel-inner > :is(.pwa-install-sidebar,.pwa-refresh-sidebar,.sidebar-theme-toggle,.offline-status-control):not(:last-child) {
        box-shadow: inset 0 -1px 0 rgba(190, 218, 240, .09) !important;
    }

    /* Fixed footer: status and logout can never be pushed below the viewport. */
    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer {
        box-sizing: border-box !important;
        width: 100% !important;
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: column !important;
        gap: 7px !important;
        margin: 0 !important;
        padding: 9px 2px max(8px, env(safe-area-inset-bottom)) !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
        border-top: 1px solid rgba(190,218,240,.13) !important;
        background: #081f35 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-live-status {
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 40px !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex: 0 0 40px !important;
        border: 1px solid rgba(190,218,240,.10) !important;
        border-radius: 11px !important;
        color: #c8dcec !important;
        background: rgba(255,255,255,.04) !important;
        box-shadow: none !important;
        font-size: 10px !important;
        overflow: hidden !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-live-status span {
        min-width: 0 !important;
        overflow: hidden !important;
        color: inherit !important;
        line-height: 1.2 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout,
    html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 52px !important;
        height: 52px !important;
        margin: 0 !important;
        padding: 7px 14px !important;
        display: flex !important;
        flex: 0 0 52px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        overflow: visible !important;
        border: 1px solid rgba(254,202,202,.32) !important;
        border-radius: 14px !important;
        color: #ffffff !important;
        background: linear-gradient(135deg,#ef4444 0%,#dc2626 58%,#b91c1c 100%) !important;
        box-shadow: 0 8px 18px rgba(94,20,20,.28) !important;
        text-align: center !important;
        text-decoration: none !important;
        line-height: 1 !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout .side-icon {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
        color: #ffffff !important;
        border-color: rgba(255,255,255,.16) !important;
        background: rgba(255,255,255,.11) !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .sidebar-mobile-footer > .sidebar-logout > span:last-child {
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        display: inline-block !important;
        flex: 0 0 auto !important;
        overflow: visible !important;
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: 850 !important;
        line-height: 1.1 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    html body:not(.print-view-body) #appSidebar.sidebar .side-link.mobile-only {
        display: none !important;
    }

    html body:not(.print-view-body) .app-main,
    html body:not(.print-view-body).sidebar-collapsed .app-main,
    html body:not(.print-view-body) .reviewer-portal-body .app-main {
        width: 100% !important;
        margin-left: 0 !important;
        padding-bottom: calc(var(--mprm-mobile-nav-height) + 42px + env(safe-area-inset-bottom)) !important;
    }

    html body:not(.print-view-body) .page-content,
    html body:not(.print-view-body) .reviewer-page-content {
        padding-bottom: calc(var(--mprm-mobile-nav-height) + 52px + env(safe-area-inset-bottom)) !important;
    }

    html body:not(.print-view-body) .live-notification-toast {
        bottom: calc(var(--mprm-mobile-nav-height) + 28px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 380px) {
    :root { --mprm-mobile-drawer-width: min(92vw, 326px); }
    html body:not(.print-view-body) .mobile-app-nav {
        left: max(6px, env(safe-area-inset-left)) !important;
        right: max(6px, env(safe-area-inset-right)) !important;
        gap: 2px !important;
        padding: 5px !important;
        border-radius: 19px !important;
    }
    html body:not(.print-view-body) .mobile-app-nav .mobile-app-tab-label { font-size: 8.5px !important; }
    html body:not(.print-view-body) #appSidebar.sidebar { border-radius: 0 20px 20px 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
    html body:not(.print-view-body) .mobile-app-nav,
    html body:not(.print-view-body) .mobile-sidebar-overlay,
    html body:not(.print-view-body) #appSidebar.sidebar {
        transition-duration: .01ms !important;
        animation: none !important;
    }
}

/* V61.6 connection-state colors load after all sidebar refinements. */
html body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="checking"],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="checking"] {
    border-color: #bfdbfe !important;
    background: #dbeafe !important;
    color: #102033 !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="unavailable"],
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="unavailable"] {
    border-color: #f6cf70 !important;
    background: #fff1c7 !important;
    color: #3f2d08 !important;
}

html body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="checking"] .offline-status-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="checking"] .offline-status-icon {
    border-color: #93c5fd !important;
    background: #bfdbfe !important;
    color: #075985 !important;
    animation: offline-status-spin 1s linear infinite;
}

html body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="unavailable"] .offline-status-icon,
html[data-theme="dark"] body:not(.print-view-body) #appSidebar.sidebar .offline-status-control[data-connection-state="unavailable"] .offline-status-icon {
    border-color: #f4c64f !important;
    background: #fde7a3 !important;
    color: #795200 !important;
}
