.workspace-body {
    overflow: hidden;
}

.workspace-shell {
    display: flex;
    height: 100vh;
    background: #f6f7f8;
    overflow: hidden;
    position: relative;
}

.workspace-sidebar {
    background: #121821;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex: 0 0 260px;
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 18px;
    scrollbar-color: #fe3602 #202834;
    scrollbar-width: thin;
    transition: flex-basis .25s ease, padding .25s ease, width .25s ease;
}

.workspace-brand {
    align-items: center;
    background: #121821;
    display: flex;
    justify-content: space-between;
    margin: -22px -18px 18px;
    padding: 22px 18px 16px;
    position: sticky;
    top: -22px;
    z-index: 2;
}

.workspace-brand img {
    max-width: 150px;
}

.workspace-sidebar::-webkit-scrollbar,
.workspace-content::-webkit-scrollbar {
    width: 10px;
}

.workspace-sidebar::-webkit-scrollbar-track {
    background: #202834;
}

.workspace-sidebar::-webkit-scrollbar-thumb {
    background: #fe3602;
    border: 2px solid #202834;
    border-radius: 999px;
}

.workspace-sidebar::-webkit-scrollbar-thumb:hover {
    background: #ff5a2f;
}

.workspace-content::-webkit-scrollbar-track {
    background: #eef1f4;
}

.workspace-content::-webkit-scrollbar-thumb {
    background: #fe3602;
    border: 2px solid #eef1f4;
    border-radius: 999px;
}

.workspace-content::-webkit-scrollbar-thumb:hover {
    background: #d82f06;
}

.workspace-section-label {
    color: #aeb7c2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.workspace-field-label {
    color: #c8d0da;
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.workspace-select {
    background: #202834;
    border: 1px solid #3b4654;
    border-radius: 6px;
    color: #fff;
    margin-bottom: 12px;
    min-height: 42px;
    padding: 8px 10px;
    width: 100%;
}

.workspace-scope {
    border-bottom: 1px solid #293241;
    margin-bottom: 14px;
    padding-bottom: 18px;
}

.workspace-nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

.workspace-nav-group {
    border-bottom: 1px solid #293241;
    padding: 8px 0;
}

.workspace-nav-group summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 8px;
    font-weight: 700;
    list-style: none;
    padding: 8px 4px;
}

.workspace-nav-group[open] > summary,
.workspace-nav-group:has(a.active) > summary {
    color: #fe3602;
}

.workspace-nav-group[open] > summary .workspace-nav-icon,
.workspace-nav-group:has(a.active) > summary .workspace-nav-icon {
    filter: brightness(0) saturate(100%) invert(31%) sepia(89%) saturate(4267%) hue-rotate(2deg) brightness(101%) contrast(105%);
}

.workspace-nav-icon {
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
    color: #fff;
}

.workspace-nav-group summary::-webkit-details-marker {
    display: none;
}

.workspace-nav-subgroup {
    padding: 2px 0;
}

.workspace-nav-subgroup summary {
    color: #dce2ea;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
    padding: 8px 8px 8px 18px;
}

.workspace-nav-subgroup summary:hover,
.workspace-nav-subgroup[open] > summary,
.workspace-nav-subgroup:has(a.active) > summary {
    color: #fe3602;
}

.workspace-nav-subgroup summary::-webkit-details-marker {
    display: none;
}

.workspace-nav-subgroup a {
    padding-left: 34px;
}

.workspace-nav-group a {
    border-left: 2px solid transparent;
    color: #dce2ea;
    display: block;
    font-size: 14px;
    margin: 0;
    padding: 8px 8px 8px 18px;
    text-decoration: none;
}

.workspace-nav-group a:hover,
.workspace-nav-group a.active {
    border-left-color: #fe3602;
    color: #fe3602;
}

.workspace-nav-group a.active {
    background: rgba(254, 54, 2, 0.12);
}

.workspace-logout {
    border-top: 1px solid #293241;
    margin-top: 18px;
    padding-top: 18px;
}

.workspace-logout button {
    background: #fff;
    border: 0;
    border-radius: 6px;
    color: #121821;
    font-weight: 700;
    padding: 9px 12px;
    width: 100%;
}

.workspace-sidebar-toggle {
    align-items: center;
    background: transparent;
    /* border: 1px solid rgba(254, 54, 2, 0.85); */
    border-radius: 20%;
    border: none;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    height: 20px;
    justify-content: center;
    left: 240px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: left .25s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    width: 20px;
    z-index: 5;
}

.workspace-sidebar-toggle:hover,
.workspace-sidebar-toggle:focus-visible {
    background: #121821;
    border-color: #fe3602;
    box-shadow: 0 10px 24px rgba(254, 54, 2, 0.22);
    outline: none;
}

.workspace-sidebar-toggle::before {
    border-bottom: 8px solid transparent;
    border-right: 10px solid #fe3602;
    border-top: 8px solid transparent;
    content: "";
    height: 0;
    opacity: 0;
    transition: opacity .2s ease;
    width: 0;
}

.workspace-sidebar-toggle::after {
    border-bottom: 5px solid transparent;
    border-right: 7px solid #121821;
    border-top: 5px solid transparent;
    content: "";
    height: 0;
    margin-left: -7px;
    opacity: 0;
    position: relative;
    transition: opacity .2s ease;
    width: 0;
}

.workspace-sidebar-toggle:hover::before,
.workspace-sidebar-toggle:hover::after,
.workspace-sidebar-toggle:focus-visible::before,
.workspace-sidebar-toggle:focus-visible::after {
    opacity: 1;
}

.workspace-sidebar-toggle:hover::after {
    border-right-color: #121821;
}

.workspace-sidebar-collapsed .workspace-sidebar {
    flex-basis: 0;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    width: 0;
}

.workspace-sidebar-collapsed .workspace-sidebar > * {
    opacity: 0;
    pointer-events: none;
}

.workspace-sidebar-collapsed .workspace-sidebar-toggle {
    left: 0;
}

.workspace-sidebar-collapsed .workspace-sidebar-toggle::before {
    border-left: 10px solid #fe3602;
    border-right: 0;
}

.workspace-sidebar-collapsed .workspace-sidebar-toggle::after {
    border-left: 7px solid #121821;
    border-right: 0;
    margin-left: -10px;
}

.workspace-sidebar-collapsed .workspace-sidebar-toggle:hover::after {
    border-left-color: #121821;
}

.workspace-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.workspace-topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e6eb;
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 7px 28px;
    margin-bottom: 12px;
}

.workspace-topbar-left {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
}

.workspace-topbar-title {
    color: #121821;
    display: block;
    font-size: 25px;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-hamburger-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d8dde4;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    height: 36px;
    justify-content: center;
    padding: 7px;
    gap: 4px;
    transition: background .2s ease, border-color .2s ease;
    width: 36px;
    flex-shrink: 0;
}

.workspace-hamburger-btn:hover,
.workspace-hamburger-btn:focus-visible {
    background: #f6f7f8;
    border-color: #fe3602;
    outline: none;
}

.workspace-hamburger-btn .hamburger-line {
    background-color: #121821;
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: transform .2s ease, opacity .2s ease;
    width: 18px;
}

.workspace-sidebar-close {
    align-items: center;
    background: transparent;
    border: 1px solid #3b4654;
    border-radius: 6px;
    color: #c8d0da;
    cursor: pointer;
    display: none;
    height: 32px;
    justify-content: center;
    padding: 0;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
    width: 32px;
    flex-shrink: 0;
}

.workspace-sidebar-close:hover,
.workspace-sidebar-close:focus-visible {
    background: #202834;
    border-color: #fe3602;
    color: #fe3602;
    outline: none;
}

.workspace-backdrop {
    background: rgba(18, 24, 33, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: none;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .25s ease;
    z-index: 1040;
}

.workspace-nav-flyout {
    background: #fff;
    border: 1px solid #e2e6eb;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    display: none;
    min-width: 236px;
    max-width: min(280px, calc(100vw - 86px));
    padding: 12px;
    position: fixed;
    z-index: 1060;
}

.workspace-nav-flyout.is-open {
    display: block;
}

.workspace-nav-flyout-title {
    color: black;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 8px;
}

.workspace-nav-flyout a {
    border-radius: 7px;
    color: #121821;
    display: block;
    font-size: 14px;
    line-height: 1.3;
    padding: 9px 10px;
    text-decoration: none;
}

.workspace-nav-flyout a:hover,
.workspace-nav-flyout a:focus-visible,
.workspace-nav-flyout a.active {
    background: rgba(254, 54, 2, 0.1);
    color: #fe3602;
    outline: none;
}

.workspace-context-chips {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace-context-chips span {
    border: 1px solid #d8dde4;
    border-radius: 999px;
    color: #1f2933;
    font-size: 13px;
    padding: 7px 12px;
}

.workspace-content {
    align-content: flex-start;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 28px 28px;
    scrollbar-color: #fe3602 #eef1f4;
    scrollbar-width: thin;
}

.workspace-content .sidebar-left-p {
    padding-left: 0;
}

.workspace-content #report-bar,
.workspace-content #data-hub-bar,
.workspace-content #toggle-btn {
    display: none !important;
}

@media (max-width: 992px) {
    body.workspace-menu-open {
        overflow: hidden !important;
    }

    .workspace-body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .workspace-shell {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        position: relative;
    }

    .workspace-logout-confirm,
    .workspace-sidebar-open .workspace-logout-confirm,
    .workspace-sidebar-collapsed .workspace-logout-confirm {
        bottom: auto;
        left: 50% !important;
        min-width: min(84vw, 260px);
        top: 50%;
        transform: translate(-50%, -50%) !important;
        width: min(84vw, 260px);
    }

    .workspace-sidebar {
        bottom: 0;
        box-shadow: none;
        flex: none;
        height: 100vh;
        height: 100dvh;
        left: 0;
        max-width: 82vw;
        position: fixed;
        top: 0;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(0.33, 1, 0.68, 1), visibility .28s ease, box-shadow .28s ease;
        visibility: hidden;
        width: 280px;
        z-index: 1050;
    }

    .workspace-sidebar-open .workspace-sidebar {
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.5);
        transform: translateX(0);
        visibility: visible;
    }

    .workspace-sidebar-close {
        display: flex;
    }

    .workspace-backdrop {
        display: block;
    }

    .workspace-sidebar-open .workspace-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .workspace-sidebar-toggle {
        display: none !important;
    }

    .workspace-main {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        min-width: 0;
        overflow-x: hidden;
        width: 100%;
    }

    .workspace-topbar {
        align-items: center;
        background: #fff;
        border-bottom: 1px solid #e2e6eb;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
        min-height: 52px;
        padding: 8px 14px;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .workspace-hamburger-btn {
        display: flex;
    }

    .workspace-topbar-title {
        display: block;
    }

    .workspace-context-chips {
        gap: 6px;
    }

    .workspace-context-chips span {
        font-size: 11.5px;
        padding: 4px 8px;
    }

    .workspace-content {
        overflow-y: visible;
        overflow-x: hidden;
        padding: 8px 12px 24px;
        width: 100%;
    }
}

/* ChatGPT-style icon rail navigation */
.workspace-sidebar {
    background: #121821;
    border-right: 1px solid #293241;
    color: #fff;
    padding: 14px 12px;
    transition: flex-basis .24s ease, width .24s ease, padding .24s ease, box-shadow .24s ease;
}

.workspace-brand {
    background: #121821;
    gap: 10px;
    margin: -14px -12px 14px;
    padding: 12px;
    top: -14px;
}

.workspace-brand > img {
    max-width: 138px;
}

.workspace-sidebar-rail-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.workspace-sidebar-rail-toggle:hover,
.workspace-sidebar-rail-toggle:focus-visible {
    background: #202834;
    outline: none;
}

.workspace-sidebar-rail-icon {
    height: 30px;
    object-fit: contain;
    width: 30px;
}

.workspace-sidebar-rail-icon-collapse {
    display: none;
    filter: invert(1);
}

.workspace-sidebar-rail-toggle:not(.workspace-sidebar-rail-hover-paused):hover .workspace-sidebar-rail-icon-default,
.workspace-sidebar-rail-toggle:not(.workspace-sidebar-rail-hover-paused):focus-visible .workspace-sidebar-rail-icon-default,
.workspace-shell:not(.workspace-sidebar-collapsed) .workspace-sidebar-rail-icon-default {
    display: none;
}

.workspace-sidebar-rail-toggle:not(.workspace-sidebar-rail-hover-paused):hover .workspace-sidebar-rail-icon-collapse,
.workspace-sidebar-rail-toggle:not(.workspace-sidebar-rail-hover-paused):focus-visible .workspace-sidebar-rail-icon-collapse,
.workspace-shell:not(.workspace-sidebar-collapsed) .workspace-sidebar-rail-icon-collapse {
    display: block;
}

.workspace-scope {
    border-bottom-color: #293241;
}

.workspace-field-label {
    color: #c8d0da;
}

.workspace-select {
    background: #202834;
    border-color: #3b4654;
    color: #fff;
}

.workspace-nav {
    flex: 1 1 auto;
    overflow-y: auto;
}

.workspace-nav-group {
    border-bottom: 0;
    padding: 2px 0;
}

.workspace-nav-group summary {
    border-radius: 8px;
    color: #fff;
    min-height: 38px;
    padding: 8px;
}

.workspace-nav-group summary:hover {
    background: #202834;
}

.workspace-nav-icon {
    height: 20px;
    width: 20px;
}

.workspace-nav-group a {
    border-left: 0;
    border-radius: 8px;
    color: #dce2ea;
    margin: 2px 0 2px 30px;
    padding: 8px 10px;
}

.workspace-nav-group a:hover,
.workspace-nav-group a.active {
    background: rgba(254, 54, 2, 0.12);
    border-left-color: transparent;
    color: #fe3602;
}

.workspace-nav-group a.active {
    background: rgba(254, 54, 2, 0.1);
}

.workspace-logout {
    border-top: 1px solid #293241;
    margin-top: auto;
}

.workspace-logout button {
    background: #fff;
    color: #121821;
}

.workspace-logout-confirm {
    background: #121821;
    border: 1px solid #293241;
    border-radius: 8px;
    bottom: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
    display: grid;
    gap: 8px;
    left: 272px;
    min-width: 210px;
    padding: 12px;
    position: fixed;
    z-index: 1200;
}

.workspace-logout-confirm[hidden] {
    display: none;
}

.workspace-logout-default[hidden] {
    display: none;
}

.workspace-logout-confirm p {
    color: #dce2ea;
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
}

.workspace-logout-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.workspace-logout-actions button {
    border-radius: 7px;
    font-size: 13px;
    height: 34px;
    padding: 0 12px;
    width: auto;
}

.workspace-logout .workspace-logout-no {
    background: transparent;
    border: 1px solid #3b4654;
    color: #dce2ea;
}

.workspace-logout button:hover,
.workspace-logout button:focus-visible {
    background: #f4f5f6;
    outline: none;
}

.workspace-logout .workspace-logout-no:hover,
.workspace-logout .workspace-logout-no:focus-visible {
    background: #202834;
    color: #fff;
}

.workspace-sidebar-close {
    border-color: #3b4654;
    color: #c8d0da;
}

.workspace-sidebar-close:hover,
.workspace-sidebar-close:focus-visible {
    background: #202834;
}

.workspace-sidebar-toggle {
    display: none;
}

.workspace-sidebar-collapsed .workspace-sidebar {
    flex-basis: 64px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-left: 10px;
    padding-right: 10px;
    width: 64px;
}

.workspace-sidebar-collapsed .workspace-sidebar > * {
    opacity: 1;
    pointer-events: auto;
}

.workspace-sidebar-collapsed .workspace-brand {
    justify-content: center;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
}

.workspace-sidebar-collapsed .workspace-brand > img,
.workspace-sidebar-collapsed .workspace-sidebar-close,
.workspace-sidebar-collapsed .workspace-scope,
.workspace-sidebar-collapsed .workspace-nav-group summary span,
.workspace-sidebar-collapsed .workspace-nav-group a {
    display: none;
}

.workspace-sidebar-collapsed .workspace-nav {
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.workspace-sidebar-collapsed .workspace-nav-group {
    border: 0;
    padding: 0;
    width: 100%;
}

.workspace-sidebar-collapsed .workspace-nav-group summary {
    justify-content: center;
    padding: 9px;
}

.workspace-sidebar-collapsed .workspace-logout {
    border-top: 0;
    margin-top: auto;
    padding-top: 0;
}

.workspace-sidebar-collapsed .workspace-logout button {
    align-items: center;
    border-radius: 999px;
    display: flex;
    font-size: 0;
    height: 38px;
    justify-content: center;
    padding: 0;
    position: relative;
    width: 38px;
}

.workspace-sidebar-collapsed .workspace-logout-confirm {
    left: 72px;
}

.workspace-sidebar-collapsed .workspace-logout-actions button {
    border-radius: 7px;
    font-size: 13px;
    height: 34px;
    padding: 0 12px;
    width: auto;
}

.workspace-sidebar-collapsed .workspace-logout-actions button::before,
.workspace-sidebar-collapsed .workspace-logout-actions button::after {
    display: none;
}

.workspace-sidebar-collapsed .workspace-logout button::before {
    border: 2px solid #121821;
    border-left: 0;
    border-radius: 0 3px 3px 0;
    content: "";
    height: 15px;
    width: 11px;
}

.workspace-sidebar-collapsed .workspace-logout button::after {
    border-bottom: 2px solid #121821;
    border-right: 2px solid #121821;
    content: "";
    height: 7px;
    left: 13px;
    position: absolute;
    top: 15px;
    transform: rotate(-45deg);
    width: 7px;
}

@media (min-width: 993px) {
    html,
    body,
    body * {
        scrollbar-color: #fe3602 transparent !important;
        scrollbar-width: thin !important;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar,
    body *::-webkit-scrollbar {
        height: 4px !important;
        width: 4px !important;
    }

    html::-webkit-scrollbar-track,
    body::-webkit-scrollbar-track,
    body *::-webkit-scrollbar-track,
    html::-webkit-scrollbar-track-piece,
    body::-webkit-scrollbar-track-piece,
    body *::-webkit-scrollbar-track-piece {
        background: transparent !important;
        box-shadow: none !important;
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb,
    body *::-webkit-scrollbar-thumb,
    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover,
    body *::-webkit-scrollbar-thumb:hover {
        background: #fe3602 !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    html::-webkit-scrollbar-button,
    body::-webkit-scrollbar-button,
    body *::-webkit-scrollbar-button {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
    }

    html::-webkit-scrollbar-corner,
    body::-webkit-scrollbar-corner,
    body *::-webkit-scrollbar-corner {
        background: transparent !important;
    }

    .workspace-sidebar-open .workspace-backdrop {
        display: none;
    }
}

@media (max-width: 992px) {
    .workspace-shell {
        display: block;
        min-height: 100vh;
    }

    .workspace-sidebar {
        bottom: 0;
        box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
        height: 100vh;
        height: 100dvh;
        left: 0;
        max-width: calc(100vw - 40px);
        position: fixed;
        top: 0;
        transform: none;
        visibility: visible;
        width: 280px;
        z-index: 1050;
    }

    .workspace-sidebar-collapsed .workspace-sidebar {
        box-shadow: none;
        max-width: 64px;
        width: 64px;
    }

    .workspace-sidebar-open .workspace-sidebar {
        box-shadow: 8px 0 24px rgba(15, 23, 42, 0.24);
        transform: none;
        visibility: visible;
    }

    .workspace-main {
        margin-left: 64px;
        min-height: 100vh;
        width: calc(100% - 64px);
    }

    .workspace-hamburger-btn {
        display: none;
    }

    .workspace-topbar {
        padding-left: 12px;
    }

    .workspace-sidebar-open .workspace-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .workspace-sidebar-close {
        display: flex;
    }

    .workspace-sidebar-open .workspace-sidebar-rail-toggle {
        display: none;
    }

    .workspace-sidebar-collapsed .workspace-sidebar-close {
        display: none;
    }
}
