/* Employee Portal page primitives — global, scoped under .portal-shell so @Body content is styled. */

.portal-shell .portal-page-header {
    margin-bottom: 0.25rem;
}

.portal-shell .portal-page-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--portal-navy, #163654);
    line-height: 1.2;
}

.portal-shell .portal-page-sub {
    margin: 0.4rem 0 0;
    color: var(--portal-muted, #546474);
    font-size: 0.9rem;
    line-height: 1.45;
}

.portal-shell .portal-section {
    margin-top: 2.25rem;
}

.portal-shell .portal-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.portal-shell .portal-section-title {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 650;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-section-head .portal-section-title {
    margin-bottom: 0;
}

.portal-shell .portal-section-link {
    font-size: 0.85rem;
    font-weight: 550;
}

.portal-shell .portal-group-label {
    margin: 1.25rem 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted, #7D8996);
}

.portal-shell .portal-group-label:first-child {
    margin-top: 0;
}

.portal-shell .portal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.portal-shell .portal-list-row,
.portal-shell .portal-action-row,
.portal-shell .portal-content-row,
.portal-shell .portal-activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.portal-shell a.portal-list-row:hover,
.portal-shell a.portal-action-row:hover,
.portal-shell a.portal-content-row:hover,
.portal-shell button.portal-list-row:hover,
.portal-shell button.portal-activity-row:hover {
    background: var(--nx-surface-hover, #F2F5F7);
    text-decoration: none;
}

.portal-shell .portal-list-row--static {
    cursor: default;
}

.portal-shell .portal-list-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.portal-shell .portal-list-kind {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted, #7D8996);
}

.portal-shell .portal-list-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--portal-text, #223142);
    line-height: 1.35;
}

.portal-shell .portal-list-sub {
    font-size: 0.8125rem;
    color: var(--portal-muted, #546474);
    line-height: 1.4;
}

.portal-shell .portal-list-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.portal-shell .portal-list-chevron {
    color: var(--nx-text-muted, #7D8996);
    font-size: 1.2rem !important;
    flex-shrink: 0;
}

.portal-shell .portal-list-action {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--portal-accent, #3867D6);
    flex-shrink: 0;
}

.portal-shell .portal-list-attention {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--mud-palette-warning-darken, #b45309);
}

.portal-shell .portal-activity-row {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
}

.portal-shell .portal-activity-row + .portal-activity-row,
.portal-shell li + li > .portal-activity-row {
    border-top: 1px solid var(--portal-border, #E3E8ED);
}

.portal-shell .portal-course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-shell .portal-course-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.15rem 1.2rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 8px;
}

.portal-shell .portal-course-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-shell .portal-course-card-meta {
    font-size: 0.8125rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-shell .portal-course-progress {
    font-size: 0.8125rem;
    font-weight: 550;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    background: var(--nx-brand-navy-50, #F2F6F9);
    color: var(--nx-brand-navy-700, #1e4d73);
    white-space: nowrap;
}

.portal-shell .portal-status-chip--progress {
    background: var(--portal-accent-soft, rgba(56, 103, 214, 0.12));
    color: var(--portal-accent, #3867D6);
}

.portal-shell .portal-status-chip--wait {
    background: rgba(168, 107, 20, 0.12);
    color: var(--nx-semantic-warning, #A86B14);
}

.portal-shell .portal-status-chip--done {
    background: rgba(22, 122, 80, 0.12);
    color: #167A50;
}

.portal-shell .portal-status-chip--closed {
    background: var(--nx-surface-selected, #EAF0F5);
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-status {
    font-size: 0.75rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-status--warn {
    color: var(--nx-semantic-warning, #A86B14);
    font-weight: 600;
}

.portal-shell .portal-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.15rem;
}

.portal-shell .portal-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--portal-accent-soft, rgba(56, 103, 214, 0.12));
    color: var(--portal-accent, #3867D6);
    font-size: 0.8rem;
    font-weight: 550;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.portal-shell .portal-chip:hover {
    background: rgba(56, 103, 214, 0.18);
    text-decoration: none;
}

.portal-shell .portal-chip--active {
    background: var(--portal-accent, #3867D6);
    color: #fff;
    border-color: var(--portal-accent, #3867D6);
}

.portal-shell .portal-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.portal-shell .portal-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.85rem 0 1rem;
}

.portal-shell .portal-filter {
    border: 1px solid var(--nx-border-default, #D8E0E7);
    background: var(--portal-card, #fff);
    color: var(--portal-muted, #546474);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 550;
    cursor: pointer;
    font-family: inherit;
}

.portal-shell .portal-filter--active {
    background: var(--portal-accent, #3867D6);
    border-color: var(--portal-accent, #3867D6);
    color: #fff;
}

.portal-shell .portal-card {
    padding: 1.1rem 1.15rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 8px;
}

.portal-shell .portal-def {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--portal-border, #E3E8ED);
}

.portal-shell .portal-def:last-of-type {
    border-bottom: none;
}

.portal-shell .portal-def-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted, #7D8996);
}

.portal-shell .portal-def-value {
    font-size: 0.9375rem;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-more-link {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.85rem;
    font-weight: 550;
}

.portal-shell .portal-link-stack {
    padding: 0;
    overflow: hidden;
}

.portal-shell .portal-link-row {
    display: block;
    padding: 0.9rem 1.1rem;
    color: var(--portal-text, #223142);
    text-decoration: none;
    font-weight: 550;
    border-bottom: 1px solid var(--portal-border, #E3E8ED);
}

.portal-shell .portal-link-row:last-child {
    border-bottom: none;
}

.portal-shell .portal-link-row:hover {
    background: var(--nx-surface-hover, #F2F5F7);
    text-decoration: none;
}

.portal-shell .portal-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-shell .portal-identity-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: var(--portal-accent-soft, rgba(56, 103, 214, 0.12));
    color: var(--portal-accent, #3867D6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 650;
    flex-shrink: 0;
}

.portal-shell .portal-identity-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-identity-meta {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-ask-panel {
    margin-top: 1.35rem;
    padding: 1.35rem 1.25rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 10px;
}

.portal-shell .portal-ask-panel--hero {
    margin-top: 1.15rem;
}

.portal-shell .portal-ask-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--portal-accent, #3867D6);
    margin-bottom: 0.55rem;
}

.portal-shell .portal-ask-badge-icon {
    font-size: 1rem !important;
}

.portal-shell .portal-ask-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 650;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-ask-sub {
    margin: 0.35rem 0 1rem;
    font-size: 0.875rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-ask-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-shell .portal-ask-submit {
    align-self: flex-start;
    min-width: 8rem;
}

.portal-shell .portal-ai-answer {
    margin: 0 0 1rem;
    white-space: pre-wrap;
    line-height: 1.55;
    color: var(--portal-text, #223142);
    font-size: 0.95rem;
}

.portal-shell .portal-related {
    margin-top: 1rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--portal-border, #E3E8ED);
}

.portal-shell .portal-related-title {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-still-need {
    margin-top: 1.1rem;
    padding: 0.95rem 1rem;
    background: var(--nx-brand-navy-50, #F2F6F9);
    border-radius: 8px;
}

.portal-shell .portal-still-need-title {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 650;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-search-row {
    margin-top: 1.25rem;
}

.portal-shell .portal-empty {
    padding: 1.75rem 1.15rem;
    text-align: center;
    background: var(--portal-card, #fff);
    border: 1px dashed var(--nx-border-default, #D8E0E7);
    border-radius: 8px;
}

.portal-shell .portal-empty-inline {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-empty--rich {
    text-align: left;
}

.portal-shell .portal-empty-title {
    margin: 0;
    font-weight: 600;
    color: var(--portal-text, #223142);
}

.portal-shell .portal-empty-body {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    color: var(--portal-muted, #546474);
    line-height: 1.45;
}

.portal-shell .portal-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.portal-shell .portal-empty--rich .portal-empty-actions {
    justify-content: flex-start;
}

.portal-shell .portal-empty-steps {
    margin: 0.75rem 0 1rem;
    padding-left: 1.15rem;
    color: var(--portal-muted, #546474);
    font-size: 0.875rem;
    line-height: 1.5;
}

.portal-shell .portal-inline-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--portal-muted, #546474);
}

.portal-shell .portal-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.portal-shell .portal-skeleton-line {
    height: 0.75rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8edf2 0%, #f4f6f8 50%, #e8edf2 100%);
    background-size: 200% 100%;
    animation: portal-shimmer 1.2s ease-in-out infinite;
}

.portal-shell .portal-skeleton-line--title {
    height: 1.1rem;
    width: 45%;
}

.portal-shell .portal-skeleton-line--row {
    height: 3.5rem;
    width: 100%;
    border-radius: 8px;
}

@keyframes portal-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.portal-shell .portal-device-help {
    flex-shrink: 0;
    white-space: nowrap;
}

.portal-shell .portal-signout-form {
    margin: 0;
}

.portal-shell .portal-home-greeting {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--nx-brand-navy-900, #163654);
    line-height: 1.2;
}

.portal-shell .portal-home-sub {
    margin: 0.4rem 0 0;
    color: var(--nx-text-secondary, #546474);
    font-size: 0.95rem;
}

.portal-shell .portal-home-attention-count {
    margin: 0.55rem 0 0;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--portal-accent, #3867D6);
}

@media (min-width: 600px) {
    .portal-shell .portal-ask-row {
        flex-direction: row;
        align-items: flex-start;
    }

    .portal-shell .portal-ask-field {
        flex: 1;
    }
}

@media (min-width: 960px) {
    .portal-shell .portal-page-title {
        font-size: 1.75rem;
    }
}

/* —— Detail / article helpers (Help article, Procedure, Policy ack, Approval) —— */
.portal-shell .portal-back {
    margin-left: -0.5rem;
    margin-bottom: 0.75rem;
    color: var(--nx-text-link, #28577F) !important;
}

.portal-shell .portal-article {
    margin-top: 0.5rem;
    padding: 1.25rem 1.1rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 8px;
}

.portal-shell .portal-article-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted, #7D8996);
}

.portal-shell .portal-article-summary {
    margin: 0.85rem 0 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--nx-text-primary, #3B4A5A);
    white-space: pre-wrap;
}

.portal-shell .portal-change-summary {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--nx-text-primary, #3B4A5A);
}

.portal-shell .portal-procedure-meta {
    margin-bottom: 1rem;
}

.portal-shell .portal-procedure-body {
    padding: 0.5rem 0 1rem;
}

.portal-shell .portal-ack {
    margin-top: 0.5rem;
    padding: 1.25rem 1.1rem;
    background: var(--portal-card, #fff);
    border: 1px solid var(--portal-border, #E3E8ED);
    border-radius: 8px;
}

.portal-shell .portal-ack-actions {
    margin-top: 1.25rem;
}

.portal-shell .portal-approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Learning player — full-bleed canvas so Contents can dock far right */
.portal-shell .portal-page--learning-player {
    max-width: none;
    width: 100%;
}

.portal-shell .portal-main-inner:has(.portal-page--learning-player) {
    max-width: none;
    margin: 0;
    width: 100%;
    padding: 1.25rem 0.85rem 2.25rem 1.15rem;
    box-sizing: border-box;
}

@media (min-width: 960px) {
    .portal-shell .portal-main-inner:has(.portal-page--learning-player) {
        padding: 1.5rem 1rem 2.75rem 1.25rem;
    }

    /* MudIconButton puts Class on its own root — scoped player CSS needs a global assist */
    html body .learning-player .learning-player-contents-btn {
        display: none !important;
    }
}

/* Profile menu activator — global .mud-menu gets a white surface; keep it invisible on navy */
html body .portal-shell .portal-profile-menu.mud-menu,
html body .portal-shell .portal-profile-menu.mud-menu .mud-menu-activator {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;
}

