.sgo-shell {
    display: grid;
    min-height: var(--sgo-viewport-height);
    grid-template-columns: var(--sgo-sidebar-width) minmax(0, 1fr);
    transition: grid-template-columns var(--sgo-transition-fast);
}

html.sgo-sidebar-state-pending .sgo-shell {
    transition: none;
}

.sgo-shell.is-collapsed,
html.sgo-sidebar-collapsed-initial .sgo-shell {
    grid-template-columns: var(--sgo-sidebar-collapsed-width) minmax(0, 1fr);
}

.sgo-shell__sidebar {
    position: sticky;
    z-index: 1100;
    top: 0;
    display: flex;
    overflow: hidden;
    height: var(--sgo-viewport-height);
    min-width: 0;
    flex-direction: column;
    border-right: 1px solid color-mix(in srgb, var(--sgo-color-brand-950) 78%, var(--sgo-color-on-brand));
    background: var(--sgo-color-brand-950);
    color: #fff;
}

.sgo-shell__brand {
    display: flex;
    min-height: var(--sgo-topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sgo-space-3) 0 var(--sgo-space-4);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.sgo-shell__brand-link {
    display: flex;
    min-width: 0;
    align-items: center;
    color: #fff !important;
    gap: var(--sgo-space-3);
    text-decoration: none !important;
}

.sgo-shell__brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 9px;
    background: var(--sgo-color-on-brand);
    color: var(--sgo-color-brand-900);
    font-size: 20px;
    font-weight: 800;
}

.sgo-shell__brand-copy {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    line-height: 1.15;
    white-space: nowrap;
}

.sgo-shell__brand-copy strong {
    font-size: 17px;
    letter-spacing: .04em;
}

.sgo-shell__brand-copy small {
    overflow: hidden;
    margin-top: 3px;
    color: rgba(255, 255, 255, .64);
    font-size: 11px;
    text-overflow: ellipsis;
}

.sgo-shell__collapse,
.sgo-shell__mobile-menu,
.sgo-shell__icon-button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: var(--sgo-radius-sm);
    background: transparent;
}

.sgo-shell__collapse {
    flex: 0 0 36px;
    color: rgba(255, 255, 255, .72);
}

.sgo-shell__collapse:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.sgo-shell__nav {
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    padding: var(--sgo-space-3) var(--sgo-space-2);
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
    scrollbar-width: thin;
}

/* Las reglas display de los elementos de navegación no deben anular [hidden]. */
.sgo-shell__nav .sgo-nav-item[hidden],
.sgo-shell__nav .sgo-nav-group[hidden],
.sgo-shell__nav .sgo-nav-subitem[hidden],
.sgo-shell__nav .sgo-nav-separator[hidden] {
    display: none !important;
}

.sgo-nav-item,
.sgo-nav-group > summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    padding: var(--sgo-space-2) var(--sgo-space-3);
    border-radius: 6px;
    color: rgba(255, 255, 255, .78) !important;
    cursor: pointer;
    gap: var(--sgo-space-3);
    list-style: none;
    text-decoration: none !important;
    white-space: nowrap;
}

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

.sgo-nav-item:hover,
.sgo-nav-group > summary:hover,
.sgo-nav-item.is-active {
    background: rgba(255, 255, 255, .1);
    color: #fff !important;
}

.sgo-nav-item.is-active {
    box-shadow: inset 3px 0 0 var(--sgo-color-brand-100);
}

.sgo-nav-item.is-navigation-pending {
    background: rgba(255, 255, 255, .16);
    color: #fff !important;
}

.sgo-nav-item > .material-icons,
.sgo-nav-group > summary > .material-icons:first-child {
    width: 24px;
    flex: 0 0 24px;
    font-size: 21px;
    text-align: center;
}

.sgo-nav-item__label {
    overflow: hidden;
    flex: 1;
    text-overflow: ellipsis;
}

.sgo-nav-item .sgo-nav-item__shortcut {
    margin-left: auto;
    color: rgba(255, 255, 255, .62);
}

.sgo-nav-group__chevron {
    font-size: 18px;
    transition: transform var(--sgo-transition-fast);
}

.sgo-nav-group[open] .sgo-nav-group__chevron {
    transform: rotate(180deg);
}

.sgo-nav-group__items {
    margin: 2px 0 8px 36px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.sgo-nav-subitem {
    display: flex;
    overflow: hidden;
    align-items: center;
    padding: 7px 9px;
    border-radius: var(--sgo-radius-sm);
    color: rgba(255, 255, 255, .68) !important;
    font-size: 12px;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    gap: 8px;
}

.sgo-nav-subitem__icon {
    width: 18px;
    flex: 0 0 18px;
    font-size: 16px;
    text-align: center;
}

.sgo-nav-subitem__label {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
}

.sgo-nav-subitem:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff !important;
}

.sgo-nav-separator {
    overflow: hidden;
    padding: 11px 9px 4px;
    color: rgba(255, 255, 255, .42);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.sgo-shell__sidebar-footer {
    padding: var(--sgo-space-2);
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sgo-shell__sidebar-footer-separator {
    height: 1px;
    margin: var(--sgo-space-2) var(--sgo-space-3);
    background: rgba(255, 255, 255, .12);
}

.sgo-shell__version-link {
    color: rgba(255, 255, 255, .62) !important;
    font-size: 11px;
}

.sgo-shell__version-link > .material-icons {
    font-size: 19px;
}

.sgo-shell.is-collapsed .sgo-shell__brand-copy,
.sgo-shell.is-collapsed .sgo-nav-item__label,
.sgo-shell.is-collapsed .sgo-nav-item__shortcut,
.sgo-shell.is-collapsed .sgo-nav-group__chevron,
.sgo-shell.is-collapsed .sgo-nav-group__items,
html.sgo-sidebar-collapsed-initial .sgo-shell__brand-copy,
html.sgo-sidebar-collapsed-initial .sgo-nav-item__label,
html.sgo-sidebar-collapsed-initial .sgo-nav-item__shortcut,
html.sgo-sidebar-collapsed-initial .sgo-nav-group__chevron,
html.sgo-sidebar-collapsed-initial .sgo-nav-group__items {
    display: none;
}

.sgo-shell.is-collapsed .sgo-shell__brand-link,
html.sgo-sidebar-collapsed-initial .sgo-shell__brand-link {
    display: none;
}

.sgo-shell.is-collapsed .sgo-shell__brand,
html.sgo-sidebar-collapsed-initial .sgo-shell__brand {
    justify-content: center;
    padding: 0;
}

.sgo-shell.is-collapsed .sgo-nav-item,
.sgo-shell.is-collapsed .sgo-nav-group > summary,
html.sgo-sidebar-collapsed-initial .sgo-nav-item,
html.sgo-sidebar-collapsed-initial .sgo-nav-group > summary {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

.sgo-shell__workspace {
    min-width: 0;
}

.sgo-shell__topbar {
    position: sticky;
    z-index: 1000;
    top: 0;
    display: flex;
    height: var(--sgo-topbar-height);
    align-items: center;
    padding: 0 var(--sgo-space-6);
    border-bottom: 1px solid var(--sgo-color-line);
    background: color-mix(in srgb, var(--sgo-color-surface) 96%, transparent);
    box-shadow: var(--sgo-shadow-sm);
    gap: var(--sgo-space-4);
}

.sgo-shell__mobile-menu {
    display: none;
    color: var(--sgo-color-ink-800);
}

.sgo-shell__mobile-home {
    display: none;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 9px;
    background: var(--sgo-color-brand-900);
    color: var(--sgo-color-on-brand) !important;
    line-height: 1;
    text-decoration: none !important;
}

.sgo-shell__mobile-home > .material-icons {
    font-size: 21px;
}

.sgo-shell__mobile-home:hover {
    background: var(--sgo-color-brand-800);
    color: var(--sgo-color-on-brand) !important;
}

.sgo-shell__mobile-home:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px var(--sgo-color-focus-ring);
}

.sgo-shell__mobile-home.is-navigation-pending {
    background: var(--sgo-color-brand-700);
    box-shadow: 0 0 0 3px var(--sgo-color-focus-ring);
}

.sgo-shell__context {
    overflow: hidden;
    min-width: 0;
    flex: 1;
    max-width: calc(50% - 230px);
}

.sgo-shell__global-search {
    position: absolute;
    left: 50%;
    width: min(440px, calc(100% - 520px));
    min-width: 220px;
    transform: translateX(-50%);
}

.sgo-breadcrumbs {
    display: flex;
    overflow: hidden;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0 0 2px;
    padding: 0;
    background: transparent;
    color: var(--sgo-color-ink-500);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgo-breadcrumbs > li {
    display: inline-flex;
    overflow: hidden;
    min-width: 0;
    align-items: center;
    float: none;
    text-overflow: ellipsis;
}

.sgo-breadcrumbs > li + li::before {
    content: "/";
    padding: 0 6px;
    color: var(--sgo-color-line-strong);
}

.sgo-breadcrumbs > li::before {
    content: none;
}

.sgo-breadcrumbs > li > a,
.sgo-breadcrumbs > li:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgo-shell__screen-line {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.sgo-shell__screen-title {
    display: block;
    overflow: hidden;
    min-width: 0;
    color: var(--sgo-color-ink-950);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgo-shell__screen-status {
    display: inline-flex;
    min-height: 20px;
    flex: 0 0 auto;
    align-items: center;
    padding: 1px 7px;
    border: 1px solid var(--sgo-color-line-strong);
    border-radius: 999px;
    background: var(--sgo-color-surface);
    color: var(--sgo-color-ink-600);
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
}

.sgo-shell__user {
    display: flex;
    max-width: calc(50% - 230px);
    align-items: center;
    margin-left: auto;
    color: var(--sgo-color-ink-600);
    gap: var(--sgo-space-2);
}

.sgo-shell__profile-link {
    display: flex;
    align-items: center;
    border-radius: var(--sgo-radius-sm);
    color: var(--sgo-color-ink-600) !important;
    gap: var(--sgo-space-2);
    text-decoration: none !important;
}

.sgo-shell__profile-link:hover .sgo-shell__username {
    color: var(--sgo-color-brand-700);
}

.sgo-shell__profile-link:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px var(--sgo-color-focus-ring);
}

.sgo-shell__identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.sgo-shell__delegation {
    overflow: hidden;
    color: var(--sgo-color-ink-500);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgo-shell__avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--sgo-color-brand-100);
    color: var(--sgo-color-brand-700);
    font-weight: 700;
}

.sgo-shell__username {
    overflow: hidden;
    color: var(--sgo-color-ink-800);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgo-shell__logout-form {
    margin: 0;
}

.sgo-shell__icon-button {
    color: var(--sgo-color-ink-600);
}

.sgo-shell__icon-button:hover {
    background: var(--sgo-color-canvas);
    color: var(--sgo-color-danger);
}

.sgo-shell__content {
    min-height: calc(var(--sgo-viewport-height) - var(--sgo-topbar-height));
    padding: var(--sgo-space-1) var(--sgo-space-6) var(--sgo-space-6);
}

.sgo-shell__content > .sgo-v2-legacy-content {
    width: 100%;
    max-width: var(--sgo-content-max-width);
    margin: 0 auto;
}

.sgo-shell__overlay {
    display: none;
}

@media (max-width: 1180px) {
    .sgo-shell,
    .sgo-shell.is-collapsed {
        display: block;
    }

    .sgo-shell__sidebar {
        position: fixed;
        width: min(var(--sgo-sidebar-width), calc(100vw - 44px));
        transform: translateX(-105%);
        box-shadow: var(--sgo-shadow-md);
        transition: transform var(--sgo-transition-fast);
    }

    .sgo-shell.is-mobile-open .sgo-shell__sidebar {
        transform: translateX(0);
    }

    .sgo-shell.is-collapsed .sgo-shell__brand-copy,
    .sgo-shell.is-collapsed .sgo-nav-item__label,
    .sgo-shell.is-collapsed .sgo-nav-group__chevron {
        display: initial;
    }

    .sgo-shell.is-collapsed .sgo-shell__brand-link {
        display: flex;
    }

    .sgo-shell.is-collapsed .sgo-shell__brand {
        justify-content: space-between;
        padding: 0 var(--sgo-space-3) 0 var(--sgo-space-4);
    }

    .sgo-shell.is-collapsed .sgo-nav-item,
    .sgo-shell.is-collapsed .sgo-nav-group > summary {
        justify-content: flex-start;
        padding: var(--sgo-space-2) var(--sgo-space-3);
    }

    .sgo-shell.is-mobile-open .sgo-shell__overlay {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        background: var(--sgo-color-overlay);
    }

    .sgo-shell__mobile-menu {
        display: grid;
        flex: 0 0 36px;
    }

    .sgo-shell__mobile-home {
        display: grid;
    }

    .sgo-shell__collapse {
        visibility: hidden;
    }

    .sgo-shell__topbar {
        padding: 0 var(--sgo-space-3);
    }

    .sgo-shell__content {
        padding: var(--sgo-space-1) var(--sgo-space-3) var(--sgo-space-4);
    }

    .sgo-shell__identity {
        display: none;
    }
}

@media (max-width: 900px) {
    .sgo-shell__context,
    .sgo-shell__user {
        max-width: none;
    }

    .sgo-shell__global-search {
        position: static;
        width: 36px;
        min-width: 36px;
        flex: 0 0 36px;
        transform: none;
    }
}
