.topbar {
    gap: 1rem;
}

.public-header__inner {
    padding-block: 8px;
}

.shell-context,
.shell-user-actions {
    display: flex;
    align-items: center;
}

.shell-user-actions {
    gap: .7rem;
}

.shell-context__details,
.shell-profile,
.shell-notifications {
    position: relative;
}

.shell-context__summary,
.shell-profile__summary,
.shell-icon-button {
    list-style: none;
    cursor: pointer;
}

.shell-context__summary::-webkit-details-marker,
.shell-profile__summary::-webkit-details-marker,
.shell-icon-button::-webkit-details-marker {
    display: none;
}

.shell-context__summary,
.shell-profile__summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .45rem .65rem;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: border-color 140ms ease, background 140ms ease;
}

.shell-context__summary:hover,
.shell-profile__summary:hover,
.shell-context__details[open] > .shell-context__summary,
.shell-profile[open] > .shell-profile__summary {
    border-color: var(--border-subtle);
    background: color-mix(in srgb, var(--surface-1) 86%, transparent);
}

.shell-context__icon,
.shell-profile__avatar,
.shell-context-option__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #172731;
    color: #f5f8fa;
    font-weight: 800;
}

.shell-context__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #314650;
}

.shell-context__icon[data-context-kind="internal"] {
    background: #d62832;
    border-color: #e54b54;
}

.shell-profile__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #344a55;
}

.shell-profile__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shell-context__copy,
.shell-profile__copy {
    min-width: 0;
    display: grid;
    gap: .08rem;
    text-align: left;
}

.shell-context__copy strong,
.shell-profile__copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-context__copy small,
.shell-profile__copy small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-context__copy {
    max-width: min(420px, 36vw);
}

.shell-profile__copy {
    max-width: 190px;
}

.shell-chevron {
    color: var(--text-secondary);
    font-size: .9rem;
}

.shell-icon-button {
    width: 42px;
    height: 42px;
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: 11px;
    background: transparent;
    color: var(--text-secondary);
    transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.shell-icon-button:hover,
.shell-notifications[open] > .shell-icon-button {
    color: var(--text-primary);
    border-color: #435a65;
    background: var(--surface-1);
}

.shell-notification-dot {
    width: 7px;
    height: 7px;
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 50%;
    background: var(--brand-red);
}

.shell-popover {
    min-width: 280px;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 90;
    padding: .65rem;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: #0c1d27;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .38);
}

.shell-context__popover {
    left: 0;
    min-width: min(410px, calc(100vw - 32px));
}

.shell-profile__popover,
.shell-notifications__popover {
    right: 0;
}

.shell-popover__label {
    margin: .2rem .35rem .55rem;
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.shell-popover__empty {
    display: block;
    padding: .75rem;
    color: var(--text-secondary);
    font-size: .84rem;
}

.shell-context__options {
    display: grid;
    gap: .25rem;
}

.shell-context-option,
.shell-profile__popover > a,
.shell-profile__popover form button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .75rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.shell-context-option:hover,
.shell-profile__popover > a:hover,
.shell-profile__popover form button:hover {
    background: #142a36;
}

.shell-context-option--active {
    background: rgba(214, 40, 50, .10);
}

.shell-context-option__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: .8rem;
}

.shell-context-option > span:last-child {
    min-width: 0;
    display: grid;
    gap: .08rem;
}

.shell-context-option strong {
    font-size: .85rem;
}

.shell-context-option small {
    color: var(--text-secondary);
    font-size: .72rem;
}

.shell-context-option--link {
    color: var(--text-primary);
    text-decoration: none;
}

.shell-popover__separator {
    height: 1px;
    margin: .35rem .2rem;
    background: var(--border-subtle);
}

.shell-profile__popover form {
    margin: 0;
}

@media (max-width: 760px) {
    .shell-context__copy small,
    .shell-profile__copy {
        display: none;
    }

    .shell-context__copy {
        max-width: 42vw;
    }

    .shell-popover {
        position: fixed;
        top: 76px;
        left: 12px;
        right: 12px;
        min-width: 0;
    }
}
