/* ==========================================================================
   1. Дизайн-система «Ресурса»
   Единый визуальный слой поверх MudBlazor: токены, типовые блоки страниц и
   производственные блоки плана. Цвета статусов остаются семантическими
   (раздел 17.1 мастер-ТЗ). Все размеры заданы здесь один раз, чтобы не
   копировать одинаковый CSS по компонентам.
   ========================================================================== */
:root {
    --resurs-navy: #152A4A;
    --resurs-navy-deep: #0E1D35;
    --resurs-nav-text: #E6ECF5;

    /* Единственный акцентный цвет интерфейса. */
    --resurs-accent: #1F6FEB;
    --resurs-accent-strong: #1A5DC7;
    --resurs-accent-soft: #EDF3FB;

    --resurs-bg: #F1F3F7;
    --resurs-surface: #FFFFFF;
    --resurs-border: #E2E6EE;
    --resurs-border-strong: #D2D9E0;

    --resurs-text: #16202F;
    --resurs-text-muted: #5A6779;

    --resurs-radius: 8px;
    --resurs-radius-sm: 6px;
    --resurs-gap: 12px;

    /* Единая цветовая система статусов задания (раздел 17.1 мастер-ТЗ). */
    --resurs-status-new: #5A6672;
    --resurs-status-progress: #0B6E99;
    --resurs-status-done: #2E7D4F;
    --resurs-status-partial: #B26A00;
    --resurs-status-failed: #C0392B;
}

.mud-main-content {
    min-height: 100vh;
    background-color: var(--resurs-bg);
}

/* --------------------------------------------------------------- логотип */
.resurs-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--resurs-accent);
    text-decoration: none;
}

.resurs-logo__mark {
    flex: none;
    display: block;
    /* Знак остаётся фирменно-синим даже в верхней панели, где текст логотипа белый. */
    color: var(--resurs-accent);
}

.resurs-logo__text {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    color: var(--resurs-text);
    white-space: nowrap;
}

/* ---------------------------------------------------- верхняя панель */
.resurs-appbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.resurs-appbar .resurs-logo,
.resurs-appbar .resurs-logo__text {
    color: #FFFFFF;
}

/* Кнопка пользователя: ФИО и роль в две строки внутри компактной панели. */
.resurs-appbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 280px;
    min-height: 44px;
    padding: 2px 8px;
    border-radius: var(--resurs-radius);
    cursor: pointer;
}

.resurs-appbar-user:hover,
.resurs-appbar-user:focus-visible {
    background-color: rgba(255, 255, 255, 0.10);
}

.resurs-appbar-user__name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
}

.resurs-appbar-user__full,
.resurs-appbar-user__role {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resurs-appbar-user__full {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    color: #FFFFFF;
}

.resurs-appbar-user__role {
    font-size: 0.6875rem;
    line-height: 1.2;
    color: #C3D0E4;
}

.resurs-user-menu {
    min-width: 232px;
    padding: 4px 0;
    color: var(--resurs-text);
}

.resurs-user-menu__head {
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--resurs-border);
    margin-bottom: 4px;
}

/* Форма выхода не показывается сама по себе: она нужна только как цель кнопки «Выйти». */
.resurs-user-menu__form {
    margin: 0;
    padding: 0;
    display: contents;
}

/* ------------------------------------------------------------- навигация */
.resurs-nav-group + .resurs-nav-group {
    margin-top: 4px;
    border-top: 1px solid var(--resurs-border);
    padding-top: 4px;
}

.resurs-nav-group__title {
    padding: 10px 16px 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--resurs-text-muted);
}

.mud-navmenu .mud-nav-link {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.9375rem;
}

.mud-navmenu .mud-nav-link.active {
    background-color: var(--resurs-accent-soft);
    font-weight: 600;
}

/* Тёмная навигация — утверждённое направление CORR-05. */
.resurs-drawer.mud-drawer {
    color: var(--resurs-nav-text);
    background: linear-gradient(180deg, var(--resurs-navy) 0%, var(--resurs-navy-deep) 100%);
    border-right: 0;
}

.resurs-drawer .resurs-nav-group + .resurs-nav-group {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.resurs-drawer .resurs-nav-group__title {
    color: #AFC0D8;
}

.resurs-drawer .mud-nav-link {
    min-height: 44px;
    margin: 2px 8px;
    color: var(--resurs-nav-text);
    border-radius: var(--resurs-radius);
}

.resurs-drawer .mud-nav-link .mud-nav-link-icon {
    color: #C3D0E4;
}

.resurs-drawer .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.resurs-drawer .mud-nav-link.active {
    color: #FFFFFF;
    background-color: rgba(31, 111, 235, 0.24);
    box-shadow: inset 3px 0 0 var(--resurs-accent);
}

.resurs-drawer .mud-nav-link.active .mud-nav-link-icon {
    color: #FFFFFF;
}

.resurs-drawer .mud-nav-link:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: -2px;
}

/* ---------------------------------------------------- заголовок страницы */
.resurs-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.resurs-page-header__main {
    min-width: 0;
}

.resurs-page-header__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--resurs-text);
    overflow-wrap: anywhere;
}

.resurs-page-header__description {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--resurs-text-muted);
    max-width: 74ch;
    overflow-wrap: anywhere;
}

.resurs-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ------------------------------------------------- панели, секции, формы */
.mud-main-content .mud-paper-outlined,
.mud-main-content .mud-card {
    background-color: var(--resurs-surface);
    border-color: var(--resurs-border);
    border-radius: var(--resurs-radius);
    box-shadow: 0 1px 2px rgba(21, 42, 74, 0.06);
}

.mud-main-content .mud-table,
.mud-dialog .mud-table {
    overflow: hidden;
    background-color: var(--resurs-surface);
    border: 1px solid var(--resurs-border);
    border-radius: var(--resurs-radius);
    box-shadow: none;
}

.mud-main-content .mud-table-head .mud-table-cell,
.mud-dialog .mud-table-head .mud-table-cell {
    color: var(--resurs-text-muted);
    font-weight: 600;
    background-color: #F7F9FC;
}

.mud-main-content .mud-table-row:hover > .mud-table-cell {
    background-color: #F3F7FE;
}

.resurs-panel {
    border: 1px solid var(--resurs-border);
    border-radius: var(--resurs-radius);
    background-color: var(--resurs-surface);
    padding: 16px;
}

.resurs-panel--accent {
    border-top: 3px solid var(--resurs-accent);
}

/* Панель со списком, который сам задаёт свои отступы. */
.resurs-panel--flush {
    padding: 0;
    overflow: hidden;
}

.resurs-section {
    margin-top: 20px;
}

.resurs-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin-bottom: 10px;
}

.resurs-section__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--resurs-text);
    overflow-wrap: anywhere;
}

.resurs-section__hint {
    font-size: 0.8125rem;
    color: var(--resurs-text-muted);
}

.resurs-section__actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Панель фильтров и действий над списком. */
.resurs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
}

.resurs-toolbar__grow {
    flex: 1 1 220px;
    min-width: 0;
}

/* Поле фильтра фиксированной ширины: поля ввода MudBlazor занимают 100% контейнера,
   поэтому ширину задаёт сам контейнер, а не встроенный стиль на каждом поле. */
.resurs-toolbar__field {
    flex: 0 1 176px;
    min-width: 148px;
}

.resurs-toolbar__end {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resurs-empty {
    padding: 14px 16px;
    border: 1px dashed var(--resurs-border-strong);
    border-radius: var(--resurs-radius);
    color: var(--resurs-text-muted);
    font-size: 0.9375rem;
}

/* ------------------------------------------------------------ показатели */
/* Телефон и планшет: показатели идут по двое. Нечётный последний показатель занимает обе
   колонки, иначе он оставался бы один в левой половине строки. */
.resurs-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--resurs-gap);
}

.resurs-stats > .resurs-stat:last-child:nth-child(odd) {
    grid-column: span 2;
}

/* ПК: все пять показателей в один ряд. */
@media (min-width: 1280px) {
    .resurs-stats {
        grid-template-columns: repeat(5, 1fr);
    }

    .resurs-stats > .resurs-stat:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

.resurs-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--resurs-border);
    border-radius: var(--resurs-radius);
    background-color: var(--resurs-surface);
}

.resurs-stat__label {
    font-size: 0.8125rem;
    color: var(--resurs-text-muted);
    overflow-wrap: anywhere;
}

.resurs-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--resurs-text);
}

.resurs-stat--alert .resurs-stat__value {
    color: var(--resurs-status-failed);
}

.resurs-stat__link {
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--resurs-accent);
    text-decoration: none;
}

.resurs-stat__link:hover,
.resurs-stat__link:focus-visible {
    text-decoration: underline;
}

/* -------------------------------------------- производственные блоки дня */
.resurs-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--resurs-gap);
}

.resurs-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--resurs-border);
    border-radius: var(--resurs-radius);
    background-color: var(--resurs-surface);
    overflow: hidden;
}

.resurs-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 10px 12px;
    background-color: var(--resurs-accent-soft);
    border-bottom: 1px solid var(--resurs-border);
}

.resurs-block__time {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--resurs-accent);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.resurs-block__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--resurs-text-muted);
}

.resurs-block__count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--resurs-text-muted);
    white-space: nowrap;
}

.resurs-block__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.resurs-block__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--resurs-border);
}

/* Строка списка с выравненными по правому краю пометкой и действием. */
.resurs-block__item--row {
    align-items: center;
    flex-wrap: wrap;
}

.resurs-block__list > .resurs-block__item:first-child {
    border-top: 0;
}

.resurs-block__index {
    flex: none;
    min-width: 1.4em;
    color: var(--resurs-text-muted);
    font-variant-numeric: tabular-nums;
}

.resurs-block__body {
    flex: 1 1 auto;
    min-width: 0;
}

.resurs-block__title {
    font-weight: 600;
    color: var(--resurs-text);
    overflow-wrap: anywhere;
}

.resurs-block__meta {
    font-size: 0.8125rem;
    color: var(--resurs-text-muted);
    overflow-wrap: anywhere;
}

.resurs-block__empty {
    padding: 12px;
    font-size: 0.875rem;
    color: var(--resurs-text-muted);
}

/* Задание в недельной сетке плана. */
.resurs-plan-task {
    min-width: 0;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid var(--resurs-border);
    border-radius: var(--resurs-radius-sm);
    background-color: var(--resurs-surface);
}

.resurs-plan-task__head {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.resurs-plan-task__head .resurs-block__title {
    flex: 1 1 auto;
    min-width: 0;
}

/* Действие редактирования не занимает строку: компактная иконка в углу карточки. */
.resurs-plan-task__edit.mud-icon-button {
    flex: none;
    margin: -4px -4px 0 0;
}

/* Вторичный идентификатор заказа: нужен для сверки, но не должен спорить с названием объекта. */
.resurs-plan-task__id {
    margin-top: 2px;
    font-size: 0.75rem;
}

.resurs-plan-task__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin-top: 4px;
}

/* ------------------------------------------------------- статус задания */
.resurs-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--resurs-status-color, var(--resurs-text-muted));
}

.resurs-status::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.resurs-status--new { --resurs-status-color: var(--resurs-status-new); }
.resurs-status--progress { --resurs-status-color: var(--resurs-status-progress); }
.resurs-status--done { --resurs-status-color: var(--resurs-status-done); }
.resurs-status--partial { --resurs-status-color: var(--resurs-status-partial); }
.resurs-status--failed { --resurs-status-color: var(--resurs-status-failed); }

/* --------------------------------------------------- компактные таблицы */
.mud-table-cell {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Спокойные подписи кнопок: без принудительного верхнего регистра и разрядки. */
.mud-button-root {
    text-transform: none;
    letter-spacing: normal;
}

/* Недельная сетка плана: пять дней одинаковой ширины, чтобы один заполненный день
   не растягивал колонку и не выдавливал остальные за пределы экрана. */
.resurs-plan-table .mud-table-root {
    table-layout: fixed;
}

.resurs-plan-table .mud-table-root th:first-child,
.resurs-plan-table .mud-table-root td:first-child {
    width: 132px;
}

.resurs-cell-strong {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.resurs-cell-muted {
    color: var(--resurs-text-muted);
    overflow-wrap: anywhere;
}

/* Колонка действий не переносится на вторую строку и не растягивает таблицу. */
.resurs-cell-actions {
    white-space: nowrap;
    width: 1%;
}

/* ==========================================================================
   2. Простые формы страниц /account/* (вход, смена пароля) — обычные HTML-формы
   с настоящим POST на сервер, не компоненты MudBlazor:
   см. src/Resurs.Web/Components/Pages/Account.
   ========================================================================== */
.resurs-account-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    align-items: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(31, 111, 235, 0.34), transparent 34%),
        linear-gradient(135deg, var(--resurs-navy-deep) 0%, var(--resurs-navy) 58%, #1E3C68 100%);
}

.resurs-account-page__watermark {
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 -7vw;
    display: flex;
    align-items: center;
    opacity: 0.17;
    pointer-events: none;
}

.resurs-account-page__watermark .resurs-logo__mark {
    width: min(68vw, 820px);
    height: auto;
    color: #FFFFFF;
}

.resurs-account-page__content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 100vh;
    padding-top: 32px;
    padding-bottom: 32px;
}

.resurs-account-card {
    width: 100%;
    max-width: 420px;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
}

.resurs-account-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.resurs-account-card__logo .resurs-logo__text {
    font-size: 1.35rem;
}

.resurs-account-field {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.resurs-account-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--resurs-text-muted);
}

.resurs-account-field input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--resurs-border-strong);
    border-radius: var(--resurs-radius-sm);
}

.resurs-account-field input:focus {
    outline: 2px solid var(--resurs-accent);
    outline-offset: -1px;
}

.resurs-account-submit {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    background-color: var(--resurs-accent);
    border: none;
    border-radius: var(--resurs-radius-sm);
    cursor: pointer;
}

.resurs-account-submit:hover {
    background-color: var(--resurs-accent-strong);
}

/* Выход выполняется настоящим POST с antiforgery-токеном, поэтому это обычная
   HTML-кнопка внутри формы, а не MudButton. */
.resurs-logout-button {
    display: block;
    width: 100%;
    min-height: 44px;
    /* Левый отступ выравнивает подпись по тексту пунктов меню с иконками. */
    padding: 0.5rem 1rem 0.5rem 46px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: left;
    color: var(--resurs-status-failed);
    background: none;
    border: none;
    cursor: pointer;
}

.resurs-logout-button:hover {
    background-color: var(--resurs-bg);
}

/* ==========================================================================
   3. Служебные стили шаблона Blazor и валидации форм.
   ========================================================================== */
h1:focus {
    outline: none;
}

.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;
}

/* ==========================================================================
   4. Телефон и планшет (раздел 17.2 мастер-ТЗ).
   ========================================================================== */
@media (max-width: 959.98px) {
    .mud-button-root,
    .mud-icon-button {
        min-height: 44px;
        min-width: 44px;
    }

    .mud-navmenu .mud-nav-link {
        min-height: 44px;
    }

    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .resurs-page-header__title {
        font-size: 1.3125rem;
    }

    /* MudTable превращает строки в карточки, но длинное ФИО или логин способны
       расширить строку по min-content и спрятать значение за правой границей.
       У карточных таблиц фиксируем ширину строки и разрешаем перенос значений. */
    .resurs-mobile-table .mud-table-container {
        overflow-x: hidden;
    }

    .resurs-mobile-table .mud-table-row,
    .resurs-mobile-table .mud-table-cell {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
    }

    .resurs-mobile-table .mud-table-row {
        display: block;
    }

    .resurs-mobile-table .mud-table-cell {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 599.98px) {
    .resurs-logo__text {
        font-size: 0.9375rem;
        letter-spacing: 0.08em;
    }

    /* На узком телефоне в верхней панели остаётся аватар пользователя без ФИО:
       сами ФИО и роль показываются в раскрытом меню пользователя. */
    .resurs-appbar-user__name {
        display: none;
    }

    .resurs-account-page__watermark {
        inset: auto -28vw -12vh auto;
    }

    .resurs-account-page__watermark .resurs-logo__mark {
        width: 120vw;
    }

    .resurs-account-page__content {
        padding: 20px 16px;
    }

    .resurs-account-card {
        padding: 24px !important;
    }
}
