/* Shell theme defaults — single source of truth for portal colors */
:root {
    --shell-default-primary: #095ADB;
    --shell-default-secondary: #19726B;

    --shell-light-bg: #FFFFFF;
    --shell-light-text: #140802;
    --shell-light-muted: #64748b;
    --shell-light-surface: #f8fafc;

    --shell-dark-bg: #140802;
    --shell-dark-text: #FFFFFF;
    --shell-dark-muted: #94a3b8;
}

/* Shellbar — always primary bg, always white text */
.fd-shellbar { background-color: var(--shell-primary) !important; }
.fd-shellbar .fd-shellbar__title { color: #FFF !important; }
.fd-shellbar .fd-shellbar__action .fd-button,
.fd-shellbar .fd-shellbar__action .fd-avatar { color: #FFF !important; border-color: transparent !important; }
.fd-shellbar .fd-shellbar__action .fd-button:hover,
.fd-shellbar .fd-shellbar__action .fd-avatar:hover { background-color: rgba(255,255,255,.15) !important; }
.fd-shellbar .fd-avatar { background-color: var(--shell-secondary) !important; color: #FFF !important; }

/* Side nav — selected item accent */
.fd-side-nav .fd-nested-list__link.is-selected,
.fd-side-nav .is-selected .fd-nested-list__link { color: var(--shell-primary) !important; border-left: 3px solid var(--shell-primary); }
.fd-side-nav .fd-nested-list__icon { color: inherit !important; }
.fd-side-nav .fd-nested-list__icon img { filter: invert(var(--shell-nav-icon-invert, 0)); max-width: 32px; max-height: 32px; }
.lui-side-nav__footer { border-top: none !important; }
.lui-side-nav__footer .fd-button { color: var(--shell-text) !important; }
.lui-side-nav__footer .fd-button:hover { background-color: var(--shell-hover-bg) !important; }

/* Luigi alert / message strip, this will make it so its always readable regardless of theme */
.fd-message-strip,
.fd-message-strip__text { color: #333 !important; }

/* Profile popover */
.fd-popover,
.fd-popover__body {
    max-width: min(24rem, calc(100vw - 2rem));
}
.fd-popover__body .fd-menu__link { color: var(--shell-text) !important; }
.fd-popover__body .fd-menu__item:hover { background-color: var(--shell-hover-bg) !important; }
.fd-popover__body .lui-profile-simple-menu__header,
.fd-popover__body .lui-profile-simple-menu__header * {
    color: var(--shell-text) !important;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}
body[data-theme="dark"] .fd-popover__body .lui-profile-simple-menu__header span,
body[data-theme="dark"] .fd-popover__body .lui-profile-simple-menu__header small,
body[data-theme="dark"] .fd-popover__body .lui-profile-simple-menu__header div:not(:first-child) {
    color: var(--shell-dark-muted) !important;
}
.dark-mode-toggle .fd-menu__link { cursor: pointer; }
