:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    color: #1c2540;
    background: #f4f6fb;
}

h1, h2, h3 {
    color: #14213d;
}

code {
    background: #eef1fb;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
    font-size: 0.9em;
}

a {
    color: #3b4fd6;
}

h1:focus {
    outline: none;
}

/* Visible keyboard focus everywhere (WCAG 2.2 AA - 2.4.11/2.4.7): the
   default browser outline is inconsistent across controls and invisible on
   some of the dark surfaces in this app (see NavMenu.razor.css for the
   sidebar's own higher-contrast variant). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b4fd6;
    outline-offset: 2px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ==========================================================================
   Shared classes for the Researchers module (list/details/create/edit) -
   deliberately global (not component-scoped .razor.css) since they're reused
   by several sibling page components; Blazor CSS isolation would otherwise
   silently drop these rules for every component but the one that "owns" them.
   ========================================================================== */

.placeholder-panel {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px dashed #c7d0ec;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 42rem;
    margin-top: 1rem;
}

.placeholder-panel__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.placeholder-panel p {
    margin: 0;
    color: #4a5578;
    line-height: 1.55;
}

.login-card__error {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    background: #fdecea;
    border: 1px solid #f3c4bd;
    border-radius: 0.5rem;
    color: #7a2b21;
    font-size: 0.9rem;
}

.app-success-banner {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    background: #e4f7ee;
    border: 1px solid #b7e4cd;
    border-radius: 0.5rem;
    color: #1f8a5f;
    font-size: 0.9rem;
}

.researchers-button {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 0.5rem;
    background: #3b4fd6;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.researchers-button:hover {
    background: #2f3fb5;
}

.researchers-button:disabled {
    background: #b7c0e6;
    cursor: not-allowed;
}

/* Secondary action (e.g. "Anuluj", "Wróć") - same size/shape as the primary
   button so the two read as a deliberate pair, never a stray text link that
   could be mistaken for a dead end. */
.researchers-button--secondary {
    background: #fff;
    border: 1px solid #d3dbf0;
    color: #14213d;
}

.researchers-button--secondary:hover {
    background: #eef1fb;
}

/* Card section header: title + a single contextual action, e.g. "Dodaj
   identyfikator" - keeps the add-form toggle out of the middle of the table
   it belongs to (see Etap 4 UX cleanup for the rationale). */
.card-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.card-section__header h3 {
    margin: 0;
}

.card-toggle-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e4e8f3;
}

.card-toggle-panel h4 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #6c7aa0;
}

/* Detail-page card sections (Dane podstawowe / Identyfikatory / Afiliacje /
   ...) and the destructive action button - used across every "{Naukowcy,
   Publikacje, Struktura, Użytkownicy}Details" page. Kept global rather than
   in one page's *.razor.css on purpose: Blazor CSS isolation only scopes a
   rule to the elements literally written in the .css file's own component,
   so a class defined in e.g. ResearcherDetails.razor.css silently does not
   style the same class name written in PublicationDetails.razor or
   StrukturaDetails.razor - moving these here once, for every page that
   shares the pattern, avoids that trap instead of re-discovering it per page. */
.researcher-detail__section {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.researcher-detail__section h3 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
}

.researcher-detail__grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.researcher-detail__grid dt {
    color: #6c7aa0;
    font-size: 0.82rem;
}

.researcher-detail__grid dd {
    margin: 0;
    font-size: 0.9rem;
    color: #14213d;
}

.researcher-detail__danger {
    padding: 0.55rem 0.9rem;
    border: 1px solid #f3c4bd;
    border-radius: 0.5rem;
    background: #fdecea;
    color: #7a2b21;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.researcher-detail__danger:hover {
    background: #fbdcd8;
}

.researchers-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.75rem;
    overflow: hidden;
}

.researchers-table th,
.researchers-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eef1fb;
    font-size: 0.9rem;
}

.researchers-table th {
    background: #f4f6fb;
    color: #6c7aa0;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.researchers-table tbody tr:last-child td {
    border-bottom: none;
}

.researchers-actions a {
    margin-right: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.researchers-status {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.researchers-status--active {
    background: #e4f7ee;
    color: #1f8a5f;
}

.researchers-status--inactive {
    background: #f1f2f6;
    color: #6c7aa0;
}

.researchers-status--pending {
    background: #fdf3e0;
    color: #a3691a;
}

.researchers-muted {
    color: #a3aecb;
    font-size: 0.85rem;
}

.org-tree-card {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.org-tree,
.org-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 1.5rem;
}

.org-tree {
    padding-left: 0;
}

.org-tree ul {
    border-left: 1px dashed #d3dbf0;
    margin-left: 0.65rem;
}

.org-tree li {
    margin: 0.15rem 0;
}

.org-tree__node {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
}

.org-tree__node:hover {
    background: #f4f6fb;
}

.org-tree__node-icon {
    font-size: 1rem;
}

.org-tree__node a {
    font-weight: 600;
    text-decoration: none;
}

.org-tree__node a:hover {
    text-decoration: underline;
}

.org-tree__node-type {
    color: #6c7aa0;
    font-size: 0.8rem;
    font-weight: 400;
}

.org-tree__node--inactive a {
    color: #a3aecb;
    font-weight: 400;
}

.researcher-form {
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 48rem;
}

.researcher-form h3 {
    margin: 1.5rem 0 0.75rem;
    font-size: 0.95rem;
}

.researcher-form__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.researcher-form__grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #14213d;
}

.researcher-form__grid input {
    padding: 0.55rem 0.7rem;
    border: 1px solid #d3dbf0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.researcher-form__field-error {
    color: #c0392b;
    font-size: 0.78rem;
    font-weight: 400;
}

.researcher-form__password-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.researcher-form__password-row input {
    flex: 1;
}

.password-toggle-button {
    padding: 0.55rem 0.75rem;
    border: 1px solid #d3dbf0;
    border-radius: 0.5rem;
    background: #fff;
    color: #14213d;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.password-toggle-button:hover {
    background: #eef1fb;
}

.researcher-form__caps-lock-warning {
    color: #a3691a;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
}

/* MFA QR enrollment (SEC-AUTH-001-QR). Fixed white background regardless of
   page theme - a QR code needs strong light/dark module contrast to scan
   reliably, independent of whatever color scheme the surrounding page uses. */
.mfa-qr-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    margin: 0.75rem 0;
    padding: 0.9rem;
    background: #ffffff;
    border: 1px solid #d3dbf0;
    border-radius: 0.6rem;
    box-sizing: border-box;
}

.mfa-qr-container svg {
    width: 100%;
    height: auto;
    display: block;
}

.researcher-form__error-summary {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    background: #fdecea;
    border: 1px solid #f3c4bd;
    border-radius: 0.5rem;
    color: #7a2b21;
    font-size: 0.9rem;
}

.researcher-form__error-summary ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.researcher-form__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.researcher-detail__checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #14213d;
}

.researcher-detail__add-identifier-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.researcher-detail__add-identifier-row select,
.researcher-detail__add-identifier-row input[type="text"] {
    padding: 0.5rem 0.65rem;
    border: 1px solid #d3dbf0;
    border-radius: 0.5rem;
    font-size: 0.88rem;
}

.researcher-detail__add-identifier-row input[type="text"] {
    flex: 1;
    min-width: 14rem;
}

/* Shared by every page under LoginLayout (Login, ForgotPassword, ResetPassword,
   ForcedPasswordChange) - kept global rather than in a single page's scoped
   .razor.css, since Blazor CSS isolation only applies a component's scoped
   styles to markup that component itself renders. A page other than the one
   owning the .razor.css file would render an unstyled login-card otherwise. */
.login-card {
    width: 100%;
    max-width: 24rem;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-card__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.login-card__mark {
    display: flex;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.6rem;
    object-fit: cover;
}

.login-card__brand h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #14213d;
}

.login-card__brand p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #6c7aa0;
}

.login-card__error {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    background: #fdecea;
    border: 1px solid #f3c4bd;
    border-radius: 0.5rem;
    color: #7a2b21;
    font-size: 0.9rem;
}

.login-card__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-card__form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #14213d;
}

.login-card__form input {
    padding: 0.6rem 0.75rem;
    border: 1px solid #d3dbf0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 400;
}

.login-card__form input:focus {
    outline: 2px solid #3b4fd6;
    outline-offset: 1px;
}

.login-card__form button {
    margin-top: 0.25rem;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: #3b4fd6;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.login-card__form button:hover {
    background: #2f3fb5;
}

.login-card__entra {
    margin-top: 1.25rem;
    padding: 0.7rem 0.85rem;
    background: #f4f6fb;
    border: 1px dashed #d3dbf0;
    border-radius: 0.5rem;
    color: #6c7aa0;
    font-size: 0.8rem;
    text-align: center;
}

.login-card__footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #a3aecb;
}

/* ==========================================================================
   Module landing pages (UX-INFORMATION-ARCHITECTURE-001): entry page for a
   business area (Dyscypliny, Miejsca publikacji) with local sub-navigation
   and short summary cards linking into each subsection. Global rather than
   scoped .razor.css because <ModuleLocalNav>/<SecondaryActionsMenu> render
   ChildContent authored in each caller page - Blazor CSS isolation only
   scopes rules to markup literally written in the owning component's own
   file, so a scoped rule here would silently never match that content.
   ========================================================================== */

.module-local-nav {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e4e8f3;
}

.module-local-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #4a5578;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.module-local-nav__link:hover {
    background: #eef1fb;
    color: #14213d;
}

.module-local-nav__link.active {
    color: #3b4fd6;
    border-bottom-color: #3b4fd6;
}

.module-landing__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.module-landing__card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
}

.module-landing__card:hover {
    border-color: #3b4fd6;
}

.module-landing__card h3 {
    margin: 0;
    font-size: 1rem;
}

.module-landing__card p {
    margin: 0;
    color: #6c7aa0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.module-landing__secondary {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #e4e8f3;
}

.module-landing__secondary a {
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 1rem;
}

/* RC10 (UX-CLEANUP-0.15.0-RC10): "current classification" hero card on
   /dyscypliny - deliberately visually heavier than .module-landing__card
   (border + slight tint, not just a plain list item) so the active
   classification reads as the primary answer to "what applies right now",
   with the historical/secondary cards below it clearly demoted. */
.current-classification-card {
    background: #f5f7ff;
    border: 1px solid #ccd6ff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.current-classification-card__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3b4fd6;
}

.current-classification-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.current-classification-card__meta {
    margin: 0.5rem 0 1rem;
    color: #6c7aa0;
    font-size: 0.85rem;
}

/* Status filter bar (UX-INFORMATION-ARCHITECTURE-POLISH-001): a second,
   visually distinct level below <ModuleLocalNav> on pages like
   /miejsca-publikacji/strony-internetowe. ModuleLocalNav changes the
   sub-module (a real navigation - different page, different URL); this
   filters records within the current page (same URL, same tabpanel set).
   Deliberately not styled like .module-local-nav (underlined tabs) or
   .researchers-button (solid primary action) so the two levels never read
   as "the same kind of control" - a compact segmented/pill group instead,
   with extra top margin to separate it from the local nav above and a
   small top-margin-only gap before the results panel/table below it. */
.status-filter-section {
    margin: 0.5rem 0 1.25rem;
}

.status-filter-section__label {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c7aa0;
}

.status-filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.3rem;
    background: #eef1fb;
    border-radius: 999px;
}

.status-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #4a5578;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
}

.status-filter:hover {
    background: rgba(59, 79, 214, 0.08);
}

.status-filter--active {
    background: #fff;
    color: #3b4fd6;
    box-shadow: 0 1px 3px rgba(20, 33, 61, 0.15);
}

/* Native <details>/<summary> secondary-actions menu: keyboard toggling and
   focus handling come from the browser for free, so there is no custom JS
   and no risk of a focus trap (WCAG 2.1.2). */
.secondary-actions-menu {
    position: relative;
    display: inline-block;
}

.secondary-actions-menu__toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border: 1px solid #d3dbf0;
    border-radius: 0.5rem;
    background: #fff;
    color: #14213d;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
}

.secondary-actions-menu__toggle::-webkit-details-marker {
    display: none;
}

.secondary-actions-menu__toggle:hover {
    background: #eef1fb;
}

.secondary-actions-menu[open] .secondary-actions-menu__toggle {
    background: #eef1fb;
}

.secondary-actions-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 14rem;
    background: #fff;
    border: 1px solid #e4e8f3;
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 12px 30px rgba(20, 33, 61, 0.15);
}

.secondary-actions-menu__panel a,
.secondary-actions-menu__panel button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    border-radius: 0.4rem;
    background: none;
    color: #14213d;
    font-size: 0.88rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.secondary-actions-menu__panel a:hover,
.secondary-actions-menu__panel button:hover {
    background: #eef1fb;
}

/* ==========================================================================
   Mobile layout (UX-INFORMATION-ARCHITECTURE-001) - no horizontal page
   overflow, touch-sized primary actions, and tables that scroll inside their
   own row instead of forcing the whole page to scroll sideways.
   ========================================================================== */

body {
    overflow-x: hidden;
}

@media (max-width: 860px) {
    .researchers-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions .researchers-button,
    .page-header__actions .secondary-actions-menu,
    .page-header__actions .secondary-actions-menu__toggle {
        width: 100%;
        justify-content: center;
    }

    .researchers-button,
    .researchers-button--secondary,
    .secondary-actions-menu__toggle {
        min-height: 2.75rem;
    }

    /* UX-INFORMATION-ARCHITECTURE-POLISH-001: below 860px, .module-local-nav
       used overflow-x:auto + white-space:nowrap, which clipped the last tab
       (e.g. "Strony internetowe" read as "Strony intern...") instead of
       truncating it visibly with an ellipsis - the text just ran past the
       visible edge of the scrollable strip. Wrapping onto additional rows
       keeps every label fully readable without any horizontal scroll and
       without shrinking the font. */
    .module-local-nav {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .module-local-nav__link {
        white-space: normal;
        text-align: center;
    }

    .status-filter {
        min-height: 2.75rem;
    }
}