/* NevoMD ESBA-style workspace prototype v2
   IMPORTANT: this stylesheet changes shell/navigation/layout only. It deliberately
   leaves each clinical page's original DOM structure and functional controls intact. */

:root {
    --nvx-ws-page-bg: #e3e7eb;
    --nvx-ws-panel: #ffffff;
    --nvx-ws-panel-soft: #f7f9fc;
    --nvx-ws-panel-head: #eef4f9;
    --nvx-ws-line: #d7e1ea;
    --nvx-ws-line-strong: #c5d1dd;
    --nvx-ws-divider: #a8b1ba;
    --nvx-ws-text: #172331;
    --nvx-ws-muted: #5e6c7b;
    --nvx-ws-blue: #1b75b8;
    --nvx-ws-blue-hover: #0a4f86;
    --nvx-ws-green: #2e8a5b;
    --nvx-ws-disabled: #9aa6b2;
    --nvx-ws-shadow: 0 8px 28px rgba(25,54,83,.08);
}

body.nvx-workspace-shell-enabled {
    background: var(--nvx-ws-page-bg) !important;
}

/* Internal workspace pages use the left navigation only. */
body.nvx-workspace-shell-enabled header.header .nvx-workspace-navigation,
body.nvx-workspace-shell-enabled header.header .nvx-shared-navigation.is-logged-in .nvx-workspace-navigation,
body.nvx-workspace-shell-enabled header.header .dx-nav-footer {
    display: none !important;
}

/* Old tab controls stay in the DOM for their JavaScript controllers but are not shown. */
body.nvx-workspace-shell-enabled #dashboardTabsToolbar,
body.nvx-workspace-shell-enabled #tabsToolbar,
body.nvx-workspace-shell-enabled #nvxPageCaseContext,
body.nvx-workspace-shell-enabled .nvx-page-case-context,
body.nvx-workspace-shell-enabled .nvx-patient-name-banner-wrapper {
    display: none !important;
}

body.nvx-workspace-shell-enabled .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled .nvx-workspace-layout {
    width: calc(100% - 32px) !important;
    max-width: none !important;
    min-height: calc(100vh - 130px);
    margin: 0 16px !important;
    padding: 26px 0 64px !important;
    display: grid !important;
    grid-template-columns: 230px 2px minmax(0, 1180px) !important;
    gap: 18px !important;
    align-items: start !important;
    justify-content: start !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* The existing app-page-content itself becomes the parent white content card.
   Nothing inside it is re-parented, which preserves legacy async initialization. */
body.nvx-workspace-shell-enabled .app-page-content.nvx-workspace-main,
body.nvx-workspace-shell-enabled .nvx-workspace-main {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 !important;
    padding: 0 0 22px !important;
    justify-self: start !important;
    background: var(--nvx-ws-panel) !important;
    border: 1px solid #dbe4ed !important;
    border-radius: 17px !important;
    box-shadow: var(--nvx-ws-shadow) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.nvx-workspace-inline-head {
    padding: 20px 22px 12px;
    border-bottom: 1px solid #edf1f5;
    box-sizing: border-box;
}
.nvx-workspace-inline-head h2 {
    margin: 0;
    color: var(--nvx-ws-text);
    font-size: 20px;
    letter-spacing: -.02em;
}
.nvx-workspace-inline-head p {
    margin: 7px 0 0;
    color: var(--nvx-ws-muted);
    font-size: 12px;
    line-height: 1.55;
}
.nvx-workspace-card-case {
    display: none;
    margin-top: 9px;
    color: #506779;
    font-size: 16.5px;
}
.nvx-workspace-card-case.is-visible { display: block; }
.nvx-workspace-card-case b { color: #172331; }
.nvx-workspace-card-case span { color: #0e67aa; }

.nvx-workspace-sidebar {
    position: sticky;
    top: 18px;
    border: 1px solid var(--nvx-ws-line);
    border-radius: 12px;
    background: var(--nvx-ws-panel-soft);
    box-shadow: 0 6px 22px rgba(25,54,83,.07);
    overflow: hidden;
    box-sizing: border-box;
    z-index: 20;
}

/* Mobile workspace controls are hidden on desktop. */
.nvx-workspace-mobile-nav,
.nvx-workspace-mobile-overlay,
.nvx-workspace-mobile-drawer-close {
    display: none;
}

.nvx-workspace-sidebar-head {
    padding: 15px 16px 11px;
    border-bottom: 1px solid #dbe4ed;
    background: var(--nvx-ws-panel-head);
}
.nvx-workspace-sidebar-head strong {
    display: block;
    color: #183a59;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.nvx-workspace-selected-case {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d5e0e9;
    color: #597084;
    font-size: 13.5px;
    line-height: 1.35;
}
.nvx-workspace-selected-case.is-visible { display: block; }
.nvx-workspace-selected-case b { color: #183a59; font-weight: 850; }
.nvx-workspace-selected-case span { color: #0e67aa; font-weight: 750; }

.nvx-workspace-side-group {
    padding: 10px;
    border-bottom: 1px solid #e3e9ef;
}
.nvx-workspace-side-group:last-child { border-bottom: 0; }
.nvx-workspace-side-label {
    padding: 2px 7px 7px;
    color: #77899a;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.nvx-workspace-side-nav { display: grid; gap: 5px; }

.nvx-workspace-side-item,
.nvx-workspace-side-parent {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #263f56;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    box-sizing: border-box;
    text-decoration: none;
}
.nvx-workspace-side-item:hover:not(:disabled),
.nvx-workspace-side-parent:hover:not(:disabled) {
    background: var(--nvx-ws-blue-hover);
    border-color: var(--nvx-ws-blue-hover);
    color: #ffffff;
}
.nvx-workspace-side-item:hover:not(:disabled) .nvx-workspace-nav-dot,
.nvx-workspace-side-parent:hover:not(:disabled) .nvx-workspace-nav-dot {
    background: #ffffff;
}
.nvx-workspace-side-parent:hover:not(:disabled) .nvx-workspace-chevron {
    color: #ffffff;
}
.nvx-workspace-side-item.is-active {
    background: var(--nvx-ws-blue);
    border-color: var(--nvx-ws-blue);
    color: #fff;
}
.nvx-workspace-side-item.is-active:hover:not(:disabled) {
    background: var(--nvx-ws-blue-hover);
    border-color: var(--nvx-ws-blue-hover);
    color: #ffffff;
}
.nvx-workspace-nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nvx-ws-green);
    flex: 0 0 auto;
}
.nvx-workspace-side-item.is-active .nvx-workspace-nav-dot { background: #fff; }
.nvx-workspace-side-item:disabled,
.nvx-workspace-side-parent:disabled {
    color: var(--nvx-ws-disabled);
    cursor: default;
    opacity: .72;
}
.nvx-workspace-side-item:disabled .nvx-workspace-nav-dot,
.nvx-workspace-side-parent:disabled .nvx-workspace-nav-dot { background: #aab3bc; }
.nvx-workspace-side-parent { justify-content: flex-start; }
.nvx-workspace-side-parent .nvx-workspace-chevron {
    margin-left: auto;
    color: #6c8092;
    font-size: 11px;
    transform: rotate(90deg);
    transition: transform 120ms ease;
}
.nvx-workspace-side-parent.is-collapsed .nvx-workspace-chevron { transform: rotate(0deg); }
.nvx-workspace-subnav {
    display: grid;
    gap: 4px;
    margin: 2px 0 4px 16px;
    padding-left: 10px;
    border-left: 1px solid #d4dee7;
}
.nvx-workspace-subnav[hidden] { display: none !important; }
.nvx-workspace-subnav .nvx-workspace-side-item {
    min-height: 34px;
    padding-left: 9px;
    font-size: 10px;
    font-weight: 760;
}
.nvx-workspace-subnav .nvx-workspace-nav-dot { width: 6px; height: 6px; }
.nvx-workspace-vertical-divider {
    width: 2px;
    min-height: 100%;
    align-self: stretch;
    margin-top: -26px;
    margin-bottom: -64px;
    background: var(--nvx-ws-divider);
    border-radius: 2px;
}

/* Remove legacy fixed-nav spacing inside the new shell. */
body.nvx-workspace-shell-enabled.dashboard-page .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled.newpatient-page .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled.research-page .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled.support-page .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled.doctors-page .app-page-shell.nvx-workspace-layout,
body.nvx-workspace-shell-enabled.medicationreview-page .app-page-shell.nvx-workspace-layout {
    margin-top: 0 !important;
}

/* Keep dashboard's original Cases controls intact and visible once its own loader is ready. */
body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients {
    position: static !important;
    width: 100% !important;
}
body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients #patientToolbar {
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    body.nvx-workspace-shell-enabled .app-page-shell.nvx-workspace-layout,
    body.nvx-workspace-shell-enabled .nvx-workspace-layout {
        width: calc(100% - 22px) !important;
        margin-left: 11px !important;
        margin-right: 11px !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding-top: 16px !important;
    }

    .nvx-workspace-mobile-nav {
        position: sticky;
        top: 8px;
        z-index: 96;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        min-height: 48px;
        width: 100%;
        padding: 6px 8px;
        background: rgba(255,255,255,.97);
        border: 1px solid var(--nvx-ws-line);
        border-radius: 11px;
        box-shadow: 0 5px 18px rgba(25,54,83,.10);
        box-sizing: border-box;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .nvx-workspace-mobile-menu-button {
        appearance: none;
        -webkit-appearance: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 98px;
        min-height: 36px;
        margin: 0;
        padding: 0 13px;
        border: 1px solid #15589a;
        border-radius: 8px;
        background: #176eb4;
        color: #ffffff;
        font: inherit;
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px rgba(15,53,91,.16);
    }

    .nvx-workspace-mobile-menu-button:active {
        background: #0e5d9f;
    }

    .nvx-workspace-mobile-menu-button:focus-visible {
        outline: 3px solid rgba(27,117,184,.25);
        outline-offset: 2px;
    }

    .nvx-workspace-mobile-menu-icon {
        font-size: 17px;
        line-height: 1;
    }

    .nvx-workspace-mobile-page-label {
        display: none;
        min-width: 0;
        flex: 1 1 auto;
        color: #183a59;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.2;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nvx-workspace-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(360px, 86vw) !important;
        max-width: 360px !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 14px 14px 0 !important;
        box-shadow: 10px 0 34px rgba(15,31,48,.24) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        transform: translateX(calc(-100% - 14px));
        transition: transform 180ms ease;
        z-index: 100002 !important;
    }

    body.nvx-workspace-mobile-drawer-open .nvx-workspace-sidebar {
        transform: translateX(0);
    }

    .nvx-workspace-mobile-drawer-close {
        appearance: none;
        -webkit-appearance: none;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        margin: 0;
        padding: 0;
        border: 1px solid #c6d3df;
        border-radius: 7px;
        background: #ffffff;
        color: #183a59;
        font-family: Arial, sans-serif;
        font-size: 23px;
        font-weight: 500;
        line-height: 1;
        cursor: pointer;
    }

    .nvx-workspace-mobile-drawer-close:focus-visible {
        outline: 3px solid rgba(27,117,184,.25);
        outline-offset: 2px;
    }

    .nvx-workspace-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 100001;
        display: block;
        background: rgba(15,31,48,.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.nvx-workspace-mobile-drawer-open .nvx-workspace-mobile-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    body.nvx-workspace-mobile-drawer-open {
        overflow: hidden !important;
    }

    /* Keep the drawer header above the scrolling menu contents and above the
       site's fixed header/status strip. */
    .nvx-workspace-sidebar .nvx-workspace-sidebar-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 3 !important;
    }

    .nvx-workspace-vertical-divider { display: none; }
    .nvx-workspace-side-nav { grid-template-columns: 1fr; }
    .nvx-workspace-subnav {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        margin-left: 10px;
        margin-right: 10px;
    }
    .nvx-workspace-inline-head { padding: 17px 17px 11px; }
}

@media (max-width: 560px) {
    .nvx-workspace-side-nav,
    .nvx-workspace-subnav { grid-template-columns: 1fr; }
    .nvx-workspace-sidebar {
        width: min(360px, 90vw) !important;
    }
    .nvx-workspace-mobile-nav {
        min-height: 46px;
        padding: 5px 7px;
    }
    .nvx-workspace-mobile-menu-button {
        min-width: 92px;
        min-height: 34px;
        padding-left: 11px;
        padding-right: 11px;
    }
    .nvx-workspace-mobile-page-label {
        font-size: 12px;
    }
    .nvx-workspace-sidebar-head { padding: 13px 14px 10px; }
    body.nvx-workspace-shell-enabled .app-page-content.nvx-workspace-main,
    body.nvx-workspace-shell-enabled .nvx-workspace-main { border-radius: 12px !important; }
    .nvx-workspace-inline-head h2 { font-size: 18px; }
}

/* ===========================================================
   NevoMD ESBA-style workspace refinement v5
   - compact clinical header with status strip
   - auth relocated into the NevoMD Menu header
   - guaranteed white parent workspace card
   - light-gray inner functional panels
   =========================================================== */

/* Internal application header: logo/hamburger at left, status strip in the
   newly freed horizontal space. The old desktop top navigation stays hidden. */
body.nvx-workspace-shell-enabled header.header {
    height: 102px !important;
    min-height: 102px !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
}

body.nvx-workspace-shell-enabled header.header .header-container {
    height: 102px !important;
    min-height: 102px !important;
    position: relative !important;
    overflow: visible !important;
}

body.nvx-workspace-shell-enabled header.header .left-title {
    height: 102px !important;
    min-height: 102px !important;
    position: relative !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Approximately 40% smaller than the current internal-page wordmark. */
body.nvx-workspace-shell-enabled header.header .logo-link-brand {
    position: absolute !important;
    left: 52px !important;
    top: 11px !important;
    display: block !important;
    width: 215px !important;
    max-width: 215px !important;
    height: auto !important;
    margin: 0 !important;
}

body.nvx-workspace-shell-enabled header.header .logo-link-brand .header-logo-wordmark {
    display: block !important;
    width: 215px !important;
    max-width: 215px !important;
    height: auto !important;
    max-height: 78px !important;
    margin: 0 !important;
}

body.nvx-workspace-shell-enabled header.header .header-hamburger {
    position: absolute !important;
    left: 14px !important;
    top: 38px !important;
    margin: 0 !important;
}

/* Until JS moves the authenticated controls into the sidebar, keep them from
   flashing in the old upper-right location. */
body.nvx-workspace-shell-enabled header.header #loginBtn,
body.nvx-workspace-shell-enabled header.header .brand-block,
body.nvx-workspace-shell-enabled header.header .nvx-header-user-meta {
    visibility: hidden !important;
}

body.nvx-workspace-shell-enabled header.header .dx-nav-footer,
body.nvx-workspace-shell-enabled header.header .nvx-shared-navigation,
body.nvx-workspace-shell-enabled header.header .nvx-workspace-navigation {
    display: none !important;
}

/* Header status panel. */
.nvx-workspace-header-status {
    position: absolute;
    left: 304px;
    right: 26px;
    top: 18px;
    min-height: 62px;
    display: grid;
    grid-template-columns: 1.75fr .75fr 1fr 1fr;
    align-items: stretch;
    border: 1px solid #c8d6e2;
    border-radius: 11px;
    background: linear-gradient(180deg, #f7fafc 0%, #edf3f8 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 3px 12px rgba(25,54,83,.08);
    overflow: hidden;
    box-sizing: border-box;
}

.nvx-workspace-status-cell {
    min-width: 0;
    padding: 10px 13px 9px;
    border-right: 1px solid #d8e2ea;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.nvx-workspace-status-cell:last-child { border-right: 0; }

/* The four header status cells are also workspace navigation buttons. */
.nvx-workspace-status-link {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin: 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-right: 1px solid #d8e2ea;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}

.nvx-workspace-status-link:last-child {
    border-right: 0;
}

@media (hover: hover) and (pointer: fine) {
    .nvx-workspace-status-link:hover {
        background: var(--nvx-ws-blue);
    }

    .nvx-workspace-status-link:hover .nvx-workspace-status-label,
    .nvx-workspace-status-link:hover strong {
        color: #ffffff;
    }
}

.nvx-workspace-status-link:focus-visible {
    background: var(--nvx-ws-blue);
    outline: 3px solid rgba(27,117,184,.28);
    outline-offset: -3px;
}

.nvx-workspace-status-link:focus-visible .nvx-workspace-status-label,
.nvx-workspace-status-link:focus-visible strong {
    color: #ffffff;
}

.nvx-workspace-status-label {
    display: block;
    margin-bottom: 4px;
    color: #708397;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: .065em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nvx-workspace-status-cell strong {
    display: block;
    min-width: 0;
    color: #183a59;
    font-size: 13px;
    font-weight: 820;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar title + compact Log Off button on the same line; email centered below. */
.nvx-workspace-sidebar-head {
    padding: 10px 12px 9px !important;
}

.nvx-workspace-sidebar-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.nvx-workspace-sidebar-head-row strong {
    min-width: 0;
    margin: 0 !important;
}

.nvx-workspace-sidebar-auth-slot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

body.nvx-workspace-shell-enabled .nvx-workspace-sidebar #loginBtn,
body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .nvx-workspace-sidebar-auth-button {
    position: static !important;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 54px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border: 1px solid #15589a !important;
    border-radius: 6px !important;
    background: #176eb4 !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 9px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 5px rgba(15,53,91,.16) !important;
    cursor: pointer !important;
}

body.nvx-workspace-shell-enabled .nvx-workspace-sidebar #loginBtn:hover {
    background: #0e5d9f !important;
}

.nvx-workspace-sidebar-email-slot {
    min-height: 15px;
    margin-top: 5px;
    text-align: center;
    overflow: hidden;
}

body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .brand-email,
body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .nvx-workspace-sidebar-auth-email {
    position: static !important;
    visibility: visible !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: #52687b !important;
    font-size: 8.5px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.nvx-workspace-shell-enabled header.header .nvx-workspace-brand-empty {
    display: none !important;
}

/* White ESBA-style parent card. Repeated specificity is deliberate because
   the older NevoMD styles contain late !important layout rules. */
body.nvx-workspace-shell-enabled .app-page-shell.nvx-workspace-layout > .app-page-content.nvx-workspace-main,
body.nvx-workspace-shell-enabled .nvx-workspace-layout > .nvx-workspace-main,
html body.nvx-workspace-shell-enabled div.app-page-content.nvx-workspace-main {
    background: #ffffff !important;
    border: 1px solid #dbe4ed !important;
    border-radius: 17px !important;
    box-shadow: 0 8px 28px rgba(25,54,83,.08) !important;
    overflow: visible !important;
    padding-bottom: 20px !important;
}

.nvx-workspace-inline-head {
    background: #ffffff !important;
    border-radius: 17px 17px 0 0;
    padding: 20px 22px 14px !important;
    border-bottom: 1px solid #e8eef3 !important;
}

/* Functional page sections become the light-gray inner parent area, analogous
   to the panels inside the ESBA appliance's white General card. */
body.nvx-workspace-shell-enabled .nvx-workspace-main .nvx-workspace-inner-panel {
    width: auto !important;
    max-width: none !important;
    margin: 16px 18px 18px !important;
    padding: 16px !important;
    background: #f6f8fa !important;
    border: 1px solid #dce5ed !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

/* Preserve hidden tab behavior. */
body.nvx-workspace-shell-enabled .nvx-workspace-main .nvx-workspace-inner-panel[hidden] {
    display: none !important;
}

/* Legacy edit/welcome components keep their own white cards against the
   light-gray inner parent. The read-only User Profile is intentionally flat
   so its content sits directly on the gray account panel. */
body.nvx-workspace-shell-enabled .nvx-workspace-inner-panel #doctor-info-form,
body.nvx-workspace-shell-enabled .nvx-workspace-inner-panel #doctor-info-form .doctor-account-table,
body.nvx-workspace-shell-enabled .nvx-workspace-inner-panel .dashboard-welcome-card {
    background: #ffffff !important;
}

body.nvx-workspace-shell-enabled .nvx-workspace-inner-panel #doctor-info-panel,
body.nvx-workspace-shell-enabled .nvx-workspace-inner-panel #doctor-info-panel .doctor-account-table {
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 1100px) {
    body.nvx-workspace-shell-enabled header.header,
    body.nvx-workspace-shell-enabled header.header .header-container,
    body.nvx-workspace-shell-enabled header.header .left-title {
        height: 118px !important;
        min-height: 118px !important;
    }

    body.nvx-workspace-shell-enabled header.header .logo-link-brand,
    body.nvx-workspace-shell-enabled header.header .logo-link-brand .header-logo-wordmark {
        width: 190px !important;
        max-width: 190px !important;
    }

    .nvx-workspace-header-status {
        left: 270px;
        right: 14px;
        top: 16px;
        min-height: 72px;
    }

    .nvx-workspace-status-cell { padding-left: 9px; padding-right: 9px; }
    .nvx-workspace-status-cell strong { font-size: 11px; }
}

@media (max-width: 900px) {
    body.nvx-workspace-shell-enabled header.header,
    body.nvx-workspace-shell-enabled header.header .header-container,
    body.nvx-workspace-shell-enabled header.header .left-title {
        height: 166px !important;
        min-height: 166px !important;
    }

    body.nvx-workspace-shell-enabled header.header .logo-link-brand {
        left: 50px !important;
        top: 8px !important;
    }

    body.nvx-workspace-shell-enabled header.header .header-hamburger {
        top: 32px !important;
    }

    .nvx-workspace-header-status {
        left: 12px;
        right: 12px;
        top: 86px;
        min-height: 66px;
        grid-template-columns: 1.65fr .75fr 1fr 1fr;
    }

    .nvx-workspace-status-label { font-size: 8px; }
    .nvx-workspace-status-cell strong { font-size: 10px; }
}

@media (max-width: 560px) {
    body.nvx-workspace-shell-enabled header.header,
    body.nvx-workspace-shell-enabled header.header .header-container,
    body.nvx-workspace-shell-enabled header.header .left-title {
        height: 226px !important;
        min-height: 226px !important;
    }

    body.nvx-workspace-shell-enabled header.header .logo-link-brand,
    body.nvx-workspace-shell-enabled header.header .logo-link-brand .header-logo-wordmark {
        width: 175px !important;
        max-width: 175px !important;
    }

    .nvx-workspace-header-status {
        top: 82px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 130px;
        overflow: visible;
    }

    .nvx-workspace-status-cell {
        min-height: 42px;
        border-right: 1px solid #d8e2ea;
        border-bottom: 1px solid #d8e2ea;
        padding: 7px 9px;
    }

    .nvx-workspace-status-cell:nth-child(2n) { border-right: 0; }
    .nvx-workspace-status-cell:nth-last-child(-n+2) { border-bottom: 0; }

    body.nvx-workspace-shell-enabled .nvx-workspace-main .nvx-workspace-inner-panel {
        margin: 12px 10px 14px !important;
        padding: 11px !important;
    }
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v7
   Content-panel cleanup + internal-header simplification requested 2026-09-15.
   - Remove the divider under the page title/description area.
   - Keep the gray functional panel fully inside the white parent card.
   - Flatten redundant white parent wrappers on Labs, Images, and Research.
   - Preserve purposeful child cards (progress/results/preview) as white.
   ============================================================= */

/* The ESBA-style parent card does not need a separator rule beneath its
   title/description. Spacing provides the separation instead. */
body.nvx-workspace-shell-enabled .nvx-workspace-inline-head {
    border-bottom: 0 !important;
}

/* Keep every light-gray functional panel centered and bounded by the white
   parent card. This also prevents the Patients panel from visually bleeding
   past the right edge of its parent. */
body.nvx-workspace-shell-enabled .nvx-workspace-main .nvx-workspace-inner-panel {
    width: calc(100% - 36px) !important;
    max-width: calc(100% - 36px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients #patientToolbar,
body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients #patientToolbar > .toolbar-center,
body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients .analysis-toolbar,
body.nvx-workspace-shell-enabled.dashboard-page #dashboard-tab-patients .patient-review-controls {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* LABS ---------------------------------------------------------
   section-labs is already the gray functional area. Remove the legacy white
   wrapper and the two redundant white section cards so Lab Files and
   Interpreted Lab Results sit directly on that gray surface. Purposeful child
   cards such as Elapsed Processing Time remain white. */
body.nvx-workspace-shell-enabled.newpatient-page #section-labs > div[style*="background: #ffffff"],
body.nvx-workspace-shell-enabled.newpatient-page #section-labs > div[style*="background:#ffffff"] {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

body.nvx-workspace-shell-enabled.newpatient-page #section-labs #labs-section,
body.nvx-workspace-shell-enabled.newpatient-page #section-labs #lab-results-section {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.nvx-workspace-shell-enabled.newpatient-page #section-labs .np-elapsed-progress-panel {
    background: #ffffff !important;
}

/* IMAGES -------------------------------------------------------
   Remove the redundant white parent wrapper. The gray tab panel becomes the
   page surface; useful child cards remain white for visual grouping. */
body.nvx-workspace-shell-enabled.newpatient-page #section-images .images-outer-wrapper,
body.nvx-workspace-shell-enabled.newpatient-page #section-images .images-inner-wrapper,
body.nvx-workspace-shell-enabled.newpatient-page #section-images #images-section {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.nvx-workspace-shell-enabled.newpatient-page #section-images .images-outer-wrapper,
body.nvx-workspace-shell-enabled.newpatient-page #section-images .images-inner-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.nvx-workspace-shell-enabled.newpatient-page #section-images .images-list-box,
body.nvx-workspace-shell-enabled.newpatient-page #section-images .group-image-checklist-wrap,
body.nvx-workspace-shell-enabled.newpatient-page #section-images .unified-selected-preview-panel,
body.nvx-workspace-shell-enabled.newpatient-page #section-images .np-elapsed-progress-panel,
body.nvx-workspace-shell-enabled.newpatient-page #section-images #image-results-section {
    background: #ffffff !important;
}

/* RESEARCH -----------------------------------------------------
   Trials and Literature already live inside the gray workspace panel. Remove
   their legacy white parent shell so the title, condition controls, arrow, and
   Start Research button sit on gray. Keep the actual processing/results card
   white. */
body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-results-shell,
body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-title-wrap {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-results-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-output-shell,
body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-wait-panel {
    background: #ffffff !important;
}

@media (max-width: 560px) {
    body.nvx-workspace-shell-enabled .nvx-workspace-main .nvx-workspace-inner-panel {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
    }
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v8
   Header alignment, child-navigation sizing, subscription spacing,
   and Research/Literature panel flattening requested 2026-09-15.
   ============================================================= */

/* Internal pages no longer have the hamburger, so align the compact NevoMD
   wordmark with the same left margin used by the workspace/sidebar shell. */
body.nvx-workspace-shell-enabled header.header .logo-link-brand {
    left: 18px !important;
}

/* Keep the compact Log Off control optically centered on the NevoMD Menu row. */
.nvx-workspace-sidebar-head-row {
    min-height: 26px;
    align-items: center !important;
}
.nvx-workspace-sidebar-head-row strong {
    display: flex !important;
    align-items: center !important;
    min-height: 24px !important;
    line-height: 24px !important;
}
body.nvx-workspace-shell-enabled .nvx-workspace-sidebar #loginBtn,
body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .nvx-workspace-sidebar-auth-button {
    align-self: center !important;
    transform: translateY(1px);
}

/* Child navigation is intentionally larger but lighter than the parent items. */
.nvx-workspace-subnav .nvx-workspace-side-item {
    min-height: 36px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

/* SUBSCRIPTIONS ------------------------------------------------
   structure.css reserves legacy fixed-navigation space above this page. Inside
   the ESBA workspace that reservation becomes an unnecessary blank band. */
body.nvx-workspace-shell-enabled .nvx-workspace-main .subscription-content-wrap {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}
body.nvx-workspace-shell-enabled .nvx-workspace-main .subscription-content {
    margin-top: 0 !important;
}

/* RESEARCH / LITERATURE ----------------------------------------
   The elapsed-processing-time card is the meaningful white child card. Its
   enclosing research-output shell should be transparent so it rests directly
   on the gray functional workspace rather than inside another white box. */
body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-output-shell {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
body.nvx-workspace-shell-enabled.research-page #section-diagnosis .research-wait-panel {
    background: #ffffff !important;
}
body.nvx-workspace-shell-enabled.research-page #section-diagnosis #diagnosisResult {
    background: #ffffff !important;
}

@media (max-width: 900px) {
    body.nvx-workspace-shell-enabled header.header .logo-link-brand {
        left: 18px !important;
    }
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v20
   Sidebar login email alignment + centered header statistics.
   ============================================================= */

/* The authenticated email belongs visually to the left-aligned menu title,
   not to the Log Out button. Keep it on one line and truncate long addresses. */
.nvx-workspace-sidebar-email-slot {
    text-align: left !important;
    min-width: 0 !important;
}

body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .brand-email,
body.nvx-workspace-shell-enabled .nvx-workspace-sidebar .nvx-workspace-sidebar-auth-email {
    width: 100% !important;
    max-width: 100% !important;
    color: var(--nvx-ws-green) !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Center every status label/value within its individual statistics cell. */
.nvx-workspace-status-cell {
    align-items: center !important;
    text-align: center !important;
}

.nvx-workspace-status-label,
.nvx-workspace-status-cell strong {
    width: 100% !important;
    text-align: center !important;
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v21
   Reverse status-strip typography hierarchy:
   labels = larger bold black; values = smaller medium gray.
   ============================================================= */
.nvx-workspace-status-label {
    color: #111111 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: .035em !important;
}

.nvx-workspace-status-cell strong {
    color: #747b84 !important;
    font-size: 10px !important;
    font-weight: 650 !important;
    line-height: 1.15 !important;
}

@media (max-width: 900px) {
    .nvx-workspace-status-label {
        font-size: 10px !important;
    }
    .nvx-workspace-status-cell strong {
        font-size: 9px !important;
    }
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v22
   Soften the top status-strip title hierarchy:
   titles = slightly smaller, black, regular weight;
   values remain smaller medium gray.
   ============================================================= */
.nvx-workspace-status-label {
    color: #111111 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.08 !important;
    letter-spacing: .03em !important;
}

@media (max-width: 900px) {
    .nvx-workspace-status-label {
        font-size: 9.5px !important;
        font-weight: 500 !important;
    }
}

/* =============================================================
   NevoMD ESBA-style workspace refinement v23
   Top status-strip titles use the same dark clinical blue family
   as the primary action buttons. Values remain unchanged.
   ============================================================= */
.nvx-workspace-status-label {
    color: #1e3a8a !important;
}

/* ===========================================================
   NevoMD ESBA-style workspace refinement v25
   - desktop sidebar is truly viewport-fixed, not parent-sticky
   - preserve the original desktop starting position
   - keep the grid column reserved with an invisible placeholder
   - mobile remains normal document flow
   =========================================================== */

.nvx-workspace-sidebar-placeholder {
    display: block;
    width: 230px;
    min-width: 230px;
    height: 1px;
    min-height: 1px;
    grid-column: 1;
    grid-row: 1;
    visibility: hidden;
    pointer-events: none;
}

@media (min-width: 901px) {
    .nvx-workspace-sidebar.nvx-workspace-sidebar-fixed {
        position: fixed !important;
        margin: 0 !important;
        z-index: 80 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    .nvx-workspace-vertical-divider {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    body.nvx-workspace-shell-enabled .app-page-content.nvx-workspace-main,
    body.nvx-workspace-shell-enabled .nvx-workspace-main {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }
}

@media (max-width: 900px) {
    .nvx-workspace-sidebar-placeholder {
        display: none !important;
    }

    .nvx-workspace-sidebar.nvx-workspace-sidebar-fixed {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(360px, 86vw) !important;
        max-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

/* ===========================================================
   v26 - Workspace footer card alignment
   Keep the footer inside the right-hand application workspace so it never
   runs underneath the fixed NevoMD navigation pane on desktop.
   =========================================================== */
@media (min-width: 901px) {
    body.nvx-workspace-shell-enabled #footer-placeholder {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        margin: 18px 16px 28px !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: 230px 2px minmax(0, 1180px) !important;
        column-gap: 18px !important;
        align-items: start !important;
        justify-content: start !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    body.nvx-workspace-shell-enabled #footer-placeholder > .site-footer {
        grid-column: 3 !important;
        width: 100% !important;
        max-width: 1180px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        border: 1px solid #dbe4ed !important;
        border-radius: 17px !important;
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.96),
            0 8px 28px rgba(25,54,83,.09) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.nvx-workspace-shell-enabled #footer-placeholder > .site-footer > .footer-inner {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 18px 24px 16px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 900px) {
    body.nvx-workspace-shell-enabled #footer-placeholder {
        width: calc(100% - 22px) !important;
        margin: 14px 11px 24px !important;
        padding: 0 !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    body.nvx-workspace-shell-enabled #footer-placeholder > .site-footer {
        width: 100% !important;
        margin: 0 !important;
        background: #ffffff !important;
        border: 1px solid #dbe4ed !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 22px rgba(25,54,83,.08) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.nvx-workspace-shell-enabled #footer-placeholder > .site-footer > .footer-inner {
        width: 100% !important;
        max-width: none !important;
        padding: 16px 14px 14px !important;
        box-sizing: border-box !important;
    }
}


/* ===========================================================
   v27 - Internal workspace: no public footer + full-height divider
   Internal authenticated application pages already expose Support and
   Subscriptions in the left navigation. Hide the public marketing/policy
   footer here, and keep the navigation/content divider pinned to the viewport
   on desktop so it runs continuously to the bottom of the window.
   =========================================================== */
body.nvx-workspace-shell-enabled #footer-placeholder {
    display: none !important;
}

@media (min-width: 901px) {
    .nvx-workspace-vertical-divider.nvx-workspace-divider-fixed {
        position: fixed !important;
        width: 2px !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: var(--nvx-ws-divider) !important;
        z-index: 70 !important;
        pointer-events: none !important;
    }
}

@media (max-width: 900px) {
    .nvx-workspace-vertical-divider.nvx-workspace-divider-fixed {
        position: static !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        height: auto !important;
    }
}

/* ===========================================================
   NevoMD ESBA-style workspace refinement v34
   Exact menu-wide hover behavior:
   - outside the NevoMD Menu, the selected item is medium blue
   - anywhere inside the parent menu, the selected item is light blue
   - the row directly under the pointer is dark blue
   - leaving the parent menu restores the selected item to medium blue

   This is intentionally driven by the sidebar's native :hover state
   instead of JavaScript so the state cannot become stale between rows.
   =========================================================== */
@media (hover: hover) and (pointer: fine) {
    .nvx-workspace-sidebar:hover .nvx-workspace-side-item.is-active {
        background: #dbeafe !important;
        border-color: #bfdbfe !important;
        color: #263f56 !important;
    }

    .nvx-workspace-sidebar:hover .nvx-workspace-side-item.is-active .nvx-workspace-nav-dot {
        background: var(--nvx-ws-green) !important;
    }

    .nvx-workspace-sidebar:hover .nvx-workspace-side-item:hover:not(:disabled),
    .nvx-workspace-sidebar:hover .nvx-workspace-side-parent:hover:not(:disabled),
    .nvx-workspace-sidebar:hover .nvx-workspace-side-item.is-active:hover:not(:disabled) {
        background: var(--nvx-ws-blue-hover) !important;
        border-color: var(--nvx-ws-blue-hover) !important;
        color: #ffffff !important;
    }

    .nvx-workspace-sidebar:hover .nvx-workspace-side-item:hover:not(:disabled) .nvx-workspace-nav-dot,
    .nvx-workspace-sidebar:hover .nvx-workspace-side-parent:hover:not(:disabled) .nvx-workspace-nav-dot,
    .nvx-workspace-sidebar:hover .nvx-workspace-side-item.is-active:hover:not(:disabled) .nvx-workspace-nav-dot {
        background: #ffffff !important;
    }
}

/* Dashboard, New Patient, Research, and Medications retain the injected
   workspace title/subtitle. Utility pages use their own native page title, so
   suppress only the duplicate injected heading there. */
.nvx-workspace-inline-head.nvx-workspace-title-hidden > h2,
.nvx-workspace-inline-head.nvx-workspace-title-hidden > p {
    display: none !important;
}

.nvx-workspace-inline-head.nvx-workspace-title-hidden:not(:has(.nvx-workspace-card-case.is-visible)) {
    display: none !important;
}

/* =============================================================
   NevoMD workspace refinement v35
   Keep both status-strip text lines readable over the blue hover.
   Later typography rules use !important, so hover/focus must win
   at the same cascade priority.
   ============================================================= */
@media (hover: hover) and (pointer: fine) {
    .nvx-workspace-status-link:hover .nvx-workspace-status-label,
    .nvx-workspace-status-link:hover strong {
        color: #ffffff !important;
    }
}

.nvx-workspace-status-link:focus-visible .nvx-workspace-status-label,
.nvx-workspace-status-link:focus-visible strong {
    color: #ffffff !important;
}
