/* NextDesk identity cells — loads alongside stock Filament CSS */
.fi-identity-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.fi-identity-avatar {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 0.5rem;
    background-color: rgb(243 244 246);
    padding: 0.15rem;
}

.dark .fi-identity-avatar {
    background-color: rgb(39 39 42);
}

.fi-identity-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-identity-panel {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.fi-identity-panel img,
.fi-in-image img.fi-entity-avatar {
    width: 7rem !important;
    height: 7rem !important;
    object-fit: contain !important;
    border-radius: 0.75rem;
    background-color: rgb(243 244 246);
    padding: 0.65rem;
}

.dark .fi-identity-panel img,
.dark .fi-in-image img.fi-entity-avatar {
    background-color: rgb(39 39 42);
}

/* Brand: logo + NextDesk in one row (sidebar + login) */
.fi-logo:has(.fi-nextdesk-brand):not(.hidden) {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.fi-logo.hidden:has(.fi-nextdesk-brand) {
    display: none !important;
}

.fi-nextdesk-brand {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.55rem;
    height: auto !important;
    max-width: 100%;
}

.fi-nextdesk-brand-logo {
    display: block;
    height: 2rem !important;
    width: 2rem !important;
    object-fit: contain;
    flex-shrink: 0;
}

.fi-nextdesk-brand-text {
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: rgb(24 24 27);
    white-space: nowrap;
}

.dark .fi-nextdesk-brand-text {
    color: rgb(250 250 250);
}

.fi-sidebar-header {
    overflow: visible;
}

.fi-sidebar-header .fi-logo {
    padding-block: 0;
}

.fi-nextdesk-theme-switcher .fi-theme-switcher {
    border: 1px solid rgba(24, 24, 27, 0.08);
    border-radius: 0.625rem;
    padding: 0.15rem;
    background: rgba(255, 255, 255, 0.7);
}

.dark .fi-nextdesk-theme-switcher .fi-theme-switcher {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(24, 24, 27, 0.55);
}
