/* Keep the existing layouts and controls; make keyboard focus visible. */
:is(.portal-shell, .platform-shell, .worker-portal-screen, .login-shell)
    :is(a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid var(--entria-color-primary) !important;
    outline-offset: 2px;
}

/* Header names may collapse, but company choices must remain readable. */
.portal-shell .portal-context-menu .portal-context-name {
    display: inline !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Neutral helper text on the existing light panels needs readable contrast. */
.portal-shell .portal-content :is(
    .work-schedule-catalog-muted, .work-schedule-catalog-stack small,
    .work-schedule-section-heading p, .work-schedule-option small,
    .work-schedule-overtime-help, .work-schedule-entry-rules summary small,
    .form-hint, .company-kpi-copy small, .company-daily-column small,
    .school-subpanel-header p, .school-empty-row, .school-empty-state, .school-empty-cell
) {
    color: var(--entria-color-text-helper) !important;
}

@media (max-width: 1080px) {
    .portal-mobile-menu-control:focus-visible ~ .portal-shell .portal-mobile-menu-button {
        outline: 2px solid var(--entria-color-primary);
        outline-offset: 2px;
    }
}

@media (max-width: 640px) {
    /* Anchor the menu to the header so a narrow company icon cannot clip it. */
    .portal-shell .portal-context-switcher {
        position: static;
    }

    .portal-shell .portal-context-menu {
        left: 12px;
        right: 12px;
        width: auto;
    }

    .portal-shell .review-sort {
        min-height: 32px;
    }

}

@media (max-width: 980px) {
    /* Put sign-in controls first when the two-column login becomes a stack. */
    .login-shell .login-card > .login-panel {
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-shell .portal-top-navigation {
        transition: none;
    }
}
