/* Методичка — основные стили (палитра: #0F4685, #F0F7FF, #143555, #45a2d6, #426ee6) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

:root {
    --color-primary: #0F4685;
    --color-primary-hover: #1a6bc4;
    --req-example-figure-width: 42%;
    --req-example-figure-min-width: 220px;
    --color-bg-header: #F0F7FF;
    --color-bg-footer: #143555;
    --color-accent: #45a2d6;
    --color-btn: #426ee6;
    --color-text: #333;
    --color-content-bg: #fff;
    --color-content-shadow: rgba(0,0,0,0.08);
    --layout-max-width: 1440px;
}

body[data-theme="dark"] {
    --color-bg-header: #1c304c;
    --color-bg-footer: #121f30;
    --color-text: #e8eef5;
    --color-content-bg: #1a2840;
    --color-content-shadow: rgba(0,0,0,0.35);
    background: #121f30;
}

body[data-theme="dark"] .site-name,
body[data-theme="dark"] .site-name-link,
body[data-theme="dark"] .contact-info,
body[data-theme="dark"] .email-link,
body[data-theme="dark"] .social-icon { color: #8eb9e0; }
body[data-theme="dark"] .social-icon.tiktok:hover { color: #8eb9e0; }
body[data-theme="dark"] .logo-fallback { color: #8eb9e0; background: rgba(15, 70, 133, 0.3); }
body[data-theme="dark"] .content { background: var(--color-content-bg); color: var(--color-text); }
body[data-theme="dark"] .content h1 { color: var(--color-accent); }
body[data-theme="dark"] .header-duty-flag-badge {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.75);
    background: rgba(180, 40, 40, 0.35);
}
body[data-theme="dark"] .header-duty-flag-badge:hover,
body[data-theme="dark"] .header-duty-flag-badge:focus-visible {
    background: rgba(220, 53, 69, 0.4);
    color: #ff8a8a;
    border-color: #ff8a8a;
}

/* Тёмная тема: форма и поля ввода */
body[data-theme="dark"] .header-search-form {
    background: rgba(21, 34, 56, 0.9);
    border: 1px solid rgba(69, 162, 214, 0.3);
}
body[data-theme="dark"] .header-search-input {
    background: transparent;
    color: #e0e6ed;
}
body[data-theme="dark"] .header-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-control-sm,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .form-select-sm,
body[data-theme="dark"] .tools-search-input {
    background: #1a2d47 !important;
    color: #e0e6ed !important;
    border-color: rgba(69, 162, 214, 0.4) !important;
}
body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="search"] {
    color-scheme: dark;
}
body[data-theme="dark"] .form-control::placeholder,
body[data-theme="dark"] .tools-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}
body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus,
body[data-theme="dark"] .tools-search-input:focus {
    background: #1a2d47 !important;
    color: #e0e6ed !important;
    border-color: var(--color-primary) !important;
}
body[data-theme="dark"] .news-filters .form-label,
body[data-theme="dark"] .news-per-page-wrap label {
    color: #e0e6ed;
}
body[data-theme="dark"] .news-filters-fieldset,
body[data-theme="dark"] .tools-filters-fieldset,
body[data-theme="dark"] .doc-browser-search,
body[data-theme="dark"] .charts-toolbar,
body[data-theme="dark"] .polls-toolbar,
body[data-theme="dark"] .operativ-filter-card,
body[data-theme="dark"] .users-filters,
body[data-theme="dark"] .events-calendar-toolbar,
body[data-theme="dark"] .site-filters-panel,
body[data-theme="dark"] .site-filters-card {
    border-color: rgba(69, 162, 214, 0.4) !important;
    background: rgba(15, 70, 133, 0.28) !important;
    background-color: rgba(15, 70, 133, 0.28) !important;
}
body[data-theme="dark"] .card:not(.charts-card):not(.poll-card),
body[data-theme="dark"] .table,
body[data-theme="dark"] .table > :not(caption) > * > * {
    --bs-table-bg: transparent;
    --bs-table-color: var(--color-text);
    --bs-card-bg: rgba(21, 40, 64, 0.92);
}
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-light {
    background-color: rgba(21, 40, 64, 0.92) !important;
    color: var(--color-text) !important;
}
body[data-theme="dark"] .table-light,
body[data-theme="dark"] .thead-light th,
body[data-theme="dark"] .table > thead {
    --bs-table-bg: rgba(15, 70, 133, 0.35);
    --bs-table-color: #e8eef5;
    background-color: rgba(15, 70, 133, 0.35) !important;
    color: #e8eef5 !important;
}
body[data-theme="dark"] .site-filters-card .card-header {
    border-bottom-color: rgba(69, 162, 214, 0.35);
    color: #8eb9e0;
}
body[data-theme="dark"] .news-filters-legend {
    color: #8eb9e0;
}
body[data-theme="dark"] .news-page-title,
body[data-theme="dark"] .announcements-page-title {
    color: #8eb9e0;
}
body[data-theme="dark"] .btn-outline-secondary {
    color: #8eb9e0;
    border-color: rgba(69, 162, 214, 0.5);
}
body[data-theme="dark"] .btn-outline-secondary:hover {
    background: rgba(69, 162, 214, 0.2);
    border-color: #8eb9e0;
    color: #fff;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 20px;
    min-width: 0;
    width: 100%;
}

/* Скрытый текст для скринридеров */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Общая ширина с основным контейнером контента */
.layout-contained {
    width: 100%;
    max-width: min(90%, var(--layout-max-width));
    margin-left: auto;
    margin-right: auto;
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    min-width: 0;
}

/* ========== Site banner (верхняя полоса: описание, поиск, тема, вход) ========== */
.site-banner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background-color: #0F4685;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    overflow-x: hidden;
    box-sizing: border-box;
}

.site-banner-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.site-banner-text {
    flex: 0 1 auto;
    min-width: 0;
}

.banner-search-wrap {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    max-width: 520px;
    margin: 0 auto;
}

.header-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 440px;
    min-width: 0;
    background: rgba(255,255,255,0.95);
    border-radius: 4px;
    overflow: hidden;
}

.banner-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.header-messages-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.header-messages-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.header-duty-flag-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #ffefef;
    border: 1px solid rgba(220, 53, 69, 0.95);
    border-radius: 4px;
    text-decoration: none;
    background: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.header-duty-flag-badge i {
    font-size: 1.15rem;
    line-height: 1;
}

.header-duty-flag-badge:hover,
.header-duty-flag-badge:focus-visible {
    background: #c82333;
    color: #fff;
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.header-messages-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: #e53935;
    color: #fff;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.header-event-executor-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: #e67e22;
    border: 1px solid #cf6d17;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.header-event-executor-link:hover {
    background: #d35400;
    border-color: #b4530d;
    color: #fff;
}

.header-event-executor-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    background: #fff;
    color: #c45c00;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-search-input {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: none;
    font-size: 13px;
    color: #333;
}

.header-search-input::placeholder {
    color: #666;
}

.header-search-btn {
    padding: 6px 10px;
    border: none;
    background: #0F4685;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.header-search-btn:hover {
    background: #1a6bc4;
}

.theme-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.5);
    background: transparent;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.2);
}

.theme-toggle-icon {
    line-height: 1;
}

body[data-theme="light"] .theme-toggle-icon--sun,
body[data-theme="dark"] .theme-toggle-icon--moon {
    display: none;
}

.login-btn {
    background-color: #fff;
    color: #0F4685;
    border: 1px solid #0F4685;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.login-btn:hover {
    background-color: #0F4685;
    color: #fff;
    border-color: #fff;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
}

.header-user-info:hover {
    color: rgba(255,255,255,0.9);
}

.header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.header-user-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.header-user-rating-badge {
    position: absolute;
    left: -2px;
    bottom: -3px;
    min-width: 16px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: #c9a227;
    color: #1a1a1a;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(15, 70, 133, 0.35);
}

.header-user-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.3);
    font-size: 14px;
}

.header-user-name {
    font-size: 13px;
}

/* ========== Site header (основной блок с логотипом) ========== */
.site-header {
    width: 100%;
    max-width: 100%;
    background-color: var(--color-bg-header);
    padding: 7px 15px;
    margin-bottom: 0;
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 1 auto;
    min-width: 0;
}

.header-brand .logo-link {
    flex-shrink: 0;
}

.header-brand .site-info {
    align-items: flex-start;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.header-part {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    min-width: 120px;
}

.logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    width: 135px;
    height: 90px;
    object-fit: contain;
    display: block;
}

.logo-fallback {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: bold;
    color: #0F4685;
    padding: 0.5rem 1rem;
    background: rgba(15, 70, 133, 0.1);
    border-radius: 6px;
    text-transform: uppercase;
}

.site-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-brand .site-name {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.12;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.site-name {
    font-size: 54px;
    font-weight: bold;
    color: #0F4685;
    margin: 0;
    text-transform: uppercase;
}

.site-name-link {
    color: #0F4685;
    text-decoration: none;
}

.site-name-link:hover {
    color: #1a6bc4;
}

.contact-info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info {
    font-size: 14px;
    color: #0F4685;
    line-height: 1.4;
    margin: 3px 0;
}

.contact-info i {
    margin-right: 5px;
}

.email-link {
    color: #0F4685;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

.social-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icons-header {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: 140px;
    justify-content: center;
    align-items: center;
}

.social-icon {
    width: 50px;
    height: 50px;
    font-size: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.3s, transform 0.3s;
    text-decoration: none;
    color: #0F4685;
}

.social-icon.max.max-icon-circle-wrap,
.social-icon.vk.vk-icon-circle-wrap {
    font-size: 36px;
}

.social-icon.max {
    padding: 0;
}

.social-icon-img--max {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
}

body[data-theme="dark"] .social-icon-img--max {
    content: unset;
    filter: brightness(0) invert(1);
}

.social-icon .icon-circle-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    font-weight: bold;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.social-icon.max .icon-circle-text {
    font-size: 0.55em;
}

.social-icon.vk .icon-circle-text {
    font-size: 0.45em;
}

.social-icon.youtube:hover { color: #ff0000; transform: scale(1.15); }
.social-icon.max:hover { color: #8E66AD; transform: scale(1.15); }
.social-icon.vk:hover { color: #4a76a8; transform: scale(1.15); }
.social-icon.tiktok:hover { color: #000; transform: scale(1.15); }

/* Постраничная навигация (списки на главной, мероприятия, графики) */
.list-pagination-wrap:empty {
    display: none;
}
.list-pagination-wrap {
    margin-top: 1rem;
}
.list-pagination-nav .pagination {
    margin-bottom: 0;
    gap: 0.5rem;
    align-items: center;
}

/* ========== Заголовок страницы + статистика (как «Календарь мероприятий») ========== */
.page-heading {
    margin: 0.5rem -1.5rem 1rem;
    width: calc(100% + 3rem);
    max-width: none;
    text-align: left;
}
.page-heading__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #003366;
    margin: 0 0 0.75rem;
    line-height: 1.25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.page-heading__bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 0;
    margin: 0;
    background: var(--color-bg-header) !important;
    color: var(--color-primary) !important;
    border-bottom: 1px solid rgba(15, 70, 133, 0.12);
}
.page-heading__bar .page-heading__title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    display: block;
    line-height: 1.35;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    text-align: left;
}
.page-heading__icon {
    color: var(--color-primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}
.page-heading__bar .page-heading__icon {
    font-size: 1.15rem !important;
    color: var(--color-primary) !important;
}
body[data-theme="dark"] .page-heading__bar {
    background: rgba(15, 70, 133, 0.22) !important;
    color: #e8f0fa !important;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .page-heading__bar .page-heading__title,
body[data-theme="dark"] .page-heading__bar .page-heading__icon {
    color: #e8f0fa !important;
}
.page-heading__title-text {
    flex: 1 1 auto;
    min-width: 0;
}
.page-heading__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 0.65rem 1.5rem 0.25rem;
    border-top: 1px solid rgba(15, 70, 133, 0.15);
    margin-top: 0;
}
.page-heading__stats--cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
    padding: 0.75rem 1.5rem 0.5rem;
}
.page-heading__stat-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
    border: 1px solid rgba(15, 70, 133, 0.12);
    border-radius: 10px;
    min-width: 0;
}
.page-heading__stat-card-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.15rem;
    color: var(--color-primary);
    line-height: 1;
}
.page-heading__stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.page-heading__stat-card-body .page-heading__stat-value {
    font-size: 1.2rem;
    line-height: 1.15;
}
.page-heading__stat-card-body .page-heading__stat-label {
    font-size: 0.78rem;
    line-height: 1.25;
}
body[data-theme="dark"] .page-heading__stat-card {
    background: rgba(15, 70, 133, 0.18);
    border-color: rgba(69, 162, 214, 0.2);
}
body[data-theme="dark"] .page-heading__stat-card-icon {
    color: #8ec5f0;
}
.page-heading__stat {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 5rem;
}
.page-heading__stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #003366;
    line-height: 1.2;
}
.page-heading__stat-label {
    font-size: 0.8rem;
    color: #5c6f82;
    line-height: 1.2;
}
body[data-theme="dark"] .page-heading__stat-value {
    color: #cfe0f5;
}
body[data-theme="dark"] .page-heading__stat-label {
    color: #9fb0c3;
}
body[data-theme="dark"] .page-heading__stats {
    border-top-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 576px) {
    .page-heading__stats {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .page-heading__stats--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
    .page-heading__stat-card {
        padding: 0.55rem 0.6rem;
    }
    .page-heading__stat-card-body .page-heading__stat-value {
        font-size: 1.05rem;
    }
    .page-heading__stat {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.35rem 1rem;
        min-width: 0;
        width: 100%;
    }
    .page-heading__stat-value {
        font-size: 1rem;
    }
}

/* Документы — полная ширина контента (как новости, таблицы, мероприятия) */
.documents-page {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 0 1.5rem;
}

/* Общение — узкая обёртка */
.pedagog-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 1.5rem;
    min-width: 0;
}
.documents-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.25rem;
}
.documents-subnav a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #0F4685;
    color: #0F4685;
    flex: 0 1 auto;
    text-align: center;
    min-width: 0;
}
.documents-subnav a:hover {
    background: #0F4685;
    color: #fff !important;
}
.documents-subnav a.active {
    background: #0F4685;
    color: #fff !important;
}
.documents-page > p.text-muted {
    margin-bottom: 1.25rem;
}

/* Общение (родители / студенты) — мобильная вёрстка как мессенджер */
.communication-page {
    text-align: left;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.communication-page .pedagog-intro {
    margin-bottom: 1rem;
}
.communication-page .documents-section {
    min-width: 0;
}
@media (max-width: 767.98px) {
    article.content:has(.communication-page) {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        overflow-x: hidden;
        text-align: left;
    }
    .communication-page {
        padding-top: 0.25rem;
        padding-bottom: 1rem;
    }
    .communication-page .page-heading {
        margin-bottom: 0.75rem;
    }
    .communication-page .documents-section {
        padding: 0.75rem;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }
    .communication-page .documents-section h2 {
        font-size: 1.05rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .communication-page .documents-subnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .communication-page .documents-subnav a {
        width: 100%;
        margin: 0;
        padding: 10px 12px;
    }
    .communication-page .comm-partners-section .card-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem;
    }
    .communication-page .comm-partners-section .card-header .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }
    .communication-page .comm-partners-section .card-header .btn {
        width: 100%;
    }
    .communication-page .comm-main-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.35rem;
    }
    .communication-page .comm-main-tabs .nav-item {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: -2px;
    }
    .communication-page .comm-main-tabs .nav-link {
        width: 100%;
        justify-content: center;
        white-space: nowrap;
        padding: 0.55rem 0.65rem;
        font-size: 0.9rem;
    }
    .communication-page .comm-messages {
        max-height: min(52vh, 420px) !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .communication-page .comm-msg-body {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .communication-page .d-flex.flex-wrap.align-items-center.gap-2.mb-3[aria-label="Экспорт переписки"] {
        flex-direction: column;
        align-items: stretch !important;
    }
    .communication-page .d-flex.flex-wrap.align-items-center.gap-2.mb-3[aria-label="Экспорт переписки"] .btn {
        width: 100%;
    }
}

/* Общение — мессенджер (Telegram-подобный) */
.comm-messenger__main,
.comm-public-chat {
    background-color: var(--comm-messenger-bg, #e6ebee);
}
.comm-messenger {
    display: flex;
    min-height: 520px;
    max-height: min(72vh, 680px);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}
.comm-messenger__sidebar {
    flex: 0 0 300px;
    max-width: 36%;
    min-width: 220px;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}
.comm-messenger__sidebar-head {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}
.comm-messenger__sidebar-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
}
.comm-messenger__list {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.comm-chat-item-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #eef0f2;
}
.comm-chat-item__check {
    display: none;
    align-items: center;
    padding: 0.35rem 0 0.35rem 0.5rem;
    margin: 0;
    cursor: pointer;
}
.comm-messenger--multi .comm-chat-item__check {
    display: flex;
}
.comm-messenger__multi-actions {
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.comm-messenger--multi .comm-messenger__multi-actions {
    display: inline-flex;
}
.comm-messenger__sidebar-tools {
    flex-wrap: wrap;
}
a.comm-chat-item {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.35rem 0.5rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.comm-chat-item--active {
    background: #e7f1ff;
}
a.comm-chat-item:hover {
    background: #f0f4f8;
}
.comm-chat-item__avatar img,
.comm-chat-item__avatar-ph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comm-chat-item__avatar-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}
.comm-chat-item__body {
    flex: 1 1 auto;
    min-width: 0;
}
.comm-chat-item__top {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}
.comm-chat-item__name {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 0.9rem;
}
.comm-chat-item__time {
    font-size: 0.7rem;
    color: #6c757d;
    flex-shrink: 0;
}
.comm-chat-item__role {
    display: block;
    font-size: 0.75rem;
    color: #0d6efd;
    font-weight: 500;
}
.comm-chat-item__preview {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}
.comm-broadcast-pane {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fff;
}
.comm-broadcast-list {
    max-height: min(52vh, 480px);
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.35rem;
}
.comm-broadcast-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    margin: 0;
    border-bottom: 1px solid #eef0f2;
    cursor: pointer;
}
.comm-broadcast-row:hover {
    background: #f8f9fa;
}
.comm-broadcast-row .comm-chat-item__body {
    flex: 1 1 auto;
    min-width: 0;
}
.comm-broadcast-compose {
    border-top: 1px solid #dee2e6;
    padding-top: 0.5rem;
}
.comm-chat-item__badge {
    align-self: center;
    flex-shrink: 0;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.comm-messenger__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #e8ecf1;
    background-image: linear-gradient(180deg, #e8ecf1 0%, #eef1f5 100%);
}
.comm-messenger__placeholder {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.comm-messenger__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}
.comm-messenger__header-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}
.comm-messenger__header-avatar--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}
.comm-messenger__messages,
.comm-public-chat__messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    -webkit-overflow-scrolling: touch;
}
.comm-public-chat {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    max-height: min(72vh, 640px);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #e8ecf1;
}
.comm-public-chat__messages {
    max-height: none;
}
.comm-tg-messages {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.comm-tg-row {
    display: flex;
    max-width: 85%;
}
.comm-tg-row--out {
    align-self: flex-end;
    margin-left: auto;
}
.comm-tg-row--in,
.comm-tg-row--admin {
    align-self: flex-start;
}
.comm-tg-bubble {
    padding: 0.45rem 0.65rem 0.35rem;
    border-radius: 0.75rem 0.75rem 0.75rem 0.2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.comm-tg-row--out .comm-tg-bubble {
    border-radius: 0.75rem 0.75rem 0.2rem 0.75rem;
}
.comm-msg--bubble-in.comm-tg-bubble {
    background: var(--comm-bubble-in, #fff);
}
.comm-msg--bubble-out.comm-tg-bubble {
    background: var(--comm-bubble-out, #cfe9ff);
}
.comm-msg--bubble-admin.comm-tg-bubble {
    background: var(--comm-bubble-admin, #e8dcf5);
}
.comm-tg-bubble__author {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 0.15rem;
}
.comm-tg-bubble__text {
    font-size: 0.92rem;
    line-height: 1.4;
}
.comm-tg-bubble__text:empty {
    display: none;
}
.comm-tg-bubble__atts {
    margin-top: 0.35rem;
}
.comm-tg-bubble__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.2rem;
}
.comm-tg-bubble__time {
    font-size: 0.68rem;
    color: #6c757d;
}
.comm-tg-bubble__actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.comm-tg-bubble:hover .comm-tg-bubble__actions {
    opacity: 1;
}
.comm-tg-action {
    border: none;
    background: transparent;
    padding: 0 0.2rem;
    font-size: 0.75rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
}
.comm-tg-action:hover {
    color: #0d6efd;
}
.comm-tg-action--delete:hover {
    color: #dc3545;
}
.comm-att-thumb {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.comm-compose--bar {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}
.comm-compose__input {
    flex: 1 1 auto;
    resize: none;
    min-height: 2.25rem;
    max-height: 8rem;
    border-radius: 1.25rem;
    padding: 0.45rem 0.85rem;
}
.comm-compose__attach {
    margin: 0;
    padding: 0.4rem 0.5rem;
    color: #6c757d;
    cursor: pointer;
    flex-shrink: 0;
}
.comm-compose__attach:hover {
    color: #0d6efd;
}
.comm-compose__send {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.comm-tg-empty {
    text-align: center;
    padding: 2rem 1rem;
}
body[data-theme="dark"] .comm-messenger,
body[data-theme="dark"] .comm-public-chat {
    border-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .comm-messenger__sidebar {
    background: #1e2329;
    border-color: rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .comm-messenger__main,
body[data-theme="dark"] .comm-public-chat {
    background: #0e1621;
    background-image: none;
}
body[data-theme="dark"] .comm-chat-item--active {
    background: rgba(13, 110, 253, 0.25);
}
body[data-theme="dark"] .comm-msg--bubble-in.comm-tg-bubble {
    background: var(--comm-bubble-in, #2b5278);
    color: #e9ecef;
}
body[data-theme="dark"] .comm-msg--bubble-out.comm-tg-bubble {
    background: var(--comm-bubble-out, #2b5278);
    color: #e9ecef;
}
body[data-theme="dark"] .comm-msg--bubble-admin.comm-tg-bubble {
    background: var(--comm-bubble-admin, #4a3d5c);
    color: #e9ecef;
}
body[data-theme="dark"] .comm-messenger__header,
body[data-theme="dark"] .comm-compose--bar {
    background: #17212b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e9ecef;
}
@media (max-width: 767.98px) {
    .comm-messenger {
        flex-direction: column;
        min-height: 0;
        max-height: none;
    }
    .comm-messenger__sidebar {
        flex: 0 0 auto;
        max-width: 100%;
        min-width: 0;
        max-height: 42vh;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    .comm-messenger__main {
        min-height: 50vh;
    }
    .communication-page .comm-messenger__messages {
        max-height: min(45vh, 380px) !important;
    }
    .comm-tg-row {
        max-width: 92%;
    }
    .comm-tg-bubble__actions {
        opacity: 1;
    }
}

/* ========== Публичный браузер документов (родители / студенты) ========== */
.doc-browser-accordion--2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    align-items: start;
}
.doc-browser-accordion--2col > .accordion-item {
    margin-bottom: 0 !important;
    min-width: 0;
}
@media (max-width: 991.98px) {
    .doc-browser-accordion--2col {
        grid-template-columns: 1fr;
    }
}
.doc-browser-accordion .accordion-item {
    background: transparent;
}
.doc-browser-cat-btn {
    background-color: #0d47a1 !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: none !important;
    border-radius: 6px !important;
}
.doc-browser-cat-btn:not(.collapsed) {
    background-color: #1565c0 !important;
    color: #fff !important;
}
.doc-browser-cat-btn::after {
    filter: brightness(0) invert(1);
}
.doc-browser-cat-inner {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-right: 0.25rem;
    min-width: 0;
}
.doc-browser-cat-left {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: left;
}
.doc-browser-cat-badge {
    flex-shrink: 0;
    min-width: 2.25rem;
    text-align: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.doc-browser-acc-body {
    background: #f5f7fb;
    border-radius: 0 0 6px 6px;
}
.doc-browser-preview-wrap {
    height: 220px;
    border: 1px solid #dee2e6;
    background: #e9ecef;
    overflow: hidden;
}
.doc-browser-card .doc-browser-preview-wrap {
    border-radius: 0.375rem 0.375rem 0 0;
    border-bottom: none;
}
.doc-browser-preview-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.doc-browser-preview-placeholder {
    height: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}
.doc-browser-card-stats {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    flex-shrink: 0;
}
.doc-browser-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(15, 70, 133, 0.08);
    color: #0f4685;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.doc-browser-card-stat i {
    font-size: 0.85rem;
    opacity: 0.9;
}
body[data-theme="dark"] .doc-browser-card-stat {
    background: rgba(15, 70, 133, 0.35);
    color: #cfe0f5;
}
.doc-browser-modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.doc-browser-modal-frame-wrap {
    min-height: 55vh;
    max-height: 75vh;
}

/* Модалка: область предпросмотра должна иметь высоту до загрузки PDF (иначе iframe с нулевой высотой даёт «пустой» экран). */
#documentsPreviewModal .doc-browser-modal-frame-wrap.ratio {
    min-height: min(75vh, 85vw);
    width: 100%;
}
#documentsPreviewModal .doc-browser-modal-iframe {
    background: #e9ecef;
}

@media (max-width: 767.98px) {
    .doc-browser-search .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    .doc-browser-card .d-flex.flex-wrap.gap-2 {
        flex-direction: column;
        align-items: stretch;
    }
    .doc-browser-card .d-flex.flex-wrap.gap-2 .btn {
        width: 100%;
    }
}
@media (max-width: 575.98px) {
    #documentsPreviewModal .modal-dialog.modal-xl {
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
    }
    .documents-subnav a {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: min(100%, 140px);
    }
}

.doc-statements-section.documents-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-statements-section.documents-section--accordion {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.doc-statements-section.documents-section h2 {
    color: #0F4685;
    font-size: 1.2rem;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.doc-statement-card .doc-browser-preview-wrap {
    border-radius: 0.375rem 0.375rem 0 0;
    border-bottom: none;
}

body[data-theme="dark"] .doc-browser-acc-body {
    background: #1a2332;
}
body[data-theme="dark"] .doc-browser-preview-wrap {
    background: #252f40;
    border-color: #3d4f66;
}

/* ========== Общение, pedagog-page, блок documents-section ========== */
body[data-theme="dark"] .documents-section {
    background: rgba(21, 34, 56, 0.92);
    border-color: rgba(69, 162, 214, 0.28);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    color: #e0e6ed;
}
body[data-theme="dark"] .documents-section h2 {
    color: #8eb9e0;
    border-bottom-color: rgba(69, 162, 214, 0.28);
}
body[data-theme="dark"] .doc-statements-section.documents-section--accordion {
    background: transparent;
    border: none;
    box-shadow: none;
}
body[data-theme="dark"] .pedagog-intro .text-muted {
    color: #b0b8c4 !important;
}
body[data-theme="dark"] .documents-page .documents-section .text-muted,
body[data-theme="dark"] .documents-page .documents-section p.text-muted {
    color: #b8c4d4 !important;
}
body[data-theme="dark"] .pedagog-intro strong {
    color: #e8eef5;
}
body[data-theme="dark"] .documents-subnav a {
    border-color: #8eb9e0;
    color: #8eb9e0;
}
body[data-theme="dark"] .documents-subnav a:hover,
body[data-theme="dark"] .documents-subnav a.active {
    background: var(--color-primary);
    color: #fff !important;
    border-color: var(--color-primary);
}
body[data-theme="dark"] .documents-gate-page .alert-info {
    background: rgba(15, 70, 133, 0.35);
    border-color: rgba(69, 162, 214, 0.45);
    color: #d6e8f5;
}
body[data-theme="dark"] .documents-gate-page .alert-info a {
    color: #9ecbff;
}
/* Хаб «Общение» — две карточки */
body[data-theme="dark"] .pedagog-block {
    background: rgba(21, 34, 56, 0.92);
    border-color: rgba(69, 162, 214, 0.28);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
body[data-theme="dark"] .pedagog-block-muted {
    opacity: 0.55;
}
body[data-theme="dark"] .pedagog-block-header {
    border-bottom-color: rgba(69, 162, 214, 0.22);
}
body[data-theme="dark"] .pedagog-block-title {
    color: #8eb9e0;
}
body[data-theme="dark"] .pedagog-block-content {
    color: #b0b8c4;
}
body[data-theme="dark"] .pedagog-highlight {
    color: #8eb9e0;
}
body[data-theme="dark"] .pedagog-two-col li:before {
    color: #8eb9e0;
}
body[data-theme="dark"] .pedagog-intro > p {
    color: #d0d8e2;
}
/* Карточки и вкладки внутри partial общения */
body[data-theme="dark"] .comm-partners-section.card {
    background: rgba(21, 34, 56, 0.88);
    border-color: rgba(69, 162, 214, 0.28);
    color: #e0e6ed;
}
body[data-theme="dark"] .comm-partners-section .card-header {
    background: rgba(15, 39, 71, 0.55);
    border-color: rgba(69, 162, 214, 0.22);
    color: #e0e6ed;
}
body[data-theme="dark"] .comm-compose.card,
body[data-theme="dark"] .comm-compose .card-body {
    background: rgba(21, 34, 56, 0.75);
    border-color: rgba(69, 162, 214, 0.25);
    color: #e0e6ed;
}
body[data-theme="dark"] .comm-messages.bg-light {
    background-color: rgba(15, 70, 133, 0.22) !important;
    border-color: rgba(69, 162, 214, 0.3) !important;
}
body[data-theme="dark"] .comm-partner-card.border-primary.border-2.bg-light {
    background: rgba(15, 70, 133, 0.4) !important;
}
body[data-theme="dark"] .comm-partner-card {
    border-color: rgba(69, 162, 214, 0.25) !important;
    background: rgba(15, 39, 71, 0.45);
}
body[data-theme="dark"] .comm-partner-open.text-body {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .comm-msg.card {
    border-color: rgba(69, 162, 214, 0.22);
}
body[data-theme="dark"] .comm-msg.card.shadow-sm {
    box-shadow: 0 0.125rem 0.35rem rgba(0, 0, 0, 0.35) !important;
}
body[data-theme="dark"] .documents-section .alert-warning {
    background: rgba(200, 150, 50, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
    color: #f0e6c8;
}
body[data-theme="dark"] .documents-section .alert-success {
    background: rgba(40, 120, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.45);
    color: #d0f0d8;
}
body[data-theme="dark"] .documents-section .alert-danger {
    background: rgba(180, 60, 60, 0.2);
    border-color: rgba(244, 67, 54, 0.45);
    color: #ffcdd2;
}
body[data-theme="dark"] .documents-section .badge.bg-light.text-dark {
    background: rgba(15, 39, 71, 0.85) !important;
    color: #e0e6ed !important;
    border: 1px solid rgba(69, 162, 214, 0.3);
}
body[data-theme="dark"] .documents-section .text-muted {
    color: #a8b4c4 !important;
}

/* ========== Navigation ========== */
.site-nav-bar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Иначе при overflow-x: hidden вычисляется overflow-y: auto и обрезается выпадающее подменю */
@media (min-width: 1200px) {
    .site-nav-bar {
        overflow: visible;
    }
}

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 14px 16px;
    color: #fff;
    font-size: 18px;
    font-family: inherit;
    line-height: 1.3;
    background-color: #0F4685;
    text-align: center;
    transition: background-color 0.3s;
    border: none;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    appearance: none;
    -webkit-appearance: none;
}

.menu-toggle:hover {
    background-color: #1a6bc4;
}

.nav-menu {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background-color: #0F4685;
    margin-top: 0;
}

.nav-menu .nav-link,
.nav-menu .nav-link:hover,
.nav-menu .dropdown-link,
.nav-menu .dropdown-link:hover {
    color: #fff;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    max-width: var(--layout-max-width);
    flex-wrap: wrap;
}

/* Только главное меню — не перекрывать цвет Bootstrap .nav-tabs .nav-link на других страницах */
.nav-menu .nav-item {
    position: relative;
}

/* Соседние пункты flex-меню иначе рисуются поверх выпадающего списка (часто «Главная»). */
.nav-menu .nav-item:hover,
.nav-menu .nav-item:focus-within,
.nav-menu .nav-item:has(.nav-submenu.active) {
    z-index: 1002;
}

.nav-menu .nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.nav-menu .nav-link {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding: 14px 20px;
    transition: all 0.3s ease;
    font-size: 18px;
    white-space: nowrap;
}

.nav-menu .nav-link i {
    margin-right: 8px;
    font-size: 18px;
}

.nav-menu .nav-link:hover {
    background-color: #1a6bc4;
    color: #fff;
}

.hedicon {
    color: #fff !important;
}

.fa-lock-nav {
    color: #dddb7b !important;
    margin-left: 5px;
}

/* Отдельный класс от Bootstrap .dropdown-menu — иначе подменю «Главная» и др. не показываются */
.nav-menu .nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a6bc4;
    list-style: none;
    display: none;
    min-width: max-content;
    z-index: 5000;
    padding: 0;
    margin: 0;
    border-top: 3px solid #0F4685;
}

.nav-menu .nav-item:hover .nav-submenu {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-link {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
    white-space: nowrap;
}

.dropdown-link i {
    margin-right: 8px;
    font-size: 16px;
}

.dropdown-link:hover {
    background-color: #0F4685;
    color: #fff;
    padding-left: 25px;
}

/* ========== Main content ========== */
.main {
    flex: 1;
    padding: 0 0 2rem;
    min-width: 0;
    max-width: 100%;
}
body[data-theme="dark"] .main {
    background: #0d1929;
}

.content {
    background: var(--color-content-bg);
    padding: 0.65rem 1.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--color-content-shadow);
    text-align: justify;
    min-width: 0;
    max-width: 100%;
}

article.content:has(.page-heading) {
    padding-top: 0;
    border-radius: 0 0 8px 8px;
}

article.content:has(.page-heading) .page-heading__bar {
    border-radius: 0;
}

.content h1 {
    margin-top: 0;
    color: var(--color-primary);
}
.content p {
    margin: 0 0 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

/* Формы входа и регистрации */
.auth-box {
    max-width: 480px;
    margin: 0 auto;
}

.auth-box .content.h1 {
    margin-bottom: 0.5rem;
}

.auth-box p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.auth-form .mb-3 {
    margin-bottom: 1rem;
}

.auth-form .btn-primary {
    margin-right: 0.5rem;
}

/* Страница входа — карточка как на макете */
.content:has(.auth-page) {
    background: transparent;
    box-shadow: none;
    padding: 1.5rem 0 2.5rem;
    text-align: center;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem 2rem;
    background: #21568b;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    color: #fff;
    text-align: center;
}

.auth-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    margin: 0 auto 1.25rem;
    border: 2px solid rgba(120, 190, 255, 0.65);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.auth-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}

.auth-card-logo-fallback {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.5rem;
    color: #fff;
}

.auth-card .auth-card-title {
    margin: 0 0 0.75rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.auth-card-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.auth-card-alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(220, 53, 69, 0.18);
    border: 1px solid rgba(255, 120, 130, 0.55);
    color: #ffe8ea;
    font-size: 0.9rem;
    text-align: left;
}
.auth-card-alert--success {
    background: rgba(25, 135, 84, 0.2);
    border-color: rgba(120, 220, 160, 0.5);
    color: #e8fff0;
}

.auth-card-form {
    text-align: left;
}

.auth-card-field {
    margin-bottom: 1.15rem;
}

.auth-card-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.auth-card-required {
    color: #ff8a8a;
}

.auth-card-input {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #3a7dbf;
    border-radius: 10px;
    background: #1a4570;
    color: #fff;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card-input::placeholder {
    color: rgba(170, 205, 240, 0.75);
}

.auth-card-input:focus {
    outline: none;
    border-color: #5eb0ff;
    box-shadow: 0 0 0 3px rgba(0, 145, 255, 0.22);
}

.auth-card-submit {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #2196f3 0%, #1e88e5 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.auth-card-submit:hover {
    background: linear-gradient(180deg, #1e88e5 0%, #1976d2 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.auth-card-submit:active {
    transform: translateY(1px);
}

.auth-card-footer-text {
    margin: 1.35rem 0 0.65rem;
    font-size: 0.95rem;
    color: #fff;
    text-align: center;
}

.auth-card-back {
    margin: 0;
    text-align: center;
}

.auth-card-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-card-link:hover {
    color: #b8dcff;
}

.auth-card-link-back {
    font-size: 0.9rem;
    opacity: 0.95;
}

.auth-card--register {
    max-width: 720px;
}

.auth-card-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

.auth-card-form-grid .auth-card-field {
    margin-bottom: 1rem;
}

.auth-card-form-grid .auth-card-field--full {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .auth-card--register {
        max-width: 460px;
    }

    .auth-card-form-grid {
        grid-template-columns: 1fr;
    }
}

.auth-card-hint {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(190, 220, 250, 0.88);
}

.auth-card-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
}

.auth-card-checkbox {
    flex-shrink: 0;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    accent-color: #2196f3;
    cursor: pointer;
}

.auth-card-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
}

.auth-card-consent-btn {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: #fff;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.auth-card-consent-btn:hover {
    color: #b8dcff;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 20px;
    }

    .auth-card .auth-card-title {
        font-size: 1.45rem;
    }
}

.consent-text {
    white-space: pre-wrap;
    max-height: 60vh;
    overflow-y: auto;
}

/* Главная — та же ширина, что у .main .container (страница новостей) */
.home-page {
    margin-bottom: 1.5rem;
}

.home-page .home-stats-block .container,
.home-page .home-it-holidays-block .container,
.home-page .home-birthdays-block .container {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    transform: none;
}

.home-page .home-banner-block .container {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    transform: none;
}

.home-page .home-slider-block,
.home-page .home-stats-block,
.home-page .home-it-holidays-block,
.home-page .home-birthdays-block {
    margin-left: 0;
    margin-right: 0;
}

.home-page .home-slider-block {
    margin-bottom: 1.5rem;
}

.home-page .home-stats-block,
.home-page .home-it-holidays-block,
.home-page .home-birthdays-block {
    margin-bottom: 1.5rem;
}

.home-page .slider-wrapper {
    max-width: 100%;
}

/* Баннер и слайдер на главной */
.home-banner-block {
    background: var(--color-bg-header);
    padding: 1rem 1.5rem;
    text-align: center;
    box-sizing: border-box;
}

.home-banner-text {
    margin: 0;
    text-align: justify;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.home-banner-text--typewriter {
    font-family: 'Special Elite', 'Courier New', Courier, monospace !important;
    letter-spacing: 0.04em;
    line-height: 1.25;
    white-space: pre-line;
    text-align: left;
    /* Резерв под 3 строки: слайдер ниже не прыгает при коротких/длинных цитатах и при печати */
    min-height: calc(3 * 1.25em);
    min-height: 3lh;
}

.home-banner-text--typewriter .banner-quote {
    display: none;
    margin: 0;
    padding: 0;
}
.home-banner-text--typewriter .banner-quote.active {
    display: inline;
}
.banner-quote.typing::after {
    content: '|';
    margin-left: 1px;
    font-weight: 400;
    animation: banner-typewriter-cursor 0.75s step-end infinite;
}
@keyframes banner-typewriter-cursor {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}
body[data-theme="dark"] .home-banner-text,
body[data-theme="dark"] .banner-quote {
    color: #fff !important;
}

.home-slider-block {
    background: #e8f0f8;
    padding: 1.5rem 0;
    border-radius: 8px;
    margin: 0 1rem 1.5rem;
}
body[data-theme="dark"] .home-slider-block {
    background: rgba(21, 34, 56, 0.5);
}

.slider-wrapper {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

.slider-caption-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.slider-caption-spacer {
    flex-shrink: 0;
    width: 44px;
}

.slider-caption {
    flex: 1;
    min-width: 0;
    margin: 0;
    text-align: center;
    overflow-wrap: break-word;
}

.slider-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.slider-center {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.slider-play-pause-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}
.slider-play-pause {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #0F4685;
    background: #fff;
    color: #0F4685;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.slider-play-pause:hover {
    background: #0F4685;
    color: #fff;
}
.slider-thumbnails-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}
.slider-thumbnails-bottom .slider-thumb {
    width: 56px;
    height: 42px;
}

.slider-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid #0F4685;
    background: #fff;
    color: #0F4685;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s, color 0.2s;
}

.slider-arrow:hover {
    background: #0F4685;
    color: #fff;
}

.slider-viewport-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--color-primary);
}

.slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16/7;
}

.slider-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide.active {
    display: block;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: top;
}

.slider-slide-overlay {
    position: absolute;
    z-index: 2;
    max-width: 90%;
    padding: 8px 14px;
    line-height: 1.35;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}
.slider-slide-overlay--top-left { top: 12px; left: 12px; text-align: left; }
.slider-slide-overlay--top-center { top: 12px; left: 50%; transform: translateX(-50%); text-align: center; }
.slider-slide-overlay--top-right { top: 12px; right: 12px; text-align: right; }
.slider-slide-overlay--center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.slider-slide-overlay--bottom-left { bottom: 52px; left: 12px; text-align: left; }
.slider-slide-overlay--bottom-center { bottom: 52px; left: 50%; transform: translateX(-50%); text-align: center; }
.slider-slide-overlay--bottom-right { bottom: 52px; right: 12px; text-align: right; }


.slider-thumb {
    position: relative;
    width: 56px;
    height: 42px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s, opacity 0.2s;
}

.slider-thumb:not(.active) {
    opacity: 0.6;
}

.slider-thumb:not(.active)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.4);
    pointer-events: none;
}

.slider-thumb:hover {
    border-color: #0F4685;
    opacity: 1;
}

.slider-thumb:hover::after {
    display: none;
}

.slider-thumb.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--color-primary);
    opacity: 1;
}

.slider-thumb.active::after {
    display: none;
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 992px) {
    .management-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Главная: цитата, слайдер и статистика — только на десктопе */
@media (max-width: 1199.98px) {
    .home-page .home-banner-block,
    .home-page .home-slider-block,
    .home-page .home-stats-block {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .home-page .home-slider-block,
    .home-page .home-stats-block,
    .home-page .home-it-holidays-block,
    .home-page .home-birthdays-block {
        margin-left: 0;
        margin-right: 0;
    }
    .management-grid { grid-template-columns: 1fr; }
    .slider-play-pause { padding: 3px 8px; font-size: 11px; }
    .slider-thumbnails-bottom .slider-thumb { width: 56px; height: 42px; }
    .slider-arrow { width: 36px; height: 36px; font-size: 14px; }
    .slider-thumb { width: 56px; height: 42px; }
    /* Слайд на всю ширину, стрелки — строкой ниже (без переполнения по горизонтали) */
    .slider-center {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    .slider-viewport-wrap {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .slider-arrow-left {
        order: 2;
    }
    .slider-arrow-right {
        order: 2;
        margin-left: auto;
    }
    .slider-caption-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .slider-caption-spacer {
        display: none;
    }
    .slider-caption {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Статистика главной */
.home-stats-block {
    background: linear-gradient(135deg, #e8f2fc 0%, #f0f7ff 100%);
    margin: 0 1rem 1.5rem;
    padding: 1.25rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 70, 133, 0.08);
    border: 1px solid rgba(15, 70, 133, 0.12);
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.25rem;
    text-align: center;
}

.home-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

a.home-stat-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.home-stat-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.home-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 70, 133, 0.15);
}

.home-stats-block--configured .home-stat-item {
    background: transparent;
}

.home-stats-block--configured .home-stat-icon,
.home-stats-block--configured .home-stat-value,
.home-stats-block--configured .home-stat-label {
    opacity: 1;
}

.home-stat-icon {
    font-size: 1.25rem;
    color: var(--color-primary);
    opacity: 0.9;
}

.home-stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--color-primary);
    line-height: 1.2;
}

.home-stat-label {
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.35;
    max-width: 95px;
}

/* Блоки главной — единое выравнивание */
.home-it-holidays-block .container,
.home-birthdays-block .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* IT-праздники и именинники на главной */
.home-it-holidays-block,
#home-it-holidays {
    scroll-margin-top: 5.5rem;
}
.home-it-holidays-block,
.home-birthdays-block {
    background: var(--color-content-bg);
    margin: 0 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--color-content-shadow);
    overflow: hidden;
}

.home-it-holidays-grid,
.home-birthdays-grid {
    padding: 1rem 0 1.5rem;
}

.home-it-holidays-row-cols-6 .home-it-holiday-card-img-wrap,
.home-it-holidays-row-cols-6 .home-it-holiday-card-img-wrap.home-it-holiday-img-rotator {
    min-height: 110px;
}

.home-it-holidays-row-cols-6 .home-it-holiday-card-img-wrap.home-it-holiday-img-rotator {
    height: 120px;
}

.home-it-holidays-row-cols-6 .home-it-holiday-card-img {
    height: 120px;
}

.home-it-holidays-row-cols-6 .home-it-holiday-title {
    font-size: 0.875rem;
}

.home-it-holidays-row-cols-6 .home-it-holiday-countdown,
.home-it-holidays-row-cols-6 .home-it-holiday-section-summary {
    font-size: 0.75rem;
}

.home-it-holiday-card-img-wrap,
.home-birthday-card-img-wrap {
    background: linear-gradient(135deg, #e8f2fc 0%, #f5f9ff 100%);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-it-holiday-card-img,
.home-birthday-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.home-it-holiday-card-img-wrap.home-it-holiday-img-rotator {
    display: block;
    position: relative;
    height: 160px;
    min-height: 160px;
}

.home-it-holiday-img-rotator .home-it-holiday-card-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.home-it-holiday-img-rotator .home-it-holiday-card-img.is-visible {
    opacity: 1;
    z-index: 1;
}

.home-it-holiday-card-placeholder,
.home-birthday-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 140px;
    color: #0F4685;
    font-size: 3rem;
    opacity: 0.45;
}

.home-it-holiday-title {
    color: #0F4685;
}

.home-it-holiday-status--today .home-it-holiday-congrats {
    font-weight: 600;
    color: #0F4685;
}

.home-it-holiday-countdown {
    color: var(--color-text);
    font-weight: 500;
}

.home-it-holiday-section-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.home-it-holiday-details {
    border-top: 1px solid rgba(15, 70, 133, 0.12);
    padding-top: 0.35rem;
}

.home-it-holiday-details + .home-it-holiday-details {
    margin-top: 0.35rem;
}

.home-it-holiday-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    list-style: none;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary);
    padding: 0.2rem 0;
    user-select: none;
}

.home-it-holiday-section-summary::-webkit-details-marker {
    display: none;
}

.home-it-holiday-section-summary::after {
    content: '';
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(45deg);
    margin-top: -0.15rem;
    transition: transform 0.2s ease;
}

.home-it-holiday-details[open] > .home-it-holiday-section-summary::after {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}

.home-it-holiday-details-body {
    padding: 0.35rem 0 0.15rem;
}

.home-it-holiday-desc,
.home-it-holiday-history {
    color: #555;
}
.home-it-holiday-text-line:last-child {
    margin-bottom: 0 !important;
}

.info-block-header:not(.page-heading__bar),
.block-header-styled {
    background: #0F4685;
    color: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px 8px 0 0;
}
.info-block-header .bi-info-circle,
.info-block-header .bi-calendar-heart,
.info-block-header .bi-calendar-event,
.info-block-header .bi-gift,
.block-header-styled .bi-kanban,
.about-section-header .bi,
.about-section-header i {
    font-size: 1.85rem;
    flex-shrink: 0;
}
.info-block-header .block-back-top,
.block-header-styled .block-back-top {
    margin-left: auto;
}

.site-block-header-icon {
    flex-shrink: 0;
    line-height: 1;
}

.site-icon-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    color: #0F4685;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}
.site-icon-picker-item:hover {
    border-color: #0F4685;
    background: #f0f6fc;
}
.site-icon-picker-item.is-selected {
    border-color: #0F4685;
    background: #e8f0fa;
    box-shadow: inset 0 0 0 1px #0F4685;
}

.color-input-group {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}
.color-input-group .color-input-picker {
    flex: 0 0 3rem;
    width: 3rem;
    min-height: 2.375rem;
    padding: 0.2rem;
}
.color-input-group .color-input-hex {
    flex: 1 1 auto;
    min-width: 0;
    text-transform: uppercase;
}

.block-header-shared-style {
    background: #f8fafc !important;
}
body[data-theme="dark"] .block-header-shared-style {
    background: rgba(21, 34, 56, 0.55) !important;
    border-color: rgba(69, 162, 214, 0.28) !important;
}
body[data-theme="dark"] .site-icon-picker-item {
    background: #2a2a2a;
    border-color: #555;
    color: #9ec5fe;
}
body[data-theme="dark"] .site-icon-picker-item.is-selected {
    background: #1a3a5c;
    border-color: #6ea8fe;
}

.info-block-title,
.management-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.info-block-content {
    padding: 1.5rem 0;
    color: var(--color-text);
    line-height: 1.65;
    text-align: justify;
}
.info-block-content p {
    margin: 0;
    text-indent: 1.5em;
}
.info-block-content .info-highlight {
    font-weight: 700;
    color: #0F4685;
}

/* Кнопка «Наверх» — белый круг, толстая стрелка (в блоках и футере) */
.block-back-top,
.req-scroll-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #0F4685;
    text-decoration: none;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.block-back-top i,
.req-scroll-top i {
    font-size: 1rem;
    font-weight: 900;
}
.block-back-top:hover,
.req-scroll-top:hover {
    background: #e8f2fc;
    color: #0F4685;
    transform: translateY(-1px);
}

.req-scroll-top {
    margin-left: auto;
}
body[data-theme="dark"] .home-stats-block:not(.home-stats-block--configured) {
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.2) 0%, rgba(21, 34, 56, 0.4) 100%);
    border-color: rgba(69, 162, 214, 0.25);
}
body[data-theme="dark"] .home-stats-block:not(.home-stats-block--configured) .home-stat-item {
    background: rgba(255, 255, 255, 0.06);
}
body[data-theme="dark"] .home-stats-block:not(.home-stats-block--configured) .home-stat-icon,
body[data-theme="dark"] .home-stats-block:not(.home-stats-block--configured) .home-stat-value,
body[data-theme="dark"] .home-stats-block:not(.home-stats-block--configured) .home-stat-label {
    color: #8eb9e0 !important;
}

body[data-theme="dark"] .home-it-holidays-block,
body[data-theme="dark"] .home-birthdays-block {
    background: var(--color-content-bg);
}

body[data-theme="dark"] .home-it-holiday-card-img-wrap,
body[data-theme="dark"] .home-birthday-card-img-wrap {
    background: rgba(15, 70, 133, 0.2);
}

body[data-theme="dark"] .home-it-holiday-title,
body[data-theme="dark"] .home-it-holiday-status--today .home-it-holiday-congrats {
    color: #8eb9e0;
}

body[data-theme="dark"] .home-it-holiday-card-placeholder,
body[data-theme="dark"] .home-birthday-card-placeholder {
    color: #8eb9e0;
}
body[data-theme="dark"] .info-block-content {
    color: var(--color-text);
}
body[data-theme="dark"] .info-block-content .info-highlight {
    color: #8eb9e0;
}
body[data-theme="dark"] .block-back-top,
body[data-theme="dark"] .req-scroll-top {
    background: rgba(255,255,255,0.15);
    color: #8eb9e0;
}
body[data-theme="dark"] .block-back-top:hover,
body[data-theme="dark"] .req-scroll-top:hover {
    background: rgba(255,255,255,0.3);
    color: #b8d4f0;
}
body[data-theme="dark"] .scroll-top {
    background: rgba(255,255,255,0.15);
    color: #8eb9e0;
}

/* Блок «Руководство проектом (работой)» */
.home-management-block .block-header-styled {
    margin-bottom: 0;
}
.management-intro,
.management-definition,
.management-functions-title,
.management-grid {
    padding: 0;
}
.management-intro { padding-top: 1.5rem; }
.management-definition { padding-top: 0; }
.management-functions-title { padding-top: 1rem; }
.management-grid { padding-bottom: 2rem; }
.management-intro {
    margin: 0 0 1rem;
    line-height: 1.65;
    text-align: justify;
    text-indent: 1.5em;
}
.management-definition {
    background: #e8f4fc;
    border-left: 4px solid #0F4685;
    padding: 1rem 0;
    padding-left: 20px;
    margin: 0 0 1.5rem;
    border-radius: 0 6px 6px 0;
}
.management-definition .management-def-icon {
    color: #d4a017;
    margin-right: 0.35em;
}
.management-definition p {
    margin: 0;
    line-height: 1.6;
    text-align: justify;
}
.management-functions-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text);
}
.management-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}
.management-card {
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.15);
    border-radius: 8px;
    padding: 1rem 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(15, 70, 133, 0.08);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.management-card-icon {
    color: #0F4685;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.management-card-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
}
.management-card-sub {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
}
.management-card ul {
    margin: 0 0 0.5rem;
    padding-left: 0;
    list-style: none;
}
.management-card ul:last-child {
    margin-bottom: 0;
}
.management-card ul ul {
    padding-left: 1rem;
    margin-top: 0.25rem;
}
.management-list-nested {
    margin-bottom: 0.75rem !important;
    padding-left: 1.25rem;
}
.management-list-nested li {
    margin-bottom: 0.35rem;
    padding-left: 0;
}
.management-list-nested li:first-child {
    margin-top: 0.25rem;
}
.management-list-main {
    margin-top: 0 !important;
}
.management-card li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.management-card li::before {
    content: none;
}
.management-card .bi-check-circle-fill {
    color: #0F4685;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.2em;
}
.management-card .bi-square {
    color: #0F4685;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.15em;
}
.management-list-nested .bi-square {
    margin-top: 0.2em;
}
.management-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 3px 10px rgba(15, 70, 133, 0.12);
}
body[data-theme="dark"] .management-card {
    background: rgba(21, 34, 56, 0.5);
    border-color: rgba(69, 162, 214, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body[data-theme="dark"] .management-card-title,
body[data-theme="dark"] .management-card-sub,
body[data-theme="dark"] .management-card li,
body[data-theme="dark"] .management-card-icon { color: #8eb9e0; }
body[data-theme="dark"] .management-card .bi-check-circle-fill,
body[data-theme="dark"] .management-card .bi-square { color: #8eb9e0; }
body[data-theme="dark"] .management-definition {
    background: rgba(15, 70, 133, 0.2);
}

/* ========== Новости ========== */
.news-page-title { margin-bottom: 1rem; color: var(--color-primary); }
.news-filters .form-label { margin-bottom: 0.15rem; font-size: 0.75rem; }
.news-filters-fieldset {
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    background: #F0F7FF;
}
.news-filters-legend {
    padding: 0 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Единый фон блоков фильтрации (как у новостей) */
.tools-filters-fieldset {
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    background: #F0F7FF;
}
.doc-browser-search,
.charts-toolbar,
.users-filters,
.site-filters-panel {
    background: #F0F7FF;
    border: 1px solid rgba(15, 70, 133, 0.35);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}
.polls-toolbar,
.operativ-filter-card,
.events-calendar-toolbar,
.site-filters-card {
    background-color: #F0F7FF !important;
    border-color: rgba(15, 70, 133, 0.35) !important;
}
.polls-toolbar > .card-body,
.operativ-filter-card > .card-body,
.events-calendar-toolbar > .card-body,
.site-filters-card > .card-body {
    background-color: transparent;
}
.site-filters-card > .card-header {
    background-color: transparent;
    border-bottom-color: rgba(15, 70, 133, 0.2);
}

.news-filters .form-control-sm,
.news-filters .form-select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-height: 28px;
}
.news-filters .btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}
.news-filter-buttons {
    flex-direction: row;
    gap: 0.5rem;
}
.news-filters .btn-primary {
    background-color: #0F4685 !important;
    border-color: #0F4685 !important;
}
.news-filters .btn-primary:hover {
    background-color: #1a6bc4 !important;
    border-color: #1a6bc4 !important;
}
.news-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}
.news-filter-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.news-filter-item-wide {
    flex: 1 1 auto;
    min-width: min(10ch, 100%);
}
.news-filter-item-wide select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    min-width: 0;
}
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 70, 133, 0.12), 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 8px 24px rgba(15, 70, 133, 0.18), 0 4px 12px rgba(0,0,0,0.12); }
.news-card-cover-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
}
.news-card-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.news-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.news-card-divider {
    width: 50%;
    height: 1px;
    background: #ccc;
    margin: 0 auto 1rem;
}
.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.35;
    min-height: 4.05em;
    color: #0F4685;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}
.news-card-title a { color: #0F4685; text-decoration: none; }
.news-card-title a:hover { color: #1a6bc4; }
.news-card-category { color: #888; font-size: 0.85rem; margin-top: 0.25rem; margin-bottom: 0.5rem; }
.news-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-excerpt a { color: inherit; text-decoration: none; }
.news-card-excerpt a:hover { color: #0F4685; }
.news-card-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}
.news-card-meta .news-card-author { margin-right: 0; }
.news-card-meta .news-card-date { margin-left: 0; }
.news-card-stats {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.news-card-stats .news-card-rating { margin-right: auto; }
.news-card-stats .news-card-comments,
.news-card-stats .news-card-views { margin-left: 0; }
.news-card-rating .bi { color: #ffc107; }
.news-card-rating small { color: #777; margin-left: 2px; }
.news-card-comments { color: #777; }
.news-card-views { color: #777; }
.news-card-views .bi { margin-right: 0.25rem; }
.news-card-share { margin-bottom: 0.75rem; }
.news-card-share .btn { margin-right: 0.5rem; }
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
    gap: 0.5rem;
}
.news-card-btn {
    background-color: #0F4685 !important;
    border-color: #0F4685 !important;
}
.news-card-btn:hover {
    background-color: #1a6bc4 !important;
    border-color: #1a6bc4 !important;
}

.news-per-page-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.news-per-page-select { width: auto; min-width: 3.5em; max-width: 65px; }

.news-pagination-wrap { margin-top: 2rem; }
.news-pagination,
.list-pagination-nav .pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    border: none;
}
.news-pagination-item,
.list-pagination-nav .pagination .page-item {
    margin: 0;
}
.news-pagination-link,
.list-pagination-nav .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--color-primary);
    background: #fff;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(15, 70, 133, 0.12);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.news-pagination-link--nav,
.list-pagination-nav .pagination .page-item:first-child .page-link,
.list-pagination-nav .pagination .page-item:last-child .page-link {
    font-size: 0.85rem;
}
.news-pagination-link:hover:not(.is-disabled):not(.active),
.list-pagination-nav .pagination .page-link:hover {
    background: #e8f2fc;
    color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(15, 70, 133, 0.18);
}
.news-pagination-link.active,
.list-pagination-nav .pagination .page-item.active .page-link {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 70, 133, 0.35);
    pointer-events: none;
    z-index: 1;
}
.news-pagination-item.is-disabled .news-pagination-link,
.news-pagination-link.is-disabled,
.list-pagination-nav .pagination .page-item.disabled .page-link {
    background: #f0f4f8;
    color: #9aa8b8;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}
body[data-theme="dark"] .news-pagination-link:not(.active):not(.is-disabled),
body[data-theme="dark"] .list-pagination-nav .pagination .page-link:not(.active) {
    background: #1a2d47;
    color: #8eb9e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
body[data-theme="dark"] .news-pagination-link.active,
body[data-theme="dark"] .list-pagination-nav .pagination .page-item.active .page-link {
    background: var(--color-accent);
    color: #0d1929;
}
body[data-theme="dark"] .news-pagination-item.is-disabled .news-pagination-link,
body[data-theme="dark"] .news-pagination-link.is-disabled,
body[data-theme="dark"] .list-pagination-nav .pagination .page-item.disabled .page-link {
    background: #152238;
    color: #5a6d82;
}

/* ========== Объявления ========== */
.announcements-page-title { margin-bottom: 1rem; color: var(--color-primary); }
.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    min-width: 0;
}
.announcement-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 70, 133, 0.12), 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.announcement-card:hover { box-shadow: 0 8px 24px rgba(15, 70, 133, 0.18), 0 4px 12px rgba(0,0,0,0.12); }
.announcement-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.announcement-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}
.announcement-card-title a { color: inherit; text-decoration: none; flex: 1; }
.announcement-card-title a:hover { color: #0F4685; }
.announcement-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.announcement-status-active {
    background: #20b2aa;
    box-shadow: 0 0 0 1px rgba(32, 178, 170, 0.3);
}
.announcement-status-expired {
    background: #9b59b6;
    box-shadow: 0 0 0 1px rgba(155, 89, 182, 0.25);
}
.announcement-relevance {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.announcement-relevance-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.announcement-relevance-active .announcement-relevance-dot {
    background: #20b2aa;
    box-shadow: 0 0 0 2px rgba(32, 178, 170, 0.25);
}
.announcement-relevance-active .announcement-relevance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #178f88;
}
.announcement-relevance-expired .announcement-relevance-dot {
    background: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.25);
}
.announcement-relevance-expired .announcement-relevance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9b59b6;
}
.announcement-card--expired {
    opacity: 0.92;
}
.announcement-card--expired .announcement-card-beacon,
.announcement-card--expired .announcement-card-full {
    background: #faf8fc;
}
body[data-theme="dark"] .announcement-card--expired .announcement-card-beacon,
body[data-theme="dark"] .announcement-card--expired .announcement-card-full {
    background: rgba(155, 89, 182, 0.08);
}
.announcement-article--expired {
    border-left: 3px solid #9b59b6;
    padding-left: 1rem;
}
.announcement-urgent-mark {
    color: #dc3545;
    font-weight: 800;
    font-size: 1.3em;
    line-height: 1;
    flex-shrink: 0;
}
.announcement-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.announcement-card-excerpt a { color: inherit; text-decoration: none; }
.announcement-card-excerpt a:hover { color: #0F4685; }
.announcement-card-material-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #0F4685;
    text-decoration: none;
    margin-bottom: 0.75rem;
}
.announcement-card-material-link:hover { color: #1a6bc4; text-decoration: underline; }
.announcement-card-meta { font-size: 0.8rem; color: #777; margin-bottom: 0.5rem; }
.announcement-card-meta span { margin-right: 1rem; }
.announcement-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
}
.announcement-card-btn,
.announcement-card-actions .btn-primary {
    background-color: #0F4685 !important;
    border-color: #0F4685 !important;
}
.announcement-card-btn:hover,
.announcement-card-actions .btn-primary:hover {
    background-color: #1a6bc4 !important;
    border-color: #1a6bc4 !important;
}

/* Компактная карточка-маяк (мобильная версия списка) */
.announcement-card-beacon {
    display: none;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.announcement-card-beacon:hover,
.announcement-card-beacon:focus-visible {
    background: rgba(15, 70, 133, 0.06);
    color: inherit;
    outline: none;
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.announcement-card-beacon .announcement-status-dot {
    width: 12px;
    height: 12px;
    margin: 0;
    flex-shrink: 0;
}

.announcement-status-urgent {
    background: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.announcement-card-beacon-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.announcement-card-beacon-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.announcement-card-beacon-period {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.25;
}

.announcement-card-beacon-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: rgba(15, 70, 133, 0.45);
}

body[data-theme="dark"] .announcement-card-beacon:hover,
body[data-theme="dark"] .announcement-card-beacon:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .announcement-card-beacon-title {
    color: #8eb9e0;
}

body[data-theme="dark"] .announcement-card-beacon-period {
    color: #9aa5b1;
}

@media (max-width: 1199.98px) {
    .announcements-page .announcements-grid,
    .announcements-page .announcements-grid[class*="--cols-"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.5rem;
    }

    .announcement-card {
        box-shadow: 0 1px 4px rgba(15, 70, 133, 0.1);
    }

    .announcement-card:hover {
        box-shadow: 0 2px 8px rgba(15, 70, 133, 0.14);
    }

    .announcement-card-beacon {
        display: flex;
    }

    .announcement-card-full {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .announcement-card-beacon {
        display: none !important;
    }
}

.announcement-item-page { max-width: var(--layout-max-width); margin: 0 auto; }
.announcement-article-title {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.announcement-article-title .announcement-status-dot {
    width: 12px;
    height: 12px;
}
.announcement-article-meta { color: #777; font-size: 0.9rem; margin-bottom: 1rem; }
.announcement-article-meta span { margin-right: 1.5rem; }
.announcement-article-content img {
    display: block;
    max-width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    margin: 1rem auto;
    border-radius: 8px;
    background: #f5f5f5;
}
.announcement-article-content {
    margin-bottom: 2rem;
    text-align: justify;
}
.announcement-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.announcement-article-content table td,
.announcement-article-content table th {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.announcement-article-content table th { background: #f8f9fa; font-weight: 600; }
.announcement-article-material-link a { color: #0F4685; text-decoration: none; }
.announcement-article-material-link a:hover { text-decoration: underline; }
.announcement-article-share {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.announcement-article-share span { margin-right: 0.5rem; }
.announcement-article-share .btn { margin-right: 0.5rem; }
/* Новости и объявления — мобильные экраны */
@media (max-width: 767.98px) {
    .news-page,
    .announcements-page {
        min-width: 0;
    }
    .news-filters-fieldset {
        padding: 0.5rem 0.65rem;
        max-width: 100%;
    }
    .news-filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .news-filter-item,
    .news-filter-item-wide {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }
    .news-filters .form-control-sm,
    .news-filters .form-select-sm {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .news-filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    .news-filter-buttons .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }
    .news-per-page-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        margin-bottom: 1rem;
    }
    .news-per-page-select {
        width: 100%;
        max-width: 14rem;
    }
    .news-grid,
    .announcements-grid {
        grid-template-columns: 1fr;
    }
}

/* Новости: мобильный список — одна карточка в строке, первые 2 строки текста */
@media (max-width: 1199.98px) {
    .news-page .news-grid,
    .news-page .news-grid[class*="--cols-"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.75rem;
    }

    .news-card-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0.65rem;
        font-size: 0.925rem;
        line-height: 1.45;
    }

    .news-page .news-per-page-wrap {
        display: none;
    }

    .news-card-cover-wrap {
        max-height: 11rem;
    }

    .news-card-cover {
        max-height: 11rem;
        object-fit: cover;
    }
}

.news-item-page { max-width: var(--layout-max-width); margin: 0 auto; }
.news-back-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.news-back-btn:hover { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.site-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.55rem 1.15rem;
    border-radius: 0.45rem;
    border: 1.5px solid var(--color-primary, #0F4685);
    background: transparent;
    color: var(--color-primary, #0F4685);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.site-nav-btn:hover,
.site-nav-btn:focus {
    color: #fff;
    background: var(--color-primary, #0F4685);
    border-color: var(--color-primary, #0F4685);
    text-decoration: none;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 70, 133, 0.22);
}
.site-nav-btn:focus-visible {
    outline: 2px solid rgba(15, 70, 133, 0.35);
    outline-offset: 2px;
}
.site-nav-btn--sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
}
.site-nav-btn--album {
    background: rgba(15, 70, 133, 0.06);
}
.site-nav-btn--album:hover,
.site-nav-btn--album:focus {
    background: var(--color-primary, #0F4685);
}
.site-nav-btn--article {
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.1) 0%, rgba(15, 70, 133, 0.04) 100%);
}
.photo-archive-return-article .site-nav-btn {
    width: 100%;
    max-width: 36rem;
}
body[data-theme="dark"] .site-nav-btn {
    color: #8eb9e0;
    border-color: rgba(142, 185, 224, 0.55);
    background: rgba(142, 185, 224, 0.06);
}
body[data-theme="dark"] .site-nav-btn:hover,
body[data-theme="dark"] .site-nav-btn:focus {
    color: #0b1c2e;
    background: #8eb9e0;
    border-color: #8eb9e0;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}
.page-back-nav .news-back-btn {
    margin-bottom: 0;
}
.page-back-nav__sep {
    user-select: none;
}
.page-back-nav__current {
    font-weight: 500;
    text-decoration: none;
}
a.page-back-nav__current:hover {
    color: var(--color-primary) !important;
    text-decoration: underline;
}
.news-article-cover {
    display: block;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ===== Журнальный формат новости (палитра сайта) ===== */
.news-item-page--magazine {
    max-width: var(--layout-max-width);
}

.news-magazine {
    --mg-ink: #1f2a33;
    --mg-muted: #5a6a7a;
    --mg-caption: #6b5344;
    --mg-accent: #8b2e2e;
    --mg-drop: #9c2a2a;
    --mg-paper: #f6f0e6;
    --mg-frame: #fffcf7;
    --mg-rule: rgba(139, 46, 46, 0.28);
    --mg-figure-border: rgba(90, 70, 50, 0.22);
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem;
    padding: 1.35rem 1.4rem 1.75rem;
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.85), transparent 9rem),
        var(--mg-paper);
    border: 1px solid var(--mg-rule);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(90, 60, 40, 0.1);
    color: var(--mg-ink);
}

.news-magazine-masthead {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--mg-accent);
}

.news-magazine-eyebrow {
    margin: 0 0 0.35rem;
    font-family: "Oswald", "Roboto Condensed", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mg-accent);
}

.news-magazine-title {
    margin: 0 0 0.45rem;
    font-family: "Oswald", "Roboto Condensed", sans-serif;
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--mg-ink);
    text-transform: uppercase;
}

.news-magazine-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.1rem;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.98rem;
    color: var(--mg-muted);
}

.news-magazine-cover {
    display: inline-block;
    width: auto;
    max-width: 100%;
    margin: 0 auto 1.35rem;
    padding: 0;
    text-align: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    /* центрирование через родителя */
}

.news-magazine > .news-magazine-cover,
.news-magazine .news-magazine-cover {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.news-magazine-cover img,
.news-magazine-cover .news-magazine-cover-img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 440px !important;
    max-height: 520px !important;
    object-fit: cover;
    object-position: center center;
    aspect-ratio: unset !important;
    border: 1px solid var(--mg-figure-border);
    box-shadow: 0 8px 18px rgba(90, 60, 40, 0.12);
    background: var(--mg-frame) !important;
    border-radius: 2px;
    cursor: zoom-in;
    margin: 0 auto;
    padding: 0.45rem;
}

.news-magazine-cover img.news-img-zoomed {
    cursor: zoom-out;
    position: relative;
    z-index: 30;
    max-width: min(96vw, 920px) !important;
    max-height: min(88vh, 900px) !important;
    transform: none;
    object-fit: contain;
    box-shadow: 0 12px 36px rgba(90, 60, 40, 0.28);
}

.news-magazine-body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 1.2rem;
    line-height: 1.75;
    color: var(--mg-ink);
}

.news-magazine-body p,
.news-magazine-body li,
.news-magazine-body span {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.news-magazine-body::after {
    content: "";
    display: table;
    clear: both;
}

.news-magazine-body p {
    margin: 0 0 1.05rem;
    text-align: justify;
    text-indent: 1.5em !important;
    hyphens: auto;
    overflow-wrap: break-word;
}

.news-magazine-body p:has(> .mg-figure),
.news-magazine-body p:has(> img),
.news-magazine-body p:empty {
    text-indent: 0 !important;
}

/* Буквица — первый абзац (Рисунок 2) */
.news-magazine-body > p:first-of-type::first-letter {
    float: left;
    font-family: "Oswald", "Roboto Condensed", Georgia, "Times New Roman", serif;
    font-size: 3.05em;
    font-weight: 700;
    line-height: 0.82;
    padding: 0.06em 0.1em 0 0;
    margin: 0.04em 0.1em 0 0;
    color: var(--mg-drop);
    text-transform: uppercase;
}

.news-magazine-body h2,
.news-magazine-body h3 {
    font-family: "Oswald", "Roboto Condensed", sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--mg-accent);
    width: 100%;
    border-top: 1px solid var(--mg-rule);
    border-bottom: 1px solid var(--mg-rule);
    border-left: 0;
    border-right: 0;
    padding: 0.45rem 0.75rem;
    margin: 1.45rem 0 0.9rem;
    clear: both;
}

.news-magazine-body h2 { font-size: 1.35rem; }
.news-magazine-body h3 { font-size: 1.18rem; }

.news-magazine-body .mg-figure,
.news-magazine-body figure.mg-figure {
    --mg-figure-gap: 0.85rem;
    margin: var(--mg-figure-gap);
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    cursor: zoom-in;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.news-magazine-body .mg-figure-shell {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--mg-figure-gap);
    width: 100%;
    box-sizing: border-box;
}

/* Реакции со стороны текста: у левого фото — справа, у правого — слева */
.news-magazine-body .mg-figure--left .mg-figure-shell {
    flex-direction: row;
}
.news-magazine-body .mg-figure--right .mg-figure-shell {
    flex-direction: row-reverse;
}
.news-magazine-body .mg-figure--center .mg-figure-shell {
    flex-direction: row;
    justify-content: center;
}

.news-magazine-body .mg-figure-media {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 3.1rem);
    padding: 0.55rem 0.55rem 0.4rem;
    background: var(--mg-frame);
    border: 1px solid var(--mg-figure-border);
    border-radius: 2px;
    box-shadow: 0 4px 14px rgba(60, 40, 20, 0.12);
    box-sizing: border-box;
}

.news-magazine-body .mg-figure-rail {
    display: flex;
    flex-direction: column;
    flex: 0 0 2.6rem;
    width: 2.6rem;
    min-width: 2.6rem;
    align-items: center;
    box-sizing: border-box;
}

.news-magazine-body .mg-figure-reactions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.3rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0 !important;
    cursor: default;
    box-sizing: border-box;
}

.news-magazine-body .mg-figure-reactions form {
    display: block;
    margin: 0;
    width: 100%;
}

.news-magazine-body .mg-figure-reactions .charts-reaction-btn,
.news-magazine-body .mg-figure-reactions .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 0.2rem 0.1rem;
    line-height: 1.05;
    font-size: 0.95rem;
    white-space: nowrap;
}

.news-magazine-body .mg-figure-reactions .charts-reaction-count {
    display: block;
    margin: 0.05rem 0 0;
    font-size: 0.65rem;
    line-height: 1;
}

.news-magazine-body .mg-figure-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    margin-top: 0.85rem;
    padding: 0;
    border: 1px solid var(--mg-figure-border);
    border-radius: 0.4rem;
    background: rgba(255, 252, 247, 0.98);
    color: var(--mg-accent);
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(60, 40, 20, 0.12);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.news-magazine-body .mg-figure-download:hover,
.news-magazine-body .mg-figure-download:focus-visible {
    background: var(--mg-accent);
    color: #fff;
    border-color: var(--mg-accent);
}

.news-magazine-body .mg-figure-download i {
    font-size: 0.95rem;
    line-height: 1;
}

.news-magazine-body .mg-figure img,
.news-magazine-body .mg-figure .news-inline-img,
.news-magazine-body.news-article-content .mg-figure img,
.news-magazine-body.news-article-content img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    aspect-ratio: unset !important;
    border-radius: 0;
    background: transparent !important;
    margin: 0 !important;
    border: 0;
    box-shadow: none;
}

.news-magazine-body .mg-figure--center {
    float: none;
    display: block;
    clear: both;
    width: min(56%, 420px);
    max-width: 420px;
    margin: var(--mg-figure-gap) auto;
}

.news-magazine-body .mg-figure--right {
    float: right;
    clear: right;
    width: min(48%, 380px);
    max-width: 380px;
    margin: var(--mg-figure-gap);
    shape-outside: margin-box;
}

.news-magazine-body .mg-figure--left {
    float: left;
    clear: left;
    width: min(48%, 380px);
    max-width: 380px;
    margin: var(--mg-figure-gap);
    shape-outside: margin-box;
}

.news-magazine-body .mg-figure figcaption,
.news-magazine-body .mg-figure .news-inline-caption,
.news-magazine-body .mg-figure .mg-caption {
    display: block !important;
    margin-top: 0.45rem;
    margin-bottom: 0.1rem;
    padding: 0 0.15rem;
    font-family: Inter, Georgia, "Times New Roman", serif !important;
    font-size: 0.88rem;
    font-style: italic;
    line-height: 1.35;
    color: var(--mg-caption);
    text-align: center;
    text-indent: 0 !important;
}

.news-magazine-body a {
    color: var(--color-primary);
    text-decoration: underline;
}

@media (max-width: 767px) {
    .news-magazine {
        padding: 1rem 0.85rem 1.25rem;
    }
    .news-magazine-cover img,
    .news-magazine-cover .news-magazine-cover-img {
        max-width: min(100%, 340px) !important;
    }
    .news-magazine-body {
        font-size: 1.1rem;
    }
    .news-magazine-body > p:first-of-type::first-letter {
        font-size: 2.85em;
    }
    .news-magazine-body .mg-figure--left,
    .news-magazine-body .mg-figure--right,
    .news-magazine-body .mg-figure--center {
        float: none;
        clear: both;
        width: min(92%, 360px);
        max-width: 360px;
        margin: 0.85rem auto;
    }
    .news-magazine-body .mg-figure--left .mg-figure-shell,
    .news-magazine-body .mg-figure--right .mg-figure-shell,
    .news-magazine-body .mg-figure--center .mg-figure-shell {
        flex-direction: row;
        justify-content: center;
    }
}

body[data-theme="dark"] .news-magazine {
    --mg-ink: #e8eef5;
    --mg-muted: #a8b8c8;
    --mg-caption: #c4a882;
    --mg-accent: #c97878;
    --mg-drop: #d48080;
    --mg-paper: #1a2436;
    --mg-frame: #222e42;
    --mg-rule: rgba(201, 120, 120, 0.35);
    --mg-figure-border: rgba(142, 185, 224, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    background:
        linear-gradient(180deg, rgba(34, 46, 66, 0.65), transparent 9rem),
        var(--mg-paper);
}

body[data-theme="dark"] .news-magazine-cover img,
body[data-theme="dark"] .news-magazine-body .mg-figure img {
    background: transparent;
    border-color: transparent;
}

body[data-theme="dark"] .news-magazine-body .mg-figure-media {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .news-magazine-body .mg-figure-download {
    background: rgba(34, 46, 66, 0.95);
    color: #8eb9e0;
    border-color: rgba(142, 185, 224, 0.35);
}

body[data-theme="dark"] .news-magazine-body .mg-figure-download:hover,
body[data-theme="dark"] .news-magazine-body .mg-figure-download:focus-visible {
    background: #8eb9e0;
    color: #1a2436;
}

.news-article-title {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-weight: 700;
    text-align: center;
}
.news-article-category {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.news-article-meta { color: #777; font-size: 0.9rem; margin-bottom: 1rem; }
.news-article-meta span { margin-right: 1.5rem; }
.news-article-content { margin-bottom: 2rem; text-align: justify; }
.news-linked-album {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.08) 0%, rgba(15, 70, 133, 0.02) 100%);
    border: 1px solid rgba(15, 70, 133, 0.15);
}
.news-linked-album-btn {
    margin: 0;
}
body[data-theme="dark"] .news-linked-album {
    background: rgba(142, 185, 224, 0.08);
    border-color: rgba(142, 185, 224, 0.2);
}
.news-article-content p,
.news-article-content > div {
    margin-bottom: 1rem;
    text-indent: 1.5em;
}
.news-article-content a {
    color: var(--color-primary, #0d6efd);
    text-decoration: underline;
}
.news-article-content a:hover {
    text-decoration: none;
}
.news-article-content img {
    display: block;
    max-width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    margin: 1rem auto;
    border-radius: 8px;
    background: #f5f5f5;
}
/* Журнальная новость: без принудительного 4:3 и серого фона (иначе «белые полосы») */
.news-magazine-body.news-article-content img,
.news-magazine .news-magazine-cover img {
    aspect-ratio: auto !important;
    background: transparent !important;
    margin-left: auto;
    margin-right: auto;
}
.news-article-content::after {
    content: "";
    display: table;
    clear: both;
}
.news-inline-media {
    margin: 0 0 1rem;
}
.news-inline-media--left {
    float: left;
    margin: 0.2rem 1rem 0.8rem 0;
}
.news-inline-media--right {
    float: right;
    margin: 0.2rem 0 0.8rem 1rem;
}
.news-inline-media--top {
    float: none;
    clear: both;
    margin: 0.2rem auto 1rem;
}
.news-inline-media--bottom {
    float: none;
    clear: both;
    margin: 1rem auto 0.2rem;
}
.news-inline-media .news-inline-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.news-inline-caption {
    font-size: 0.88rem;
    color: #666;
    margin-top: 0.35rem;
    text-align: center;
}
.news-article-share { margin-bottom: 2rem; padding-top: 1rem; border-top: 1px solid #eee; }
.news-article-share span { margin-right: 0.5rem; }
.news-article-share .btn { margin-right: 0.5rem; }
.news-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}
.news-gallery-item {
    flex: 0 0 25%;
    width: 25%;
    margin: 0;
    transition: flex-basis .22s ease, width .22s ease;
}
.news-gallery-item.news-gallery-item--half {
    flex-basis: 50%;
    width: 50%;
    z-index: 20;
    position: relative;
}
.news-gallery-img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: 6px;
    margin: 0 auto;
    background: #f5f5f5;
}
.news-gallery-item .news-gallery-img { cursor: zoom-in; }
.news-gallery-item--half .news-gallery-img { cursor: zoom-out; }
@media (max-width: 767.98px) {
    .news-gallery-item { flex-basis: 50%; width: 50%; }
    .news-gallery-item.news-gallery-item--half { flex-basis: 100%; width: 100%; }
}
.news-article-cover,
.news-article-content img,
.news-magazine-cover img,
.news-magazine-body img {
    cursor: zoom-in;
    transition: transform .22s ease, box-shadow .22s ease, max-width .22s ease, max-height .22s ease;
    transform-origin: center center;
}
.news-article-cover.news-img-zoomed,
.news-article-content img.news-img-zoomed,
.news-magazine-body img.news-img-zoomed {
    cursor: zoom-out;
    transform: scale(1.55);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    position: relative;
    z-index: 20;
}
.news-rating-block, .news-comments-block {
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
}
.news-rating-block h3, .news-comments-block h3 { margin-bottom: 1rem; }
.news-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
    align-items: center;
}
.news-star-label { cursor: pointer; margin: 0; color: #c5cdd8; }
.news-star-label input { display: none; }
.news-star-label .bi { font-size: 1.5rem; color: inherit; transition: color 0.2s; }
.news-star-label:hover,
.news-star-label:has(input:checked),
.news-star-label:has(~ .news-star-label input:checked) {
    color: #ffc107;
}
.news-star-label .bi.bi-star-fill { color: #ffc107; }
.news-comment {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.news-reactions-summary-top { margin: 0 0 1rem; }
.news-reaction-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.3rem;
    line-height: 1.2;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.25rem 0.6rem;
}
.news-reaction-stat b { font-size: 1rem; color: #0F4685; }
.news-reactions-block .charts-reaction-btn {
    font-size: 1.6rem;
    line-height: 1.2;
    padding: 0.35rem 0.7rem;
    border-radius: 0.5rem;
}
.news-reactions-block .charts-reaction-count {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}
.news-gallery-reactions {
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 0.2rem !important;
    margin-top: 0.35rem !important;
    max-width: 100%;
}
.news-gallery-reactions form {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
}
.news-gallery-reactions .charts-reaction-btn {
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.12rem 0.28rem;
    border-radius: 0.35rem;
    min-width: 0;
    white-space: nowrap;
}
.news-gallery-reactions .charts-reaction-count {
    font-size: 0.68rem;
    font-weight: 600;
    margin-left: 0.1rem;
    color: #333;
}
.news-read-hint { max-width: 100%; }
.news-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}
.news-actions-col { flex: 1 1 340px; min-width: 300px; }
.news-actions-row .news-article-share { margin-bottom: 1.25rem; padding-top: 0; border-top: 0; }
.news-actions-row .news-rating-block { border-top: 0; padding: 0; }
body[data-theme="dark"] .news-reaction-stat { background: rgba(15, 70, 133, 0.25); border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .news-reaction-stat b { color: #8eb9e0; }
body[data-theme="dark"] .news-reactions-block .charts-reaction-btn,
body[data-theme="dark"] .news-gallery-reactions .charts-reaction-btn { background: rgba(21, 34, 56, 0.5); border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .news-reactions-block .charts-reaction-count,
body[data-theme="dark"] .news-gallery-reactions .charts-reaction-count { color: #b0b8c4; }
@media (min-width: 992px) {
    .news-reactions-block .charts-reaction-btn {
        font-size: 2.4rem;
        line-height: 1.2;
        padding: 0.5rem 1.1rem;
        border-radius: 0.6rem;
    }
    .news-reactions-block .charts-reaction-count {
        font-size: 1.3rem;
        font-weight: 600;
    }
    .news-gallery-reactions .charts-reaction-btn {
        font-size: 1.05rem;
        padding: 0.15rem 0.32rem;
    }
    .news-gallery-reactions .charts-reaction-count {
        font-size: 0.72rem;
    }
    .news-reaction-stat { font-size: 1.9rem; }
    .news-reaction-stat b { font-size: 1.2rem; }
}
body[data-theme="dark"] .news-card { background: rgba(21, 34, 56, 0.5); border: 1px solid rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .news-card-title,
body[data-theme="dark"] .news-card-title a { color: #8eb9e0; }
body[data-theme="dark"] .news-card-excerpt { color: #b0b8c4; }
body[data-theme="dark"] .news-comment { background: rgba(15, 70, 133, 0.2); }

/* Личный кабинет: ширина контента админки */
body.page-profile main.main > .container {
    width: 85%;
    max-width: 85vw;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
@media (max-width: 767.98px) {
    body.page-profile main.main > .container {
        width: 94%;
        max-width: 100%;
    }
}

/* Личный кабинет: вкладки и карточки */
.profile-page {
    color: var(--color-text);
    max-width: 100%;
}
.profile-page .nav-tabs {
    border-bottom: 2px solid var(--color-primary);
    background: #f8f9fa;
}
.profile-page .nav-tabs .nav-item {
    margin-bottom: -2px;
}
.profile-page .nav-tabs .nav-link {
    color: var(--color-primary);
    background: transparent;
    border: 1px solid #dee2e6;
    border-bottom: none;
    margin-right: 2px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}
.profile-page .nav-tabs .nav-link:hover {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.profile-page .nav-tabs .nav-link.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.profile-page .card-header { background: #f0f7ff; font-weight: 600; color: #333; }
.profile-page .card { border: 1px solid #dee2e6; }
.profile-page .table { color: var(--color-text); }
.profile-page .form-control, .profile-page .form-select { background: #fff; color: #333; }
body[data-theme="dark"] .profile-page .nav-tabs .nav-link { color: #8eb9e0; border-color: #2a4365; }
body[data-theme="dark"] .profile-page .nav-tabs .nav-link:hover,
body[data-theme="dark"] .profile-page .nav-tabs .nav-link.active { color: #fff; background: var(--color-primary); }
body[data-theme="dark"] .profile-page .card-header { background: rgba(15, 70, 133, 0.3); color: #e0e6ed; }
body[data-theme="dark"] .profile-page .form-control,
body[data-theme="dark"] .profile-page .form-select { background: #1a2d47; color: #e0e6ed; }

/* Админка: страница «О нас» */
.about-admin-tab .about-admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.65rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--color-bg, #fff);
}
.about-admin-tab .about-admin-subnav a {
    font-weight: 600;
    color: var(--color-primary, #0F4685);
    text-decoration: none;
}
.about-admin-tab .about-admin-subnav a:hover { text-decoration: underline; }
.about-admin-activists-accordion .accordion-button {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
}
.about-admin-activists-accordion .accordion-button:not(.collapsed) {
    box-shadow: none;
}
.about-admin-acc-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding-right: 0.5rem;
    text-align: left;
}
.about-admin-acc-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #0F4685;
}
.about-admin-acc-thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fa;
    color: #0F4685;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid #0F4685;
}
.about-admin-acc-meta { flex: 1; min-width: 0; }
.about-admin-acc-meta strong { display: block; line-height: 1.25; }
.about-admin-acc-meta .text-muted { font-size: 0.8rem; }
body[data-theme="dark"] .about-admin-tab .about-admin-subnav {
    background: var(--color-bg, #0f172a);
    border-color: #2a4365;
}
body[data-theme="dark"] .about-admin-acc-thumb--ph {
    background: rgba(15, 70, 133, 0.35);
    color: #8eb9e0;
}

/* Профиль пользователя — стиль как на макете */
.profile-modern { max-width: 1200px; margin: 0 auto; }
.profile-modern-layout { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.profile-modern-left { flex: 0 0 calc(33.333% - 0.75rem); min-width: 280px; }
.profile-modern-right { flex: 1 1 calc(66.666% - 0.75rem); min-width: 300px; }
.profile-modern-wrap { background: #fff; border-radius: 8px; padding: 2rem; border: 1px solid #e2e6ea; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.profile-modern-right { background: #fff; border-radius: 8px; padding: 1.5rem; border: 1px solid #e2e6ea; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow-y: visible; }
.profile-notes-add-block { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e2e6ea; }
.profile-notes-add-textarea { min-height: 120px; resize: vertical; }
.profile-notes-cards { display: flex; flex-direction: column; gap: 0.75rem; max-height: 70vh; overflow-y: auto; }
.profile-notes-card { background: #f8f9fa; border-radius: 8px; border: 1px solid #e2e6ea; overflow: hidden; transition: box-shadow 0.2s; }
.profile-notes-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.profile-notes-card-header { padding: 0.75rem 1rem; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.profile-notes-card-meta { font-size: 0.8rem; color: #666; margin-bottom: 4px; }
.profile-notes-card-meta time { font-weight: 600; color: #0F4685; }
.profile-notes-card-preview { font-size: 0.9rem; color: #333; line-height: 1.4; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.profile-notes-card-expand-btn { color: #0F4685; font-size: 0.85rem; flex-shrink: 0; }
.profile-notes-card-expand-btn:hover { text-decoration: underline; }
.profile-notes-card-body { display: none; padding: 1rem; border-top: 1px solid #e2e6ea; background: #fff; }
.profile-notes-card-body.expanded { display: block; }
.profile-notes-card-body .form-control { min-height: 100px; resize: vertical; }
.profile-notes-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.profile-notes-card-source { font-size: 0.8rem; color: #666; margin-top: 0.5rem; }
.profile-notes-card-source a { color: #0F4685; }
.profile-notes-entry-meta { font-size: 0.75rem; color: #888; margin-bottom: 4px; }
.profile-notes-entry-content { color: #333; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.profile-notes-empty { font-size: 0.9rem; padding: 1rem 0; color: #888; }
.profile-notes-date-block { margin-bottom: 1.25rem; }
.profile-notes-date-block:last-child { margin-bottom: 0; }
.profile-notes-date-title { font-weight: 700; font-size: 0.9rem; color: #0F4685; margin-bottom: 0.5rem; padding-bottom: 4px; border-bottom: 1px solid #e2e6ea; }
.profile-notes-entry { margin-bottom: 1rem; padding: 0.75rem; background: #f8f9fa; border-radius: 6px; border-left: 3px solid #0F4685; font-size: 0.9rem; }
.profile-notes-entry:last-child { margin-bottom: 0; }
@media (max-width: 992px) {
    .profile-modern-left { flex: 1 1 100%; }
    .profile-modern-right { flex: 1 1 100%; }
}
@media (max-width: 768px) {
    .profile-modern-layout { flex-direction: column; }
    .profile-modern-right { flex: 1 1 auto; }
}
.profile-modern-heading { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; font-weight: 700; color: #333; margin: 0 0 0.5rem 0; }
.profile-modern-heading-icon { font-size: 1.5rem; color: #555; }
.profile-modern-separator { border: none; border-top: 1px solid #e2e6ea; margin: 1.5rem 0; }
.profile-modern-user { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.profile-modern-avatar-wrap { flex-shrink: 0; position: relative; }
.profile-modern-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e6ea; }
.profile-modern-avatar-placeholder { width: 72px; height: 72px; border-radius: 50%; background: #e8f2fc; border: 2px solid #0F4685; display: flex; align-items: center; justify-content: center; color: #0F4685; font-size: 2rem; }
.profile-modern-rating-badge {
    position: absolute;
    left: 0;
    bottom: 0;
    min-width: 1.5rem;
    padding: 0 0.35rem;
    height: 1.25rem;
    border-radius: 0.65rem;
    background: #c9a227;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.profile-modern-user-info { min-width: 0; }
.profile-modern-name { font-size: 1.25rem; font-weight: 700; color: #333; margin-bottom: 2px; }
.profile-modern-login { font-size: 0.95rem; color: #666; margin-bottom: 2px; }
.profile-modern-role { font-size: 0.9rem; color: #888; }
.profile-modern-form { margin-bottom: 0; }
.profile-modern-field { margin-bottom: 1rem; }
.profile-modern-label { display: block; font-size: 0.95rem; font-weight: 500; color: #333; margin-bottom: 6px; }
.profile-modern-input { border: 1px solid #ced4da; border-radius: 6px; padding: 8px 12px; font-size: 1rem; width: 100%; max-width: 100%; }
.profile-modern-input:focus { border-color: #0F4685; outline: none; box-shadow: 0 0 0 2px rgba(15, 70, 133, 0.2); }
.profile-modern-file-wrap { display: flex; align-items: stretch; gap: 0; border: 1px solid #ced4da; border-radius: 6px; overflow: hidden; max-width: 320px; }
.profile-modern-file-btn { display: inline-block; padding: 8px 16px; background: #175f80; color: #fff; font-weight: 600; font-size: 0.9rem; cursor: pointer; margin: 0; }
.profile-modern-file-btn:hover { background: #1a6bc4; }
.profile-modern-file-input { position: absolute; width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; }
.profile-modern-file-text { flex: 1; padding: 8px 12px; background: #f8f9fa; color: #888; font-size: 0.9rem; border-left: 1px solid #dee2e6; display: flex; align-items: center; }
.profile-modern-hint { font-size: 0.85rem; color: #888; margin-top: 6px; }
.profile-modern-check { margin-top: 0.75rem; }
.profile-modern-btn-save { width: 100%; max-width: 320px; padding: 10px 20px; background: #175f80; color: #fff; border: none; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.profile-modern-btn-save:hover { background: #1a6bc4; color: #fff; }
.profile-modern-section-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; color: #333; margin: 0 0 1rem 0; }
.profile-modern-section-icon { font-size: 1.2rem; color: #555; }
.profile-modern-btn-outline { padding: 8px 18px; background: #fff; color: #4a90e2; border: 1px solid #4a90e2; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.profile-modern-btn-outline:hover { background: #e8f4ff; color: #4a90e2; border-color: #4a90e2; }
body[data-theme="dark"] .profile-modern-wrap { background: #1a2d47; border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-modern-heading, body[data-theme="dark"] .profile-modern-name, body[data-theme="dark"] .profile-modern-label { color: #e0e6ed; }
body[data-theme="dark"] .profile-modern-login, body[data-theme="dark"] .profile-modern-role { color: #b0b8c4; }
body[data-theme="dark"] .profile-modern-separator { border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-modern-input { background: #152238; border-color: rgba(69, 162, 214, 0.4); color: #e0e6ed; }
body[data-theme="dark"] .profile-modern-file-text { background: rgba(21, 34, 56, 0.6); color: #b0b8c4; }
body[data-theme="dark"] .profile-modern-section-title { color: #e0e6ed; }
body[data-theme="dark"] .profile-modern-btn-outline { background: transparent; color: #8eb9e0; border-color: #8eb9e0; }
body[data-theme="dark"] .profile-modern-btn-outline:hover { background: rgba(15, 70, 133, 0.3); color: #8eb9e0; }
body[data-theme="dark"] .profile-modern-right { background: #1a2d47; border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-notes-date-title { color: #8eb9e0; border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-notes-entry { background: rgba(15, 70, 133, 0.2); border-left-color: #8eb9e0; }
body[data-theme="dark"] .profile-notes-entry-meta { color: #b0b8c4; }
body[data-theme="dark"] .profile-notes-entry-content { color: #e0e6ed; }
body[data-theme="dark"] .profile-notes-add-block { border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-notes-card { background: rgba(15, 70, 133, 0.15); border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-notes-card-body { background: #152238; border-color: rgba(69, 162, 214, 0.3); }
body[data-theme="dark"] .profile-notes-card-meta { color: #b0b8c4; }
body[data-theme="dark"] .profile-notes-card-meta time { color: #8eb9e0; }
body[data-theme="dark"] .profile-notes-card-preview { color: #e0e6ed; }
body[data-theme="dark"] .profile-notes-card-expand-btn { color: #8eb9e0; }
body[data-theme="dark"] .profile-notes-card-source { color: #b0b8c4; }
body[data-theme="dark"] .profile-notes-card-source a { color: #8eb9e0; }

/* Таблица пользователей: сортируемые заголовки */
#tab-users {
    scroll-margin-top: 1.25rem;
}
#users-table-block {
    scroll-margin-top: 5.5rem;
}
#tab-users tr[id^="user-row-"] {
    scroll-margin-top: 5.5rem;
}

.users-sort-th { cursor: pointer; white-space: nowrap; }
.users-sort-link {
    color: #0F4685;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
}
.users-sort-link:hover {
    background: rgba(15, 70, 133, 0.1);
    color: #0F4685;
}
.users-sort-active { font-weight: 700; }
body[data-theme="dark"] .users-sort-link { color: #8eb9e0; }
body[data-theme="dark"] .users-sort-link:hover { background: rgba(15, 70, 133, 0.3); color: #8eb9e0; }

/* Таблица пользователей: подсветка строк по типу */
#tab-users .table tbody tr.users-row--admin > td { background-color: #e3f2fd; }
#tab-users .table tbody tr.users-row--curator > td { background-color: #e0f7fa; }
#tab-users .table tbody tr.users-row--student > td { background-color: #e8f5e9; }
#tab-users .table tbody tr.users-row--parent > td { background-color: #fff8e1; }
#tab-users .table tbody tr.users-row--student-parent > td { background-color: #f3e5f5; }
#tab-users .table.table-hover tbody tr.users-row--admin:hover > td { background-color: #d6ebfc; }
#tab-users .table.table-hover tbody tr.users-row--curator:hover > td { background-color: #b2ebf2; }
#tab-users .table.table-hover tbody tr.users-row--student:hover > td { background-color: #dceddd; }
#tab-users .table.table-hover tbody tr.users-row--parent:hover > td { background-color: #ffefc2; }
#tab-users .table.table-hover tbody tr.users-row--student-parent:hover > td { background-color: #eadcf0; }
body[data-theme="dark"] #tab-users .table tbody tr.users-row--admin > td { background-color: rgba(33, 150, 243, 0.14); }
body[data-theme="dark"] #tab-users .table tbody tr.users-row--curator > td { background-color: rgba(0, 151, 167, 0.16); }
body[data-theme="dark"] #tab-users .table tbody tr.users-row--student > td { background-color: rgba(76, 175, 80, 0.14); }
body[data-theme="dark"] #tab-users .table tbody tr.users-row--parent > td { background-color: rgba(255, 193, 7, 0.12); }
body[data-theme="dark"] #tab-users .table tbody tr.users-row--student-parent > td { background-color: rgba(156, 39, 176, 0.12); }
.users-table-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem; }
.users-table-legend__item {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
}
.users-table-legend__item--admin { background: #e3f2fd; color: #1565c0; }
.users-table-legend__item--curator { background: #e0f7fa; color: #00838f; }
.users-table-legend__item--student { background: #e8f5e9; color: #2e7d32; }
.users-table-legend__item--parent { background: #fff8e1; color: #ef6c00; }
#tab-users .table tbody tr.users-row--focus-flash > td {
    box-shadow: inset 0 0 0 2px #42a5f5;
}
#tab-users .users-actions-col,
#tab-users .users-actions-cell {
    white-space: nowrap;
    width: 1%;
}
#tab-users .users-actions-row,
#tab-users .users-actions-head {
    flex-wrap: nowrap !important;
}
#tab-users .users-actions-row .btn,
#tab-users .users-actions-head .btn {
    flex-shrink: 0;
}
#tab-users .users-actions-row form {
    display: inline-flex;
    margin: 0;
}

.comm-admin-block-table th,
.comm-admin-block-table td {
    vertical-align: middle;
}

/* Кабинет 2: боковой сайдбар */
.profile-cabinet-layout,
.profile-cabinet2 { margin-top: 0.5rem; }
.profile-sidebar {
    flex: 0 0 300px;
    width: 300px;
    max-width: 34%;
    min-width: 280px;
    background: #f5f7fa;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e6ea;
}
.profile-sidebar-cat-panel {
    padding-left: 0.75rem;
    margin-left: 0.25rem;
    border-left: 2px solid rgba(15, 68, 139, 0.12);
}
.profile-main {
    padding-left: 1.75rem;
    box-sizing: border-box;
}
.profile-main > .profile-tab-content,
.profile-main .profile-tab-content {
    padding-left: 1.5rem;
    padding-right: 0.25rem;
    box-sizing: border-box;
}
.profile-sidebar-category { margin-bottom: 0.5rem; }
.profile-sidebar-category:last-child { margin-bottom: 0; }
.profile-sidebar-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    margin: 0 0 0.25rem;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.profile-sidebar-cat-toggle:hover,
.profile-sidebar-cat-toggle:focus-visible {
    background: #e9ecef;
    outline: none;
}
.profile-sidebar-cat-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}
.profile-sidebar-cat-icon {
    color: #0F448B;
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}
.profile-sidebar-cat-title {
    color: #0F448B;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
}
.profile-sidebar-cat-chevron {
    font-size: 0.65rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}
.profile-sidebar-category.is-collapsed .profile-sidebar-cat-chevron {
    transform: rotate(-90deg);
}
.profile-sidebar-cat-panel .list-group-item:first-child {
    margin-top: 0;
}
.profile-sidebar .list-group-item {
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.65rem 0.45rem 0.85rem;
    font-size: 0.9rem;
}
.profile-sidebar .list-group-item:hover { background: #e9ecef; }
.profile-sidebar .list-group-item.active { background: var(--color-primary); color: #fff; }
.profile-sidebar .list-group-item .badge { font-size: 0.7rem; }
.profile-tab-stat { font-size: 0.85rem; }

/* Результаты опросов — диаграммы */
.poll-results-page .poll-results-toolbar .card-body { background: #f8fafc; }
.poll-result-card-head { background: #f8fafc; }
.poll-result-chart-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 0.5rem 0;
}
.poll-result-chart-wrap canvas { max-height: 280px; }
.poll-result-bar-row { margin-bottom: 0.5rem; }
.poll-result-bar-row:last-child { margin-bottom: 0; }
.poll-result-progress .progress-bar { background-color: var(--color-primary, #426ee6); }
.poll-result-question-text .poll-question-inline-img { max-height: 120px; object-fit: contain; }
.poll-result-open-answer { background: #fafbfc; }
body[data-theme="dark"] .poll-results-toolbar .card-body,
body[data-theme="dark"] .poll-result-card-head { background: rgba(30, 41, 59, 0.4); }
body[data-theme="dark"] .poll-result-open-answer { background: rgba(15, 23, 42, 0.5); }

/* Итоговая таблица опросов — админка */
.polls-admin-type-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0;
}
.polls-admin-type-legend__title { font-weight: 600; color: #495057; }
.polls-admin-type-legend__item strong {
    display: inline-block;
    min-width: 1.1rem;
    text-align: center;
    color: #0F4685;
}
.polls-admin-type-legend__hint { opacity: 0.85; }
.polls-admin-summary-table th,
.polls-admin-summary-table td {
    vertical-align: middle;
}
.polls-admin-type-cell {
    white-space: nowrap;
    letter-spacing: 0.02em;
}
body[data-theme="dark"] .polls-admin-type-legend__title { color: #cbd5e1; }
body[data-theme="dark"] .polls-admin-type-legend__item strong { color: #8eb9e0; }

/* Категории опросов — компактный блок в админке */
.poll-cat-admin-card .card-header { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); }
.poll-cat-admin-hint { line-height: 1.35; }
.poll-cat-create {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
.poll-cat-create-fields {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}
.poll-cat-create-fields input[name="poll_cat_name"] { flex: 1 1 9rem; min-width: 7rem; max-width: 11rem; }
.poll-cat-create-fields input[name="poll_cat_description"] { flex: 2 1 12rem; min-width: 8rem; }
.poll-cat-create-fields .poll-cat-sort-input { width: 2.75rem; text-align: center; }
.poll-cat-create-btn { flex-shrink: 0; white-space: nowrap; }
.poll-cat-empty { padding: 0.5rem 0.25rem; }
.poll-cat-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.8125rem;
}
.poll-cat-list-head,
.poll-cat-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 5.25rem 5.25rem;
    align-items: center;
    column-gap: 0.5rem;
    padding: 0.4rem 0.65rem;
}
.poll-cat-list-head {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}
.poll-cat-row {
    border-bottom: 1px solid #eef2f6;
    min-height: 2.35rem;
    transition: background 0.15s ease;
}
.poll-cat-row:last-child { border-bottom: none; }
.poll-cat-row:hover { background: #fafbfc; }
.poll-cat-row--hidden { background: #f8fafc; }
.poll-cat-col-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
}
.poll-cat-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    border-radius: 4px;
}
.poll-cat-count {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
}
.poll-cat-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.poll-cat-in-name {
    flex: 0 1 10.5rem;
    min-width: 6rem;
    max-width: 12rem;
}
.poll-cat-in-desc {
    flex: 1 1 6rem;
    min-width: 0;
    color: #64748b;
}
.poll-cat-in-desc:focus,
.poll-cat-in-desc:not(:placeholder-shown) { color: inherit; }
.poll-cat-in-sort {
    width: 2.65rem;
    flex-shrink: 0;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    text-align: center;
}
.poll-cat-save {
    flex-shrink: 0;
    padding: 0.2rem 0.45rem;
    line-height: 1.15;
}
.poll-cat-badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.22em 0.5em;
}
.poll-cat-badge--active { background: #dcfce7; color: #166534; }
.poll-cat-badge--hidden { background: #e2e8f0; color: #64748b; }
.poll-cat-col-status { text-align: center; }
.poll-cat-col-actions { display: flex; justify-content: flex-end; }
.poll-cat-actions .btn { padding: 0.2rem 0.42rem; }
@media (max-width: 767.98px) {
    .poll-cat-list-head { display: none; }
    .poll-cat-row {
        grid-template-columns: 2.5rem 1fr auto;
        grid-template-areas: "id form actions" "id status actions";
        row-gap: 0.3rem;
    }
    .poll-cat-col-id { grid-area: id; }
    .poll-cat-edit { grid-area: form; flex-wrap: wrap; }
    .poll-cat-in-name,
    .poll-cat-in-desc { flex: 1 1 100%; max-width: none; }
    .poll-cat-col-status { grid-area: status; text-align: left; }
    .poll-cat-col-actions { grid-area: actions; align-self: start; }
}
body[data-theme="dark"] .poll-cat-admin-card .card-header {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.6) 100%);
}
body[data-theme="dark"] .poll-cat-create {
    background: rgba(30, 41, 59, 0.35);
    border-color: rgba(100, 116, 139, 0.4);
}
body[data-theme="dark"] .poll-cat-list {
    border-color: rgba(100, 116, 139, 0.35);
}
body[data-theme="dark"] .poll-cat-list-head {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(100, 116, 139, 0.3);
}
body[data-theme="dark"] .poll-cat-row {
    border-color: rgba(100, 116, 139, 0.2);
}
body[data-theme="dark"] .poll-cat-row:hover { background: rgba(30, 41, 59, 0.35); }
body[data-theme="dark"] .poll-cat-row--hidden { background: rgba(15, 23, 42, 0.4); }
body[data-theme="dark"] .poll-cat-id {
    background: rgba(51, 65, 85, 0.8);
    color: #94a3b8;
}
body[data-theme="dark"] .poll-cat-badge--active {
    background: rgba(22, 101, 52, 0.35);
    color: #86efac;
}
body[data-theme="dark"] .poll-cat-badge--hidden {
    background: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}

body[data-theme="dark"] .profile-sidebar {
    background: rgba(21, 34, 56, 0.6);
    border-color: rgba(69, 162, 214, 0.3);
}
body[data-theme="dark"] .profile-sidebar-cat-toggle:hover,
body[data-theme="dark"] .profile-sidebar-cat-toggle:focus-visible {
    background: rgba(15, 70, 133, 0.3);
}
body[data-theme="dark"] .profile-sidebar-cat-title,
body[data-theme="dark"] .profile-sidebar-cat-icon { color: #8eb9e0; }
body[data-theme="dark"] .profile-sidebar-cat-chevron { color: #8eb9e0; }
body[data-theme="dark"] .profile-sidebar .list-group-item:hover { background: rgba(15, 70, 133, 0.3); }
body[data-theme="dark"] .profile-sidebar .list-group-item.active { background: var(--color-primary); }

.slider-image-option { cursor: pointer; }
.slider-image-option:hover { background: #f8f9fa; }
.slider-image-overlay-settings { border-top: 1px solid #dee2e6; padding-top: 0.5rem; }
.slider-image-overlay-settings .form-control-color { min-height: 2rem; }

/* ========== Footer (палитра аналога: #143555 / #053662, заголовки #45a2d6, кнопка #426ee6) ========== */
.site-footer {
    background-color: var(--color-bg-footer);
    color: #fff;
    padding: 30px 0 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: auto;
    box-sizing: border-box;
}

.footer-container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 max(15px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(15px, env(safe-area-inset-right, 0px));
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.site-footer .footer-section,
.site-footer .footer-contact,
.site-footer .footer-text,
.site-footer .footer-copyright {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    min-width: 0;
    width: 100%;
}

.footer-section {
    flex: 1 1 200px;
    min-width: min(100%, 200px);
    max-width: min(300px, 100%);
    box-sizing: border-box;
}

.social-section {
    max-width: 100%;
    flex: 1 1 280px;
}

.footer-partners {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-partners-title {
    color: #45a2d6;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

.footer-partners-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
}

.footer-partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.95);
    flex: 0 0 auto;
    min-width: 0;
    max-width: 72px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-partner-item:hover {
    color: #45a2d6;
    transform: translateY(-2px);
}

.footer-partner-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    box-sizing: border-box;
}

.footer-partner-name {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    line-height: 1.25;
    max-width: 100%;
}

.footer-heading {
    color: #45a2d6;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.footer-text {
    font-size: 0.9em;
    color: rgba(255,255,255,0.95);
    margin-bottom: 15px;
    line-height: 1.4;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-social-icon {
    color: #fff;
    font-size: 48px;
    transition: color 0.3s, transform 0.3s;
}

.footer-social-icon:hover {
    transform: scale(1.2);
}

.footer-social-icon.youtube:hover { color: #ff0000; }
.footer-social-icon.vk:hover { color: #4a76a8; }
.footer-social-icon.tiktok:hover { color: #000; }
.footer-social-icon.email:hover { color: #c3f183; }
.footer-social-icon.max {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 28px;
    text-decoration: none;
    color: #fff;
    padding: 0;
}
.footer-social-icon-img--max {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    position: relative;
    top: 4px;
}
.footer-social-icon.max:hover {
    transform: scale(1.2);
    opacity: 0.9;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-input,
.footer-textarea {
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    background-color: #e0e0e0;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.footer-textarea {
    resize: vertical;
    min-height: 100px;
}

.footer-input::placeholder,
.footer-textarea::placeholder {
    color: #666;
}

.footer-submit {
    background-color: #426ee6;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
}

.footer-submit:hover {
    background-color: #3663F5;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.author-photo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.author-photo {
    width: 100px;
    height: 100px;
    border: 1px solid #fff;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.author-name {
    font-weight: bold;
    font-size: 1em;
    color: #fff;
}

.author-position {
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,0.95);
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.95);
}

.footer-contact i {
    color: #45a2d6;
    width: 20px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-link {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #1A4B8C;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copyright {
    font-size: 0.9em;
    color: rgba(255,255,255,0.9);
    margin: 0;
}

.scroll-top {
    width: 48px;
    height: 48px;
    background: #fff;
    color: #0F4685;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    right: max(24px, env(safe-area-inset-right, 0px));
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.scroll-top--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
}

.scroll-top:not(.scroll-top--hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #e8f2fc;
}

/* ========== Responsive: хедер и футер полностью адаптивны ========== */
@media (max-width: 1200px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-part {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
        margin-bottom: 5px;
    }

    .site-name {
        font-size: 42px;
    }

    .footer-content {
        gap: 24px;
    }

    .footer-section {
        flex: 1 1 calc(50% - 24px);
        min-width: 180px;
        max-width: none;
    }
}

/* Не блокируем прокрутку document при открытом меню: overflow на html ломает скролл страницы на iOS/Android после закрытия. Классы mobile-nav-open оставлены для возможных оверлеев. */

/* До xl (1200px) — бургер и колонка меню, как на макете мобильной шапки */
@media (max-width: 1199.98px) {
    /* Длинное название сайта + nowrap ломали вёрстку на узких экранах */
    .header-brand .site-name {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }
    .header-part {
        min-width: 0;
    }

    .site-nav-bar {
        position: sticky;
        top: 0;
        z-index: 2000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    }

    /* Мобильная шапка: без поиска и блока контактов */
    .banner-search-wrap,
    .header-part-contacts {
        display: none !important;
    }

    .site-banner {
        padding-top: max(6px, env(safe-area-inset-top, 0px));
        padding-bottom: 6px;
    }

    .site-banner-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .site-banner .layout-contained {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
    }

    .site-banner-text {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
        font-size: 0.72rem;
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .banner-right {
        flex: 0 0 auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .login-btn--mobile-hide {
        display: none;
    }

    .header-user-name {
        display: none;
    }

    .header-user-info {
        gap: 0;
    }

    .login-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .theme-btn,
    .header-messages-link,
    .header-event-executor-link,
    .header-duty-flag-badge {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .site-header {
        padding: 6px 10px;
    }

    .header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .header-brand {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .header-brand .site-info {
        align-items: flex-start;
        text-align: left;
    }

    .header-part {
        flex: 0 0 auto;
        min-width: 0;
        margin-bottom: 0;
        padding: 0;
    }

    .header-part-social {
        justify-content: flex-end;
    }

    .site-logo {
        width: 72px;
        height: 48px;
    }

    .site-name {
        font-size: clamp(1.15rem, 4.8vw, 1.65rem);
    }

    .header-brand .site-name {
        line-height: 1.1;
    }

    .social-icons-header {
        flex-direction: row;
        max-width: none;
        gap: 6px;
    }

    .nav-list {
        display: none;
        width: 100%;
    }

    .nav-list.active {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        column-gap: 1px;
        row-gap: 1px;
        background: rgba(0, 0, 0, 0.18);
        max-height: min(90vh, calc(100dvh - 48px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    /* Плоский список ссылок в две колонки (подменю «Главная» и др. — отдельные ячейки) */
    .nav-menu .nav-item {
        display: contents;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* «Мостик» для hover на десктопе перекрывает подменю и блокирует клики на мобильных */
    .nav-menu .nav-item::after {
        display: none;
    }

    /* Подменю в сетке — отдельные ячейки, без вложенного блока */
    .nav-menu .nav-submenu {
        display: contents !important;
        position: static;
        min-width: 0;
        background: transparent;
        border: none;
    }

    .nav-menu .nav-submenu > li {
        display: contents;
    }

    .nav-menu .nav-item:hover .nav-submenu:not(.active) {
        display: contents !important;
    }

    .nav-menu .nav-submenu.active {
        display: contents !important;
    }

    .nav-menu .nav-link,
    .nav-menu .dropdown-link {
        background-color: #0F4685;
        font-size: 0.82rem;
        padding: 10px 8px;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.2;
        box-sizing: border-box;
    }

    .nav-menu .nav-link i,
    .nav-menu .dropdown-link i {
        margin-right: 6px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .dropdown-link {
        padding: 10px 8px;
        background-color: rgba(26, 107, 196, 0.55);
    }

    .dropdown-link:hover {
        padding-left: 8px;
        background-color: #1a6bc4;
    }

    .nav-menu .nav-link:hover {
        background-color: #1a6bc4;
    }

    .footer-content {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-section {
        flex: 1 1 auto;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .footer-form {
        max-width: 100%;
    }

    .scroll-top {
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        right: max(16px, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 768px) {
    .site-banner {
        font-size: 12px;
    }

    .site-banner-text {
        font-size: 0.68rem;
    }

    .header-brand .logo-link {
        justify-content: flex-start;
    }

    .site-logo {
        width: 60px;
        height: 40px;
    }

    .social-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
    }

    .footer-section {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .author-photo-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-banner {
        font-size: 11px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .site-banner-text {
        display: none;
    }

    .banner-right {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .login-btn {
        padding: 4px 8px;
        font-size: 10px;
    }

    .header-brand .site-name {
        font-size: clamp(1rem, 5.5vw, 1.35rem);
    }

    .site-logo {
        width: 52px;
        height: 35px;
    }

    .logo-fallback {
        font-size: 1rem;
    }

    .nav-menu .nav-link,
    .nav-menu .dropdown-link {
        font-size: 0.78rem;
        padding: 9px 6px;
        min-height: 42px;
    }

    .footer-heading {
        font-size: 16px;
    }

    .footer-container {
        padding: 0 12px;
    }

    .scroll-top {
        width: 44px;
        height: 44px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
    }
}

/* ========== Страница «О нас» ========== */
.about-page {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

.about-page-tabs .nav-link {
    color: var(--color-primary);
    border: 1px solid rgba(15, 70, 133, 0.35);
    border-radius: 8px !important;
    background: var(--color-content-bg);
    font-weight: 600;
}
.about-page-tabs .nav-link:hover {
    background: rgba(15, 70, 133, 0.08);
}
.about-page-tabs .nav-link.active {
    background: var(--color-primary);
    color: #fff !important;
    border-color: var(--color-primary);
}
.about-tab-panels {
    padding-top: 0.5rem;
}
.about-tab-panel-inner {
    padding: 0.25rem 0 1.5rem;
}
.about-activists-heading {
    color: var(--color-primary);
    font-weight: 700;
}
.about-activists-grid {
    position: relative;
}
@media (min-width: 992px) {
    .about-activists-grid .col:nth-child(n + 4) {
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
    }
}
@media (min-width: 576px) and (max-width: 991px) {
    .about-activists-grid .col:nth-child(n + 3) {
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
    }
}
@media (max-width: 575px) {
    .about-activists-grid .col:nth-child(n + 2) {
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
    }
}
.about-activist-name {
    font-size: 1.15rem;
    color: var(--color-text);
}
.about-activist-photo-wrap {
    position: relative;
    display: inline-block;
}
.about-activist-rating-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    min-width: 1.75rem;
    padding: 0 0.4rem;
    height: 1.4rem;
    border-radius: 0.7rem;
    background: #c9a227;
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    z-index: 1;
}
.about-activist-photo {
    object-fit: cover;
    border: 3px solid var(--color-primary);
}
.about-activist-card--starosta {
    position: relative;
    padding: 0.75rem 0.5rem 0.5rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(15, 70, 133, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
    box-shadow: 0 0.35rem 1rem rgba(15, 70, 133, 0.1);
}
.about-activist-card--starosta .about-activist-photo,
.about-activist-card--starosta .about-activist-photo--placeholder {
    border-color: #e09000;
    box-shadow: 0 0 0 3px rgba(224, 144, 0, 0.18);
}
.about-activist-card--starosta .about-activist-role {
    color: #0f4685 !important;
    font-weight: 700;
}
.about-activist-photo--placeholder {
    background: linear-gradient(145deg, #e3ecf7, #f5f7fb);
    border: 3px solid var(--color-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}
.about-activity-stars {
    position: relative;
    display: inline-block;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: 0.12em;
}
.about-activity-stars__bg {
    color: #dee2e6;
    display: block;
}
.about-activity-stars__fill {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
    width: calc((var(--about-rating, 0) / 5) * 100%);
    color: #ffc107;
    pointer-events: none;
}
body[data-theme="dark"] .about-activity-stars__bg {
    color: #3d4a5c;
}
body[data-theme="dark"] .about-page-tabs .nav-link {
    border-color: rgba(142, 185, 224, 0.45);
    color: #8eb9e0;
    background: rgba(21, 34, 56, 0.6);
}
body[data-theme="dark"] .about-page-tabs .nav-link.active {
    background: var(--color-primary);
    color: #fff !important;
}
body[data-theme="dark"] .about-activist-photo--placeholder {
    background: linear-gradient(145deg, #1a2332, #252f40);
}

.about-rating-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
}

.about-rating-avatar--ph {
    width: 40px;
    height: 40px;
    background: #e8f2fc;
    color: #0F4685;
    font-size: 0.75rem;
    font-weight: 700;
}

.about-rating-table-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.about-avatar-wrap { display: inline-block; }
.about-profile .about-avatar {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}

.about-avatar-placeholder {
    width: 140px;
    height: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-primary);
    background: #e9ecef;
    border: 3px solid var(--color-primary);
}

.about-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.about-title,
.about-institution {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.about-divider {
    border: 0;
    border-top: 2px solid var(--color-primary);
    margin: 1.5rem 0;
}

.about-section-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    background: #e9ecef;
    padding: 10px 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-section-icon {
    color: var(--color-primary);
}

.about-curator-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.about-curator-gallery__item {
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 0;
}

.about-curator-gallery__item:hover {
    border-color: var(--color-primary, #0f4685);
}

.about-curator-gallery__item.is-enlarged {
    border-color: var(--color-primary, #0f4685);
    box-shadow: 0 4px 16px rgba(15, 70, 133, 0.25);
    z-index: 2;
    position: relative;
}

.about-curator-gallery__thumb {
    width: var(--curator-thumb, 72px);
    height: var(--curator-thumb, 72px);
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: width 0.2s ease, height 0.2s ease;
}

.about-curator-gallery__item.is-enlarged .about-curator-gallery__thumb {
    width: calc(var(--curator-thumb, 72px) * var(--curator-enlarge, 2.5));
    height: calc(var(--curator-thumb, 72px) * var(--curator-enlarge, 2.5));
}

.about-curator-section .about-section-header i {
    font-size: 1.25rem;
    color: var(--color-primary, #0f4685);
    margin-right: 0.35rem;
}

.about-championship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.about-champ-block {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem 1rem 1rem 1.25rem;
    border-left: 4px solid var(--color-primary);
}

.about-champ-block h3 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.about-champ-block p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.about-skills-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .about-skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
    .about-skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 100%; }
}

.about-skill-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 0.75rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}

.about-skill-card:hover {
    box-shadow: 0 4px 12px rgba(15, 70, 133, 0.15);
}

.about-skill-card i {
    font-size: 1.8rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.about-skill-card span {
    font-size: 0.85rem;
    display: block;
}

.about-section-block {
    background: var(--color-content-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--color-content-shadow);
    overflow: hidden;
}

.about-section-block .about-section-header { margin-bottom: 0; }

.about-championship .about-championship-grid,
.about-skills .about-skills-grid {
    padding: 1.5rem;
}

.about-specialty .about-specialty-body {
    padding: 1.5rem;
    max-width: 48rem;
    margin: 0 auto;
    text-align: left;
}
.about-specialty-body p {
    margin-bottom: 1rem;
    line-height: 1.65;
    color: var(--color-text);
}
.about-specialty-list {
    margin-bottom: 0;
    padding-left: 1.35rem;
    line-height: 1.6;
    color: var(--color-text);
}
.about-specialty-list li {
    margin-bottom: 0.35rem;
}
.about-specialty-list li:last-child {
    margin-bottom: 0;
}

/* Статья о специальности 09.02.07 — вкладка «Наша группа» (на всю ширину контента + иконки) */
.about-specialty-article {
    width: 100%;
    max-width: 100%;
}
.about-specialty-article .about-specialty-article__hero {
    padding: 1.75rem 1.25rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.14) 0%, rgba(15, 70, 133, 0.05) 45%, transparent 100%);
    border-bottom: 1px solid rgba(15, 70, 133, 0.14);
}
.about-specialty-article__hero-icon {
    font-size: clamp(2.25rem, 6vw, 3rem);
    line-height: 1;
    color: var(--color-primary, #0F4685);
    margin-bottom: 0.75rem;
    opacity: 0.92;
}
.about-specialty-article__kicker {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary, #0F4685);
    line-height: 1.4;
}
.about-specialty-article__code {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary, #0F4685);
    border-radius: 6px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}
.about-specialty-article__title {
    margin: 0;
    font-size: clamp(1.35rem, 4.2vw, 1.9rem);
    font-weight: 800;
    line-height: 1.22;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.about-specialty-article__body {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1.5rem clamp(0.5rem, 2vw, 1.25rem) 1.75rem;
    text-align: left;
}
.about-specialty-article__lead-wrap {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.about-specialty-article__p-icon {
    flex-shrink: 0;
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.35rem;
    color: var(--color-primary, #0F4685);
    background: rgba(15, 70, 133, 0.1);
    margin-top: 0.1rem;
}
.about-specialty-article__lead-wrap .about-specialty-article__lead {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.75;
}
.about-specialty-article__body p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--color-text);
}
.about-specialty-article__inline-i {
    display: inline-block;
    margin-right: 0.45rem;
    color: var(--color-primary, #0F4685);
    font-size: 1.05rem;
    vertical-align: -0.12em;
    opacity: 0.95;
}
.about-specialty-article__h {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.45rem;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--color-primary, #0F4685);
    border-bottom: 2px solid rgba(15, 70, 133, 0.22);
    line-height: 1.35;
}
.about-specialty-article__h .about-specialty-article__h-i {
    flex-shrink: 0;
    font-size: 1.35rem;
    opacity: 0.95;
    line-height: 1;
}
.about-specialty-article__h span {
    flex: 1;
    min-width: 0;
}
.about-specialty-article__body > .about-specialty-article__h:first-of-type {
    margin-top: 0.25rem;
}
.about-specialty-article__h--conclusion {
    margin-top: 2.35rem;
    border-bottom-color: rgba(15, 70, 133, 0.32);
}
.about-specialty-article__list {
    margin: 0 0 1.1rem;
    padding-left: 0;
    list-style: none;
    color: var(--color-text);
}
.about-specialty-article__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    line-height: 1.65;
}
.about-specialty-article__list li:last-child {
    margin-bottom: 0;
}
.about-specialty-article__li-i {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--color-primary, #0F4685);
    background: rgba(15, 70, 133, 0.09);
    margin-top: 0.08rem;
}
.about-specialty-article__list li > span:last-child {
    flex: 1;
    min-width: 0;
}
.about-specialty-article__outro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 1.1rem 1.15rem;
    line-height: 1.75;
    background: rgba(15, 70, 133, 0.07);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary, #0F4685);
}
.about-specialty-article__outro-ic {
    flex-shrink: 0;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--color-primary, #0F4685);
    margin-top: 0.1rem;
}
.about-specialty-article__outro-txt {
    flex: 1;
    min-width: 0;
}
body[data-theme="dark"] .about-specialty-article .about-specialty-article__hero {
    background: linear-gradient(135deg, rgba(69, 162, 214, 0.16) 0%, rgba(15, 70, 133, 0.1) 100%);
    border-bottom-color: rgba(142, 185, 224, 0.22);
}
body[data-theme="dark"] .about-specialty-article__p-icon,
body[data-theme="dark"] .about-specialty-article__li-i {
    background: rgba(69, 162, 214, 0.12);
}
body[data-theme="dark"] .about-specialty-article__outro {
    background: rgba(15, 70, 133, 0.22);
}

.about-contacts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .about-contacts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .about-contacts-grid { grid-template-columns: 1fr; }
}

.about-contact-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.about-contact-card:hover {
    background: #f8f9fa;
    color: var(--color-primary);
}

.about-contact-card i {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.about-map-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-map-link {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 8px 16px;
    margin-top: 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.about-map-link:hover {
    background: #c82333;
    color: #fff;
}

body[data-theme="dark"] .about-champ-block,
body[data-theme="dark"] .about-skill-card,
body[data-theme="dark"] .about-contact-card {
    background: rgba(255,255,255,0.05);
}

body[data-theme="dark"] .about-section-block {
    background: var(--color-content-bg);
}

/* ========== Страница «Требования» ========== */
.requirements-page {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

.requirements-main-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.requirements-intro {
    color: #555;
    margin-bottom: 1.5rem;
}

.requirements-submenu {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    background: var(--color-primary);
    padding: 12px 16px;
    margin-bottom: 2rem;
}

.requirements-submenu-item {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 14px;
}

.requirements-submenu-item:hover {
    color: rgba(255,255,255,0.9);
}

.requirements-submenu .btn.requirements-submenu-item {
    flex: 1;
    min-width: 0;
    color: #0F4685;
    background: #fff;
    border-color: rgba(255,255,255,0.5);
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}
.requirements-submenu .btn.requirements-submenu-item:hover {
    background: rgba(255,255,255,0.95);
    border-color: #fff;
    color: #0F4685;
}

@media (max-width: 480px) {
    .requirements-submenu {
        flex-wrap: wrap;
    }
    .requirements-submenu .btn.requirements-submenu-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 100px;
    }
}

.requirements-block {
    margin-bottom: 2.5rem;
}

.requirements-block-title {
    font-size: 1.1rem;
    font-weight: bold;
    background: #0F4685;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding: 12px 15px;
    border-radius: 8px;
}
.requirements-block-title .req-icon,
.requirements-block-title .req-icon-warn {
    font-size: 1.35rem;
    flex-shrink: 0;
}
.requirements-block-title .req-icon-warn {
    color: #ffc107;
}

.req-icon-warn {
    color: #dc3545;
}

/* req-scroll-top стили объединены с block-back-top выше */

.requirements-block-desc {
    margin-bottom: 1rem;
}

/* Блок НИР — две колонки на всю ширину */
.requirements-nir-block .nir-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
}

@media (max-width: 992px) {
    .requirements-nir-block .nir-two-cols { grid-template-columns: 1fr; }
}

.nir-col {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
}

body[data-theme="dark"] .nir-col {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.nir-col-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #0F4685;
    margin: 0 0 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0F4685;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nir-col-title i { font-size: 1.25rem; }

.nir-col-intro {
    margin: 0 0 1.25rem;
    line-height: 1.6;
    color: #555;
}

body[data-theme="dark"] .nir-col-intro { color: #b0b8c4; }

.nir-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.nir-item:last-child { margin-bottom: 0; }

.nir-item-icon {
    font-size: 1.5rem;
    color: #0F4685;
    flex-shrink: 0;
}

.nir-item-body { min-width: 0; }

.nir-item-title {
    font-weight: 600;
    color: #0F4685;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.35rem;
}

.nir-item-title:hover { color: #1a6bc4; text-decoration: underline; }

.nir-item-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #555;
}

body[data-theme="dark"] .nir-item-desc { color: #b0b8c4; }
body[data-theme="dark"] .nir-item-title { color: #8eb9e0; }
body[data-theme="dark"] .nir-item-title:hover { color: #b8d4f0; }

/* Страница «В разработке» */
.in-development-page {
    padding: 3rem 1rem;
    text-align: center;
}

.in-dev-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--color-content-bg);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid rgba(15, 70, 133, 0.15);
}

.in-dev-icon {
    font-size: 4rem;
    color: #0F4685;
    margin-bottom: 1rem;
}

.in-dev-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.75rem;
}

.in-dev-subtitle {
    font-size: 1.05rem;
    color: #555;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.in-dev-message {
    background: rgba(15, 70, 133, 0.08);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.in-dev-message p { margin: 0; line-height: 1.6; color: #444; }

.in-dev-btn {
    background-color: #0F4685 !important;
    border-color: #0F4685 !important;
}

.in-dev-btn:hover {
    background-color: #1a6bc4 !important;
    border-color: #1a6bc4 !important;
}

.requirements-two-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.requirements-col {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1.25rem;
}

.requirements-col-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.requirements-col-title .req-icon {
    margin-right: 6px;
}

.requirements-col-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.requirements-col-list li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.req-icon-sm {
    color: var(--color-accent);
    margin-right: 8px;
}

.requirements-inner-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 1rem;
}

.requirements-inner-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 16px;
    text-decoration: none;
}

.requirements-inner-item:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.requirements-inner-content {
    margin-bottom: 1rem;
    padding: 1rem 0;
}

.requirements-inner-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

body[data-theme="dark"] .requirements-block-title {
    background: rgba(15, 70, 133, 0.8);
}
body[data-theme="dark"] .requirements-col {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

/* Карточки требований */
.requirements-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.requirement-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.requirement-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--color-accent);
}

.requirement-card-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.requirement-card-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    min-height: 2.7em;
}

.requirement-card-desc {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.requirement-card-btn {
    align-self: flex-start;
    margin-top: auto;
}

body[data-theme="dark"] .requirement-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

body[data-theme="dark"] .requirement-card:hover {
    border-color: var(--color-accent);
}

body[data-theme="dark"] .requirement-card-desc {
    color: rgba(255,255,255,0.7);
}

/* Переопределение ячеек с белым фоном (inline style) в тёмной теме */
body[data-theme="dark"] .table td[style*="background"] {
    background: rgba(21, 34, 56, 0.5) !important;
    color: #e0e6ed !important;
}

/* Блок 4: Запрещённые приёмы — статические карточки, 6 в ряд */
.req-forbidden-blocks {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.req-forbidden-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.req-forbidden-block:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.req-forbidden-block-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F4685;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.3;
    min-height: 2.6em;
}
.req-forbidden-block-title i {
    flex-shrink: 0;
}
.req-forbidden-block-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.req-forbidden-icon {
    font-size: 1.2rem;
    color: #dc3545;
    flex-shrink: 0;
}

.req-forbidden-block-intro {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #555;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.req-forbidden-block-collapsed .req-forbidden-block-intro {
    padding-bottom: 0.25rem;
}

.req-forbidden-block-btn {
    align-self: flex-start;
    margin-top: auto;
}

.req-forbidden-block-list {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
}

.req-forbidden-block-list li {
    margin-bottom: 0.5rem;
}

.req-forbidden-block-list li:last-child {
    margin-bottom: 0;
}

.req-forbidden-block-list strong {
    color: #0F4685;
}

body[data-theme="dark"] .req-forbidden-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    border-left-color: #dc3545;
}

body[data-theme="dark"] .req-forbidden-block-intro {
    color: #b0b8c4;
}

body[data-theme="dark"] .req-forbidden-block-list {
    color: rgba(255,255,255,0.85);
}

body[data-theme="dark"] .req-forbidden-block-title {
    color: #8eb9e0;
}

body[data-theme="dark"] .req-forbidden-block-list strong {
    color: #8eb9e0;
}

@media (max-width: 1200px) {
    .req-forbidden-blocks { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .req-forbidden-blocks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .req-forbidden-blocks { grid-template-columns: 1fr; }
}

/* Страница детального просмотра блока запрещённых приёмов */
.req-forbidden-detail-intro {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #dee2e6;
}

body[data-theme="dark"] .req-forbidden-detail-intro {
    border-bottom-color: rgba(255,255,255,0.15);
}

.req-forbidden-detail-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

body[data-theme="dark"] .req-forbidden-detail-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    border-left-color: #dc3545;
}

.req-forbidden-detail-list-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    margin: 0 0 1rem;
}

body[data-theme="dark"] .req-forbidden-detail-list-title {
    color: #8eb9e0;
}

.req-forbidden-detail-list {
    margin: 0;
    padding-left: 1.5rem;
}

.requirement-item-title .req-forbidden-icon {
    margin-right: 0.35rem;
    color: #dc3545;
}

/* Типографика: стили блока типографики */
#block3 .req-typography-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 100%;
    width: 100%;
}
.req-typography-card {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 7px;
    border: 3px solid #134a82;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.req-typography-card .blockname {
    color: #003b76;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 2.6em;
}
.req-typography-card .blockname i { color: #134a82; }
body[data-theme="dark"] .req-typography-card {
    background-color: rgba(21, 34, 56, 0.6) !important;
    border-color: rgba(69, 162, 214, 0.5);
}
body[data-theme="dark"] .req-typography-card .blockname,
body[data-theme="dark"] .req-typography-card .blockname i,
body[data-theme="dark"] .req-typography-card-content,
body[data-theme="dark"] .req-typography-card .column,
body[data-theme="dark"] .req-typography-card .column li {
    color: #e0e6ed !important;
}
body[data-theme="dark"] .req-typography-card .myprimer1 {
    background-color: rgba(15, 70, 133, 0.25) !important;
    color: #e0e6ed;
}
body[data-theme="dark"] .req-typography-card .formatl,
body[data-theme="dark"] .req-typography-card .oprede2 { color: #8eb9e0 !important; }
.req-typography-card-content {
    overflow: hidden;
    line-height: 1.5;
    max-height: 9em;
    display: block;
}
#block3 .req-typography-card .req-typography-card-content {
    max-height: 9em !important;
    overflow: hidden !important;
    min-height: 0;
}
/* Меню переходов внутри блоков типографики (Оформление цитат, сносок и т.д.) */
.req-typography-inner-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}
.req-typography-inner-menu-item {
    white-space: nowrap;
}
.req-typography-card .three-columns-wrapper {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}
.req-typography-card .column { flex: 1; min-width: 180px; }
.req-typography-card .column ul { padding-left: 20px; margin: 0; line-height: 1.3; }
.req-typography-card .column li { margin-bottom: 8px; }
/* Пример: светлозелёный блок — слева текст, справа пример */
.example-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    align-items: flex-start;
    background-color: rgba(171,249,201,0.36);
    padding: 15px;
    border-radius: 7px;
}
.example-container .example-text {
    flex: 1 1 50%;
    min-width: 200px;
    order: 1;
}
.example-container .example-image {
    flex: 1 1 var(--req-example-figure-width);
    min-width: var(--req-example-figure-min-width);
    max-width: 100%;
    order: 2;
}
.example-container .example-image img { max-width: 100%; height: auto; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.example-container .formatl { font-weight: 600; color: #0f4685; margin-bottom: 8px; }
.example-container .oprede2 { font-weight: 600; color: #0f4685; }
.example-container .myprimer1 { font-family: 'Times New Roman', serif; font-size: 0.95em; background-color: #f8f8f8; padding: 10px; text-align: justify; line-height: 1.4; border-radius: 4px; }
/* Пример оформленного списка библиографии (стр. 182): Times New Roman 14pt, текст по ширине, заголовки по левому краю */
.req182-biblio-example {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14pt;
    line-height: 1.5;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #28a745;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    border-radius: 4px;
}
.req182-biblio-example .req182-biblio-title { font-weight: 700; text-align: left; margin-bottom: 0.5rem; color: #0F4685; }
.req182-biblio-example .req182-biblio-heading { font-weight: 700; text-align: left; margin: 1rem 0 0.5rem 0; }
.req182-biblio-example .req182-biblio-text { text-align: justify; margin: 0.25rem 0; text-indent: 1.25cm; }
.req182-biblio-example .req182-biblio-text:first-of-type { text-indent: 0; }
.req182-biblio-example .req182-biblio-footer { text-align: center; font-size: 0.9em; color: #555; margin-top: 1rem; padding: 0.5rem; background: #e8f4f8; border-radius: 4px; }
.req182-biblio-example a { color: #0d6efd; text-decoration: underline; }
.example-download-wrap {
    flex: 0 0 100%;
    width: 100%;
    order: 3;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.example-download-btn { display: inline-flex; align-items: center; gap: 6px; }
.req-typography-card .example-container {
    padding: 15px;
    border-radius: 7px;
}
.req-typography-card .example-text { flex: 1 1 50%; min-width: 200px; order: 1; }
.req-typography-card .example-image { flex: 1 1 var(--req-example-figure-width); min-width: var(--req-example-figure-min-width); order: 2; }
.req-typography-card .example-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.req-typography-card .formatl { font-weight: 600; color: #0f4685; margin-bottom: 8px; }
.req-typography-card .oprede2 { font-weight: 600; color: #0f4685; }
.req-typography-card .myaksent { font-weight: 600; }
.req-typography-card .myprimer1 {
    font-family: 'Times New Roman', serif;
    font-size: 0.95em;
    background-color: #f8f8f8;
    padding: 10px;
    text-align: justify;
    line-height: 1.4;
    border-radius: 4px;
}
.req-typography-card .req-typography-more { margin-top: 12px; }
/* Блок «Запрещено»/«Неправильно»/«Ошибка» — светлорозовый */
.example-bad-container {
    margin: 15px 0;
    padding: 15px;
    border-radius: 7px;
    background-color: rgba(255, 200, 200, 0.6);
    border: 1px solid rgba(200, 80, 80, 0.4);
}
.example-bad-container .formatl { font-weight: 600; color: #c0392b; margin-bottom: 8px; }
.example-bad-container .oprede2 { font-weight: 600; color: #c0392b; }
.example-bad-container .myprimer1 { font-family: 'Times New Roman', serif; font-size: 0.95em; background-color: #fff5f5; padding: 10px; border-radius: 4px; }

.req-annotation-img-wrap {
    display: block;
    line-height: 0;
}
.req-annotation-example-img {
    max-width: 100%;
    height: auto;
    max-height: 690px;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
}
.req-annotation-img-wrap .req-annotation-example-img {
    max-height: 690px;
}
.example-image .req-annotation-img-wrap {
    overflow: visible;
}
.req-annotation-img-zoomable .req-annotation-example-img:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
/* Компактные таблицы в примерах */
.compact-table { font-size: 0.85em; width: 100%; border-collapse: collapse; margin: 10px 0; }
.compact-table th, .compact-table td { padding: 6px 8px; border: 1px solid #ddd; vertical-align: top; }
.compact-table th { background-color: #0f4685; color: white; font-weight: 600; text-align: center; }
.compact-table tr:nth-child(even) { background-color: #f8f9fa; }
.compact-table .yes { background-color: #d4edda; color: #155724; font-weight: bold; text-align: center; }
/* Сноски в примерах */
.footnote-example { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #ccc; font-size: 0.9em; color: #073d93; }

/* Рисунки-примеры, оформленные через код (без внешних изображений) */
.req-figure-mock { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 20px; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; text-align: center; }
.req-figure-mock-schema { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 20px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }
.req-figure-mock-schema .box { width: 120px; height: 40px; background: #0f4685; color: white; display: flex; align-items: center; justify-content: center; font-size: 0.85em; border-radius: 4px; }
.req-figure-mock-schema .arrow { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 12px solid #0f4685; }
.req-figure-mock-chart { display: flex; align-items: flex-end; gap: 12px; height: 100px; padding: 15px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }
.req-figure-mock-chart .bar { width: 30px; background: linear-gradient(to top, #0f4685, #1a6bc4); border-radius: 4px 4px 0 0; }
body[data-theme="dark"] .req-figure-mock-chart {
    background: rgba(21, 34, 56, 0.6);
    border-color: rgba(69, 162, 214, 0.4);
    color: #e0e6ed;
}
body[data-theme="dark"] .req-figure-mock {
    background: rgba(21, 34, 56, 0.6) !important;
    border-color: rgba(69, 162, 214, 0.4);
    color: #e0e6ed;
}
body[data-theme="dark"] .req-figure-mock-schema,
body[data-theme="dark"] .req-figure-mock-diagram {
    background: rgba(21, 34, 56, 0.6) !important;
    border-color: rgba(69, 162, 214, 0.4);
    color: #e0e6ed;
}
body[data-theme="dark"] .req-figure-mock-diagram .node {
    background: rgba(15, 70, 133, 0.3);
    border-color: rgba(69, 162, 214, 0.6);
    color: #e0e6ed;
}
.req-figure-mock-diagram { display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; padding: 20px; background: #fff; border: 1px solid #ddd; border-radius: 6px; }
.req-figure-mock-diagram .node { padding: 10px 16px; background: #e8f4fd; border: 2px solid #0f4685; border-radius: 6px; font-size: 0.9em; }
/* Схема «ссылка на рисунок» — умещается в колонке примера */
.example-container .example-image .req-figure-mock-diagram.req-figure-mock-fit,
.req-figure-mock-diagram.req-figure-mock-fit {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    padding: 10px 8px;
    min-height: 0;
}
.req-figure-mock-diagram.req-figure-mock-fit .node {
    font-size: 0.72em;
    padding: 6px 8px;
    word-break: break-word;
}
.req-figure-mock-diagram.req-figure-mock-fit .diagram-arrow-tight {
    font-size: 1.1em !important;
    line-height: 1;
}
.req-figure-mock-inline { display: inline-block; width: 70px; height: 30px; background-color: #27ae60; border: 2px solid #1e8449; border-radius: 4px; vertical-align: middle; }

/* Требования к многостраничным приложениям (124–129) */
.req-multipage-block { margin: 0; }
.req-multipage-header {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 0.95em; color: #0f4685;
    margin-bottom: 0.75rem;
}
.req-multipage-icon { color: #426ee6; font-size: 1.1em; }
.req-multipage-intro { margin-bottom: 0.75rem; line-height: 1.5; }
.req-multipage-accent {
    font-weight: 700; color: #0f4685;
}
.req-multipage-list {
    list-style: none; padding-left: 0; margin: 0.75rem 0;
}
.req-multipage-list li {
    display: flex; align-items: flex-start; gap: 0.5rem;
    margin-bottom: 0.45rem; line-height: 1.45;
}
.req-multipage-bullet {
    color: #426ee6; font-size: 0.85em; margin-top: 0.2em; flex-shrink: 0;
}
.req-multipage-example { margin-top: 1rem; }
.req-multipage-img {
    max-width: 100%; height: auto; max-height: 280px;
    border: 1px solid #dee2e6; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.req-multipage-schema { margin: 1rem 0; }
.req-multipage-schema-title {
    font-weight: 600; color: #0f4685; margin-bottom: 0.5rem; font-size: 0.95em;
}
.req-multipage-schema-title i { margin-right: 0.35rem; }
.req-figure-mock-multipage {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 12px 16px; background: #f0f7ff; border: 1px solid #b8d4f0; border-radius: 6px;
}
.req-mp-page {
    padding: 6px 12px; background: #fff; border: 2px solid #0f4685;
    border-radius: 4px; font-size: 0.9em; color: #0f4685;
}
.req-mp-arrow { color: #0f4685; font-weight: bold; }
.req-figure-mock-textref {
    padding: 10px 14px; background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 6px;
    font-family: 'Times New Roman', serif; font-style: italic;
    min-width: 0; /* позволить flex сжимать по содержимому */
    white-space: normal; word-wrap: break-word;
}
.req-textref-sample { font-size: 0.95em; line-height: 1.4; }
.req-multipage-example-figure {
    min-width: 220px; flex: 1 1 38%;
}
.req-multipage-example .req-multipage-example-figure .req-figure-mock { width: 100%; min-width: 180px; }
.req-multipage-example-inline {
    margin-top: 1rem; padding: 15px; background: rgba(171,249,201,0.36); border-radius: 7px;
}
.req-multipage-example-inline .formatl { font-weight: 600; color: #0f4685; margin-bottom: 8px; }
.req-multipage-example-inline .myprimer1 { margin-bottom: 12px; }
.req-multipage-textref-inline { margin-top: 10px; max-width: 100%; }
.req-figure-mock-appendix {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px; background: #fff3e0; border: 1px solid #ffcc80; border-radius: 6px;
}
.req-app-letter { font-weight: 700; font-size: 1em; color: #e65100; }
.req-app-desc { font-size: 0.9em; color: #5d4037; }

body[data-theme="dark"] .req-multipage-header,
body[data-theme="dark"] .req-multipage-accent { color: #5a9fd4; }
body[data-theme="dark"] .req-multipage-icon,
body[data-theme="dark"] .req-multipage-bullet { color: #7eb8e8; }
body[data-theme="dark"] .req-figure-mock-multipage { background: rgba(15,70,133,0.2); border-color: rgba(69,162,214,0.4); }
body[data-theme="dark"] .req-mp-page { background: rgba(0,0,0,0.3); border-color: #5a9fd4; color: #8eb9e0; }
body[data-theme="dark"] .req-figure-mock-textref { background: rgba(46,125,50,0.2); border-color: rgba(46,125,50,0.5); }
body[data-theme="dark"] .req-figure-mock-appendix { background: rgba(230,81,0,0.15); border-color: rgba(255,204,128,0.5); }
body[data-theme="dark"] .req-app-letter { color: #ffb74d; }
body[data-theme="dark"] .req-app-desc { color: #b0bec5; }

/* HTML-предпросмотр примеров (вместо изображений) */
.req-example-html-preview { min-height: 120px; padding: 12px; background: #fff; border: 1px solid #e0e0e0; border-radius: 5px; font-size: 0.9em; line-height: 1.4; }
.req-example-html-preview .mock-doc { font-family: 'Times New Roman', serif; }
.req-example-html-preview .mock-h1 { text-align: center; font-weight: 700; font-size: 1.05em; margin: 8px 0; }
.req-example-html-preview .mock-h2 { font-weight: 700; margin-left: 1em; margin: 6px 0; }
.req-example-html-preview .mock-h3 { text-decoration: underline; margin-left: 1em; margin: 4px 0; }
.req-example-html-preview .mock-footnote { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #aaa; font-size: 0.9em; color: #333; }
.req-example-html-preview .mock-table-caption { text-align: center; font-weight: 700; margin-bottom: 6px; }
.req-example-html-preview .mock-formula { text-align: center; font-family: 'Times New Roman', serif; margin: 10px 0; }
.req-example-html-preview .mock-note { font-size: 0.85em; font-style: italic; margin-top: 6px; }
.req-example-html-preview .mock-label { font-size: 0.75em; color: #999; display: block; margin-bottom: 2px; }
#block3 {
    overflow: hidden;
}
#block3 .req-typography-card-content {
    overflow: hidden;
}
@media (max-width: 992px) {
    #block3 .req-typography-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    #block3 .req-typography-cards { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .req-typography-card .three-columns-wrapper { flex-direction: column; }
    .example-container, .req-typography-card .example-container { flex-direction: column; }
    .requirement-layout-cols { flex-direction: column; }
    .requirement-imgs-left-out, .requirement-imgs-right-out { max-width: none; }
    .requirement-imgs-left-in, .requirement-imgs-right-in { float: none; max-width: none; margin: 0 0 1rem 0; }
}

/* Шрифт по умолчанию для требований: Times New Roman, 14pt */
.requirements-page .requirement-content, .requirement-item-page .requirement-content,
.requirements-page .req-typography-card, .requirement-item-page .req-typography-card,
.requirements-page .requirement-card-desc, .requirement-item-page .requirement-item-title,
.example-container, .example-bad-container {
    font-family: 'Times New Roman', Times, serif;
}
.requirements-page .requirement-content, .requirement-item-page .requirement-content,
.requirements-page .req-typography-card, .requirement-item-page .req-typography-card,
.requirements-page .requirement-card-desc, .example-container .myprimer1, .example-bad-container .myprimer1 {
    font-size: 14pt;
}

/* Страница отдельного требования (ширина как у блока новостей) */
.requirement-item-page {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

/* Оформление страницы требования id=169 (объём, поля, типографика, НИР) */
.req169-formatted {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14pt;
}
.req169-formatted .req169-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.req169-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}
body[data-theme="dark"] .req169-section {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
.req169-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    background: rgba(15, 70, 133, 0.12);
    padding: 8px 12px;
    margin: 0 0 1rem;
    border-radius: 4px;
}
.req169-icon {
    font-size: 1.2rem;
    color: #0F4685;
}
.req169-value {
    color: #0F4685;
    font-weight: 600;
}
.req169-list {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.7;
}
.req169-list li {
    margin-bottom: 0.35rem;
}
.req169-grid.req169-volume {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem 1.5rem;
}
@media (max-width: 768px) {
    .req169-grid.req169-volume { grid-template-columns: repeat(2, 1fr); }
}
.req169-volume-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.req169-volume-title {
    font-weight: 500;
    color: #333;
}
.req169-volume-icon {
    margin-right: 0.4em;
    color: #0f4685;
    font-size: 0.95em;
}
body[data-theme="dark"] .req169-volume-title { color: rgba(255,255,255,0.9); }
body[data-theme="dark"] .req169-volume-icon { color: #8eb9e0; }
.req169-volume-item .req169-value {
    font-size: 0.95em;
}
.req169-typography-wrap {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.req169-typography-wrap .req169-list {
    flex: 1;
    min-width: 0;
}
.req169-typography-image {
    flex: 0 0 280px;
    min-width: 200px;
    cursor: pointer;
}
.req169-typography-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}
@media (max-width: 768px) {
    .req169-typography-wrap { flex-direction: column; }
    .req169-typography-image { flex: none; width: 100%; max-width: 350px; }
}

/* Оформление страницы требования id=171 (требования к системе / дистрибутив) */
.req171-formatted { margin-bottom: 2rem; }
.req171-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 992px) {
    .req171-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .req171-grid { grid-template-columns: 1fr; }
}
.req171-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
body[data-theme="dark"] .req171-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
.req171-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
body[data-theme="dark"] .req171-block-header { border-bottom-color: rgba(255,255,255,0.15); }
.req171-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #0F4685;
    color: #fff;
    border-radius: 50%;
}
.req171-icon { font-size: 1.35rem; }
.req171-block-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    line-height: 1.3;
}
body[data-theme="dark"] .req171-block-title { color: #8eb9e0; }
.req171-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #444;
}
body[data-theme="dark"] .req171-list { color: rgba(255,255,255,0.88); }
.req171-list li { margin-bottom: 0.5rem; }
.req171-list code {
    background: rgba(15, 70, 133, 0.12);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
body[data-theme="dark"] .req171-list code {
    background: rgba(15, 70, 133, 0.25);
}

/* Оформление требования 154 — организационные моменты и таблица структуры */
.req154-formatted {
    line-height: 1.6;
}
.req154-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary, #0f4685);
    margin: 0 0 1rem 0;
}
.req154-icon {
    font-size: 1.2rem;
}
.req154-org-list {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}
.req154-org-list > li {
    margin-bottom: 0.5rem;
}
.req154-org-list ul {
    margin: 0.5rem 0 0.25rem 0;
    padding-left: 1.25rem;
}
.req154-bullet {
    margin-right: 6px;
    color: var(--color-primary);
    font-size: 0.75em;
}
.req154-check {
    margin-right: 6px;
    color: #28a745;
}
.req154-table-wrap {
    overflow-x: auto;
    margin: 1rem auto 0;
    max-width: 1200px;
    min-width: 860px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(15, 70, 133, 0.08);
    border: 1px solid #dee2e6;
    background: #fff;
}
.req154-structure-table {
    font-size: 0.95rem;
    width: 100%;
    min-width: 850px;
    margin: 0;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: visible;
    font-family: system-ui, "Segoe UI", sans-serif;
    table-layout: fixed;
}
.req154-structure-table thead {
    background: linear-gradient(135deg, #0f4685 0%, #1a5ba0 100%);
    color: #fff;
}
.req154-structure-table thead th {
    padding: 0.85rem 1rem;
    font-weight: 600;
    text-align: left;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}
.req154-structure-table thead th:first-child {
    width: 48px;
    text-align: center;
}
.req154-structure-table thead th:nth-child(2),
.req154-structure-table tbody td:nth-child(2) {
    min-width: 360px;
    white-space: nowrap;
}
.req154-structure-table thead th:nth-child(5),
.req154-structure-table tbody td:nth-child(5) {
    width: 240px;
    min-width: 240px;
    white-space: nowrap;
    overflow: visible;
}
.req154-structure-table thead th.req154-col-pages {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    text-align: center;
}
.req154-structure-table tbody tr {
    transition: background-color 0.15s ease;
}
.req154-structure-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.req154-structure-table tbody tr:hover {
    background: #e8f4fc !important;
}
.req154-structure-table tbody td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}
.req154-structure-table tbody td:first-child {
    text-align: center;
    color: #6c757d;
    font-weight: 500;
}
.req154-structure-table tbody td:nth-child(3),
.req154-structure-table tbody td:nth-child(4),
.req154-structure-table thead th.req154-col-pages {
    text-align: center;
    font-weight: 600;
}
.req154-structure-table thead th.req154-col-pages {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    background: transparent;
}
.req154-structure-table tbody td:nth-child(3),
.req154-structure-table tbody td:nth-child(4) {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    background: transparent;
    color: inherit;
}
.req154-structure-table .req154-sub-row td {
    padding-left: 2rem;
    font-style: italic;
    color: #495057;
}
.req154-structure-table .req154-sub-row td:first-child {
    padding-left: 1rem;
}
.req154-structure-table .req154-total-row {
    background: linear-gradient(135deg, #0f4685 0%, #1a5ba0 100%) !important;
    color: #fff;
    font-size: 1rem;
}
.req154-structure-table .req154-total-row td {
    border-bottom: none;
    padding: 0.85rem 1rem;
}
.req154-structure-table .req154-total-row td:nth-child(3),
.req154-structure-table .req154-total-row td:nth-child(4) {
    background: transparent !important;
    color: #fff;
}
body[data-theme="dark"] .req154-table-wrap {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
body[data-theme="dark"] .req154-structure-table thead {
    background: linear-gradient(135deg, #1a5ba0 0%, #0f4685 100%);
}
body[data-theme="dark"] .req154-structure-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}
body[data-theme="dark"] .req154-structure-table tbody tr:hover {
    background: rgba(15, 70, 133, 0.15) !important;
}
body[data-theme="dark"] .req154-structure-table tbody td {
    border-color: rgba(255,255,255,0.08);
}
body[data-theme="dark"] .req154-structure-table tbody td:nth-child(3),
body[data-theme="dark"] .req154-structure-table tbody td:nth-child(4) {
    background: transparent;
    color: inherit;
}
body[data-theme="dark"] .req154-structure-table .req154-total-row {
    background: linear-gradient(135deg, #1a5ba0 0%, #0f4685 100%) !important;
}
body[data-theme="dark"] .req154-structure-table .req154-total-row td:nth-child(3),
body[data-theme="dark"] .req154-structure-table .req154-total-row td:nth-child(4) {
    background: transparent !important;
    color: #fff;
}

/* Оформление «Требования к элементам» (req155) — структура пояснительной записки */
.req155-formatted { margin-bottom: 2rem; }
.req155-intro { font-size: 1rem; line-height: 1.5; }
.req155-blocks { display: flex; flex-direction: column; gap: 1rem; }
.req155-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.req155-block-main {
    background: rgba(15, 70, 133, 0.06);
    border-color: rgba(15, 70, 133, 0.25);
}
.req155-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary, #0F4685);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.req155-icon { color: var(--color-primary, #0F4685); }
.req155-block-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}
.req155-chapters { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 0.75rem; }
.req155-chapter {
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    border-left: 4px solid var(--color-primary, #0F4685);
}
.req155-chapter-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.75rem 0;
}
.req155-sublist {
    margin: 0;
    padding-left: 1.5rem;
    list-style: decimal;
}
.req155-sublist li { margin-bottom: 0.35rem; line-height: 1.4; }
body[data-theme="dark"] .req155-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .req155-block-main {
    background: rgba(15, 70, 133, 0.15);
    border-color: rgba(15, 70, 133, 0.4);
}
body[data-theme="dark"] .req155-block-desc { color: rgba(255,255,255,0.7); }
body[data-theme="dark"] .req155-chapter {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.12);
    border-left-color: var(--color-accent);
}
body[data-theme="dark"] .req155-chapter-title { color: rgba(255,255,255,0.95); }

/* req155 контент из БД (структура с изображениями) */
.req155-section { margin-bottom: 2rem; }
.req155-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 992px) {
    .req155-with-sidebar { grid-template-columns: 1fr; }
}
.req155-section-text { min-width: 0; }
.req155-h3 {
    font-size: 1.1rem;
    color: var(--color-primary, #0F4685);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.req155-section-img {
    position: sticky;
    top: 1rem;
    text-align: center;
}
.req155-example-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
}
.req155-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.req155-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}
.req155-thumbs img:hover, .req155-thumbs img.active { border-color: #0F4685; }
.req155-main { background: #f8f9fa; padding: 1.25rem; border-radius: 8px; border-left: 4px solid #0F4685; }
.req155-main .req155-h3 { margin-top: 0; }
.req155-main img { margin: 8px 8px 8px 0; }
.req155-note { font-style: italic; color: #666; }
body[data-theme="dark"] .req155-main { background: rgba(255,255,255,0.05); border-left-color: var(--color-accent); }
body[data-theme="dark"] .req155-note { color: rgba(255,255,255,0.6); }
body[data-theme="dark"] .req155-notes {
    background: rgba(15, 70, 133, 0.25) !important;
    border-left-color: rgba(69, 162, 214, 0.5);
    color: #e0e6ed;
}
body[data-theme="dark"] .req155-notes h4,
body[data-theme="dark"] .req155-notes ol { color: #e0e6ed; }

/* Оформление «Требования к наполнению системы» (редактируемые блоки из БД) */
.req-system-content-formatted { margin-bottom: 2rem; }
.req-system-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 992px) {
    .req-system-content-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .req-system-content-grid { grid-template-columns: 1fr; }
}
.req-system-content-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
body[data-theme="dark"] .req-system-content-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
.req-system-content-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
body[data-theme="dark"] .req-system-content-block-header { border-bottom-color: rgba(255,255,255,0.15); }
.req-system-content-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #0F4685;
    color: #fff;
    border-radius: 50%;
}
.req-system-content-icon { font-size: 1.35rem; }
.req-system-content-block-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    line-height: 1.3;
}
body[data-theme="dark"] .req-system-content-block-title { color: #8eb9e0; }
.req-system-content-block-body {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #444;
}
body[data-theme="dark"] .req-system-content-block-body { color: rgba(255,255,255,0.88); }
.req-system-content-block-body ul {
    margin: 0;
    padding-left: 1.25rem;
}
.req-system-content-block-body li { margin-bottom: 0.5rem; }
.req-system-content-block-body code {
    background: rgba(15, 70, 133, 0.12);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
body[data-theme="dark"] .req-system-content-block-body code {
    background: rgba(15, 70, 133, 0.25);
}

/* Страница требования 173 — организация материалов */
.req173-formatted { margin-bottom: 2rem; }
.req173-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text, #333);
}
.req173-control-panel {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}
.req173-control-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}
.req173-control-row:last-of-type { margin-bottom: 0; }
.req173-control-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
}
.req173-control-label i { margin-right: 0.25rem; color: #0F4685; }
.req173-folder-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.req173-tab-btn { white-space: nowrap; }
.req173-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.req173-filter .btn { border-radius: 0; }
.req173-filter .btn:first-child { border-radius: 0.25rem 0 0 0.25rem; }
.req173-filter .btn:last-child { border-radius: 0 0.25rem 0.25rem 0; }
.req173-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}
.req173-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.req173-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}
.req173-legend-swatch.req173-da { background: #d4edda; }
.req173-legend-swatch.req173-uslovno { background: #fff3cd; }
.req173-legend-swatch.req173-dop { background: #f5c6cb; }
.req173-legend-swatch.req173-net { background: #fff; }
body[data-theme="dark"] .req173-control-panel { background: rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.1); }
body[data-theme="dark"] .req173-control-label { color: rgba(255,255,255,0.8); }
body[data-theme="dark"] .req173-legend { color: rgba(255,255,255,0.6); }
.req173-table-section { margin-bottom: 2rem; }
.req173-table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F4685;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.req173-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}
.req173-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: #fff;
}
.req173-table th {
    background: #0F4685;
    color: #fff;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
}
.req173-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
}
.req173-table tbody tr:nth-child(even) { background: #f8f9fa; }
.req173-subfolder-cell { vertical-align: top; }
.req173-desc-cell { min-width: 200px; }
.req173-status-col { min-width: 120px; text-align: center; }
.req173-status-cell { text-align: center; min-width: 110px; }
.req173-status-cell.req173-da { background: #d4edda; }
.req173-status-cell.req173-uslovno { background: #fff3cd; }
.req173-status-cell.req173-dop { background: #f5c6cb; }
.req173-status-cell.req173-net { background: #fff; }
.req173-icon-orange { color: #fd7e14; margin-right: 0.25rem; }
.req173-icon-blue { color: #0F4685; margin-right: 0.25rem; }

/* Страница требования 174 — общие требования (оформление дипломного проекта) */
.req174-formatted {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14pt;
    color: #000;
    line-height: 1.5;
    margin-bottom: 2rem;
}
body[data-theme="dark"] .req174-formatted { color: rgba(255,255,255,0.95); }
.req174-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 992px) {
    .req174-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .req174-grid { grid-template-columns: 1fr; }
}
.req174-block-wide { grid-column: 1 / -1; }
@media (min-width: 993px) {
    .req174-block-wide { grid-column: span 3; }
}
.req174-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
body[data-theme="dark"] .req174-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
.req174-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
body[data-theme="dark"] .req174-block-header { border-bottom-color: rgba(255,255,255,0.15); }
.req174-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #0F4685;
    color: #fff;
    border-radius: 50%;
}
.req174-icon { font-size: 1.35rem; }
.req174-block-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    line-height: 1.3;
}
body[data-theme="dark"] .req174-block-title { color: #8eb9e0; }
.req174-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
    text-align: justify;
}
.req174-list li { margin-bottom: 0.5rem; }
.req174-list-numbered { list-style: decimal; }
.req174-label { font-weight: 600; }
.req174-value {
    color: #0F4685;
    font-weight: 600;
}
body[data-theme="dark"] .req174-value { color: #8eb9e0; }
.req174-intro {
    margin: 0 0 1rem 0;
    text-indent: 1.25cm;
    text-align: justify;
}
.req174-examples {
    margin-top: 2rem;
}
.req174-examples-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F4685;
    margin-bottom: 1rem;
}
body[data-theme="dark"] .req174-examples-title { color: #8eb9e0; }
.req174-example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .req174-example-grid { grid-template-columns: 1fr; }
}
.req174-example-block {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
body[data-theme="dark"] .req174-example-block {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}
.req174-example-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0F4685;
    margin-bottom: 0.75rem;
}
body[data-theme="dark"] .req174-example-label { color: #8eb9e0; }
.req174-example-text {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14pt;
    line-height: 1.5;
    color: #000;
    text-align: justify;
}
.req174-example-text p {
    margin: 0 0 0.5rem 0;
    text-indent: 1.25cm;
}
.req174-example-text p:first-child {
    text-indent: 0;
}
.req174-example-heading {
    font-weight: 700;
    text-align: center !important;
}
.req174-example-page {
    position: relative;
    min-height: 120px;
    border: 1px dashed #adb5bd;
    border-radius: 4px;
    padding: 1rem;
}
.req174-example-page-content {
    font-size: 0.85rem;
    color: #6c757d;
}
.req174-example-page-number {
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-size: 14pt;
    font-weight: 600;
}

/* Страница требования 175 — списки в типографике */
.req175-formatted { margin-bottom: 2rem; }
.req175-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text, #333);
}
.req175-block {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}
.req175-block.req175-req {
    border: 2px solid #0F4685;
    background: #fff;
}
.req175-block.req175-errors {
    border: 2px solid #0F4685;
    background: rgba(15, 70, 133, 0.03);
}
.req175-block.req175-help {
    border-left: 4px solid #28a745;
    background: rgba(40, 167, 69, 0.06);
}
.req175-help-list { list-style: none; padding-left: 0; margin: 0.5rem 0; }
.req175-help-list li { margin-bottom: 0.75rem; padding-left: 1.5rem; position: relative; }
.req175-help-list li::before { content: '•'; position: absolute; left: 0; color: #28a745; font-weight: bold; }
.req175-help-list .req175-help-sublist { list-style: none; padding-left: 1.5rem; margin: 0.5rem 0 0 0; }
.req175-help-list .req175-help-sublist li::before { content: 'o'; font-style: italic; }
.req175-help-kbd { background: #f0f0f0; padding: 0.15em 0.4em; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 0.9em; border: 1px solid #ccc; }
.req175-block.req175-example {
    background: #d4edda;
    border: 2px solid #28a745;
}
.req175-block-title {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #0F4685;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.req175-block.req175-example .req175-block-title {
    background: #28a745;
}
.req175-block-body {
    padding: 1rem 1.25rem;
}
.req175-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}
.req175-col { flex: 1; min-width: 180px; }
.req175-checklist { list-style: none; padding: 0; margin: 0; }
.req175-checklist li::before { content: '✓ '; color: #0F4685; font-weight: bold; }
.req175-checklist li { margin-bottom: 0.5rem; }
.req175-errors { list-style: none; padding: 0; margin: 0; }
.req175-errors li::before { content: '✗ '; color: #dc3545; font-weight: bold; }
.req175-errors li { margin-bottom: 0.5rem; }
.req175-example-inner {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
}
.req175-example-left { flex: 1; min-width: 200px; }
.req175-example-right { flex: 0 0 var(--req-example-figure-width); min-width: var(--req-example-figure-min-width); }
.req175-figure-label { font-weight: 600; margin-bottom: 0.5rem; color: #155724; }
.req175-figure-inner, .req175-figure-box {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.req175-figure-box { margin-top: 0; }
.req175-code-list { margin: 0.5rem 0; }
.req175-annot { color: #dc3545; font-size: 0.9em; }
/* Пример маркерного списка: 14pt, тире, строчные, отступ 1,25 см */
.req175-marker-sample-wrap {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14pt;
    line-height: 1.5;
    text-align: left;
    color: #212529;
}
.req175-marker-sample-wrap .req175-marker-heading {
    margin: 0 0 0.4em 0;
}
.req175-marker-sample-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25cm;
}
.req175-marker-sample-list li {
    margin-bottom: 0.25em;
    padding-left: 0;
}
.req175-marker-sample-list .req175-annot {
    margin-left: 0.35em;
    font-size: 11pt;
    vertical-align: baseline;
}
body[data-theme="dark"] .req175-marker-sample-wrap { color: #e0e6ed; }
body[data-theme="dark"] .req175-marker-sample-wrap .req175-marker-heading { color: #e8eef5; }
.req175-inner-menu { margin-bottom: 1rem; }
.req175-example-icon { color: #fff; }
@media (max-width: 768px) {
    .req175-example-inner { flex-direction: column; }
    .req175-example-right { flex: 1 1 auto; }
}

/* Бейджи статусов в админке req_mat173 */
.req-mat173-badge.req-mat173-da { background: #d4edda; color: #155724; }
.req-mat173-badge.req-mat173-uslovno { background: #fff3cd; color: #856404; }
.req-mat173-badge.req-mat173-dop { background: #f5c6cb; color: #721c24; }
.req-mat173-badge.req-mat173-net { background: #e9ecef; color: #495057; }

/* Оформление страницы «Типы брошюровки» (калькулятор) */
.req-binding-formatted { margin-bottom: 2rem; }
.req-binding-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}
.req-binding-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F4685;
    margin: 1.5rem 0 1rem;
}
.req-binding-section-title:first-of-type { margin-top: 0; }
.req-binding-icon { font-size: 1.2rem; color: #0F4685; }
.req-binding-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}
.req-binding-table {
    width: 100%;
    border-collapse: collapse;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
body[data-theme="dark"] .req-binding-table {
    background: rgba(255,255,255,0.05);
}
.req-binding-table th,
.req-binding-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
body[data-theme="dark"] .req-binding-table th,
body[data-theme="dark"] .req-binding-table td {
    border-color: rgba(255,255,255,0.12);
}
.req-binding-table th {
    background: #0F4685;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}
.req-binding-table tbody tr:last-child td { border-bottom: none; }
.req-binding-table tbody tr:hover {
    background: rgba(15, 70, 133, 0.06);
}
body[data-theme="dark"] .req-binding-table tbody tr:hover {
    background: rgba(15, 70, 133, 0.15);
}

.req-binding-calculator {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(15, 70, 133, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(15, 70, 133, 0.2);
}
body[data-theme="dark"] .req-binding-calculator {
    background: rgba(15, 70, 133, 0.15);
    border-color: rgba(15, 70, 133, 0.3);
}
.req-binding-calc-desc { margin-bottom: 1rem; }
.req-binding-calc-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}
@media (max-width: 576px) {
    .req-binding-calc-form { flex-direction: column; align-items: stretch; }
    .req-binding-calc-form input[type="number"] { width: 100%; }
}
.req-binding-calc-form label {
    font-weight: 600;
    margin-right: 4px;
}
.req-binding-calc-form input[type="number"] {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
}
body[data-theme="dark"] .req-binding-calc-form input {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: inherit;
}
.req-binding-result {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.5;
}
.req-binding-result-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #155724;
}
body[data-theme="dark"] .req-binding-result-success {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.5);
    color: #7dd89a;
}
.req-binding-result-warning {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #856404;
}
body[data-theme="dark"] .req-binding-result-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffeaa7;
}

.requirement-item-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.requirement-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.requirement-layout-cols {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.requirement-imgs-left-out, .requirement-imgs-right-out {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 320px;
}
.requirement-imgs-left-out .requirement-image-block,
.requirement-imgs-right-out .requirement-image-block { margin-bottom: 1rem; }
.requirement-main-content { flex: 1; min-width: 0; }
.requirement-content-with-floats { overflow: auto; }
.requirement-imgs-left-in {
    float: left;
    margin: 0 1rem 1rem 0;
    max-width: 45%;
}
.requirement-imgs-right-in {
    float: right;
    margin: 0 0 1rem 1rem;
    max-width: 45%;
}
.requirement-imgs-left-in .requirement-image-block,
.requirement-imgs-right-in .requirement-image-block { margin-bottom: 0.5rem; }

.requirement-image-block {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.req-image-lightbox {
    position: relative;
}
.req-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.req-lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}

.requirement-image-link {
    display: block;
    line-height: 0;
}

.requirement-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.requirement-image-actions {
    display: flex;
    gap: 8px;
    padding: 8px;
    flex-wrap: wrap;
}

.requirement-content {
    line-height: 1.7;
}

.requirement-content ul,
.requirement-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.requirement-content li {
    margin-bottom: 0.4rem;
}

.req-referat-structure .req-structure-list > li {
    margin-bottom: 1.2rem;
}

.req-referat-structure .req-structure-list > li > ul {
    margin-top: 0.5rem;
}

.req-intro-example .req-intro-diagram {
    max-width: 280px;
}
.req-intro-example .fig-float-end {
    float: right;
}
@media (max-width: 576px) {
    .req-intro-example .fig-float-end {
        float: none;
        margin: 1rem 0 !important;
    }
}
.req5-vstavka-iframe {
    min-height: 500px;
}
@media (min-width: 768px) {
    .req5-vstavka-iframe {
        min-height: 700px;
    }
}
.req-conclusion-structure .req-conclusion-intro {
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.req-conclusion-structure .req-conclusion-section {
    margin-bottom: 1.5rem;
}
.req-conclusion-structure .req-conclusion-h4 {
    font-size: 0.95rem;
    color: #1e4a76;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
}
.req-conclusion-structure .req-conclusion-example {
    background: #f4f8fc;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #1e4a76;
    margin: 0.4rem 0;
    font-size: 0.9rem;
}
.req-conclusion-structure .req-conclusion-list {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}
.req-conclusion-structure .req-conclusion-list li {
    margin-bottom: 0.75rem;
}

.req-bibliography-sample .req-bibliography-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e4a76;
    text-align: center;
    margin-bottom: 1.25rem;
}
.req-bibliography-sample .req-bibliography-section {
    margin-bottom: 1.5rem;
}
.req-bibliography-sample .req-bibliography-h5 {
    font-size: 0.95rem;
    color: #1e4a76;
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
}
.req-bibliography-sample .req-bibliography-desc {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.6rem;
}
.req-bibliography-sample .req-bibliography-list {
    margin: 0.25rem 0;
    padding-left: 1.5rem;
}
.req-bibliography-sample .req-bibliography-list li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.req-report-requirements .req-report-h4 { font-size: 0.95rem; color: #1e4a76; margin-bottom: 0.5rem; }
.req-report-requirements .req-report-h5 { font-size: 0.9rem; color: #1e4a76; margin-bottom: 0.35rem; margin-top: 0.75rem; }
.req-report-requirements .req-report-intro { margin-bottom: 0.75rem; }
.req-report-requirements .req-report-list { padding-left: 1.25rem; margin: 0.25rem 0; }
.req-report-requirements .req-report-list li { margin-bottom: 0.4rem; }
.req-report-requirements .req-report-section { margin-bottom: 0.75rem; }
.req-report-requirements .req-report-section ul { padding-left: 1.25rem; margin: 0.25rem 0; }
.req-report-requirements .req-report-example { background: #f4f8fc; padding: 0.4rem 0.6rem; border-radius: 6px; border-left: 3px solid #1e4a76; margin: 0.35rem 0; font-size: 0.9rem; }

.requirement-dynamic {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

.requirement-attachments {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.requirement-attachments .btn {
    white-space: nowrap;
}

.requirement-to-notes {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

body[data-theme="dark"] .requirement-image-block,
body[data-theme="dark"] .requirement-dynamic {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .requirement-dynamic,
body[data-theme="dark"] .requirement-dynamic table,
body[data-theme="dark"] .requirement-dynamic table td,
body[data-theme="dark"] .requirement-dynamic table th,
body[data-theme="dark"] .requirement-dynamic .chart-table,
body[data-theme="dark"] .requirement-dynamic .chart-table td,
body[data-theme="dark"] .requirement-dynamic .chart-table th {
    color: #e0e6ed !important;
}

/* Теория слева, слайдер справа — Рефераты и Практические */
.req-theory-slider-layout {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 420px);
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}
@media (max-width: 992px) {
    .req-theory-slider-layout { grid-template-columns: 1fr; }
}
.req-theory-left { min-width: 0; width: 100%; }
.req-theory-blocks { width: 100%; }
.req-theory-right { position: sticky; top: 1rem; }
@media (max-width: 992px) {
    .req-theory-right { position: static; }
}

.req-theory-block {
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.req-theory-block.req-theory-definition {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}
.req-theory-block .req-theory-block-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}
.req-theory-block.req-theory-definition .req-theory-block-icon { background: #4caf50; }

/* Добавления в теоретическом разделе — 100% ширины, заголовок сверху по центру */
.req-theory-block.req-theory-example {
    width: 100%;
    flex-direction: column;
    align-items: center;
}
.req-theory-block.req-theory-example .req-theory-block-icon {
    margin-bottom: 0.25rem;
}
.req-theory-block.req-theory-example .req-theory-block-title {
    text-align: center;
    width: 100%;
    margin-bottom: 1rem;
}
.req-theory-block.req-theory-example .req-theory-block-body {
    align-self: stretch;
    width: 100%;
}

.req-theory-block-body {
    flex: 1;
    min-width: 0;
    line-height: 1.7;
}
.req-theory-block-body h4, .req-theory-block-body h5 { margin-top: 0; }
.req-theory-block-body ul, .req-theory-block-body ol { margin: 0.5rem 0; padding-left: 1.25rem; }
.req-theory-block-body li { margin-bottom: 0.35rem; }

.req-theory-extra {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}
.req-theory-extra-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0F4685;
    border-radius: 8px 0 0 8px;
}
.req-theory-extra-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
}
.req-theory-extra-list li { margin-bottom: 0.4rem; }

.req-theory-slider {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.req-theory-main-media {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    padding: 1rem;
}
.req-theory-main-img {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 4px;
}
.req-theory-pdf-view {
    width: 100%;
    height: 420px;
    min-height: 360px;
    border: none;
}
.req-theory-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
}
.req-theory-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    overflow-x: auto;
}
.req-theory-thumb {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.req-theory-thumb:hover { border-color: #0F4685; }
.req-theory-thumb.active { border-color: #0F4685; }
.req-theory-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.req-theory-thumb-doc {
    font-size: 0.75rem;
    color: #0F4685;
}
.req-theory-main-media {
    aspect-ratio: 4/3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.req-theory-main-media .req-theory-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.req-theory-main-media .req-theory-pdf-view {
    width: 100%;
    height: 100%;
    min-height: 280px;
}
.req-theory-right-placeholder {
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.9rem;
}

body[data-theme="dark"] .req-theory-block.req-theory-definition {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
}
body[data-theme="dark"] .req-theory-extra {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .req-theory-extra-accent { background: #8eb9e0; }
body[data-theme="dark"] .req-theory-slider {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.12);
}
body[data-theme="dark"] .req-theory-main-media { background: rgba(0,0,0,0.2); }
body[data-theme="dark"] .req-theory-right-placeholder {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

/* ========== Страница «Реферат» ========== */
.req-icon-title {
    margin-right: 0.5rem;
}

/* ========== Онлайн-оценка (eval) ========== */
.eval-page .eval-code-form-wrap {
    max-width: 480px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background: rgba(15, 70, 133, 0.06);
    border-radius: 8px;
}

.eval-page .eval-intro {
    margin-bottom: 1rem;
    color: #555;
}

.eval-page .eval-code-form .input-group {
    display: flex;
    gap: 0.5rem;
}

.eval-page .eval-code-form .form-control {
    flex: 1;
}

.eval-page .eval-form-section {
    max-width: 720px;
    margin: 0 auto;
}

.eval-page .eval-participant-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 70, 133, 0.08);
    border-radius: 8px;
}

.eval-page .eval-criteria-list {
    margin-bottom: 1.5rem;
}

.eval-page .eval-criterion-item {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: #fff;
}

body[data-theme="dark"] .eval-page .eval-criterion-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.eval-page .eval-criterion-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.eval-page .eval-criterion-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.eval-page .eval-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.eval-page .eval-radio-label:hover {
    background: rgba(15, 70, 133, 0.1);
}

.eval-page .eval-result-box {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.12), rgba(69, 162, 214, 0.08));
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.eval-page .eval-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.eval-page .eval-result-label {
    font-weight: 600;
}

.eval-page .eval-result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-primary);
}

.eval-page .eval-result-value.eval-grade {
    font-size: 1.5rem;
}

.eval-page .eval-actions {
    margin-top: 1rem;
}

.eval-page .eval-lock-label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.eval-page .eval-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.referat-definition-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.referat-def-icon {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    color: #22c55e;
}

.referat-purpose {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.referat-three-cols {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .referat-three-cols {
        grid-template-columns: 1fr;
    }
}

.referat-text-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.referat-text-section h4 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.referat-text-section ul {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.referat-text-section li {
    margin-bottom: 0.5rem;
}

.referat-rec-subtitle {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.referat-rec-subtitle i {
    margin-right: 0.5rem;
}

.referat-rec-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.referat-rec-card .requirement-card-desc {
    -webkit-line-clamp: 4;
}

.ref-topics-accordion .accordion-button i {
    color: #0F4685;
}
body[data-theme="dark"] .ref-topics-accordion .accordion-item {
    background: rgba(21, 34, 56, 0.5);
    border-color: rgba(69, 162, 214, 0.3);
}
body[data-theme="dark"] .ref-topics-accordion .accordion-button {
    background: rgba(21, 34, 56, 0.6) !important;
    color: #e0e6ed !important;
    border-color: rgba(69, 162, 214, 0.3);
}
body[data-theme="dark"] .ref-topics-accordion .accordion-button i,
body[data-theme="dark"] .ref-topics-accordion .accordion-button::after {
    color: #8eb9e0 !important;
}
body[data-theme="dark"] .ref-topics-accordion .accordion-body {
    background: rgba(21, 34, 56, 0.4) !important;
    color: #e0e6ed;
}
body[data-theme="dark"] .ref-topics-accordion .ref-topic-desc,
body[data-theme="dark"] .ref-topics-accordion .ref-topic-content {
    color: #e0e6ed;
}

/* Блоки в стиле «Рекомендации» (practical) — для applications sections 1 и 2 */
.app-rec-style-block {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.app-rec-style-block .app-rec-intro {
    margin: 0 0 1.25rem;
    line-height: 1.6;
    padding: 0.75rem 1rem;
    background: rgba(15, 70, 133, 0.06);
    border-left: 4px solid #0F4685;
    border-radius: 0 6px 6px 0;
}
.app-rec-style-block .app-purpose-grid-3,
.app-rec-style-block .requirements-cards-grid {
    margin-top: 0;
}
body[data-theme="dark"] .app-rec-style-block {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}
body[data-theme="dark"] .app-rec-style-block .app-rec-intro {
    background: rgba(15, 70, 133, 0.15);
    border-left-color: var(--color-accent);
}

body[data-theme="dark"] .referat-definition-box {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
}

/* ========== Страница «Приложения» ========== */
.referat-purpose-list {
    margin: 1rem 0 1.5rem 1.5rem;
    padding-left: 1rem;
}

.referat-purpose-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.app-what-include {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin: 1.5rem 0 1rem 0;
}

.app-purpose-cards .requirement-card-desc {
    -webkit-line-clamp: 4;
}

/* 1. Назначение приложений — 3 колонки (карточки как на рисунке) */
.app-purpose-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}
.app-purpose-item {
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.app-purpose-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.3;
}
.app-purpose-item-desc {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.45;
    flex: 1;
}
.app-purpose-item-btn { margin-top: 0.25rem; align-self: flex-start; }
@media (max-width: 992px) {
    .app-purpose-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .app-purpose-grid-3 { grid-template-columns: 1fr; }
}

/* 2. Общие требования и 3. Многостраничные — 6 карточек в ряд */
.requirements-cards-grid-6 {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}
.requirements-cards-grid-6 .requirement-card { padding: 1rem; }
.requirements-cards-grid-6 .requirement-card-title { font-size: 0.9rem; min-height: auto; -webkit-line-clamp: 3; }
.requirements-cards-grid-6 .requirement-card-desc { -webkit-line-clamp: 4; font-size: 0.85rem; }
.requirements-cards-grid-6 .requirement-card-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
@media (max-width: 1200px) {
    .requirements-cards-grid-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .requirements-cards-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .requirements-cards-grid-6 { grid-template-columns: 1fr; }
}

/* Графики — карточек в ряд (настройки админки) */
.charts-cards-grid.charts-cards-grid-3,
.charts-cards-grid.charts-cards-grid-4,
.charts-cards-grid.charts-cards-grid-5,
.charts-cards-grid.charts-cards-grid-6 {
    gap: 1.25rem;
}
.charts-cards-grid.charts-cards-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.charts-cards-grid.charts-cards-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.charts-cards-grid.charts-cards-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.charts-cards-grid.charts-cards-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1400px) {
    .charts-cards-grid.charts-cards-grid-6,
    .charts-cards-grid.charts-cards-grid-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
    .charts-cards-grid.charts-cards-grid-6,
    .charts-cards-grid.charts-cards-grid-5,
    .charts-cards-grid.charts-cards-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
    .charts-cards-grid.charts-cards-grid-6,
    .charts-cards-grid.charts-cards-grid-5,
    .charts-cards-grid.charts-cards-grid-4,
    .charts-cards-grid.charts-cards-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .charts-cards-grid.charts-cards-grid-6,
    .charts-cards-grid.charts-cards-grid-5,
    .charts-cards-grid.charts-cards-grid-4,
    .charts-cards-grid.charts-cards-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

.charts-card-icon-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.charts-page .charts-card .charts-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1;
}
.charts-page .charts-card .charts-card-icon-row .charts-relevance {
    margin-top: 0.15rem;
}
.charts-page .charts-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    min-height: calc(1.35em * 3);
    margin-bottom: 0.35rem;
    text-align: left;
    width: 100%;
}
.charts-page .charts-card .charts-card-type {
    font-size: 0.72rem;
    line-height: 1.3;
    color: #6c757d;
    text-align: left;
    align-self: flex-start;
    width: 100%;
    margin: 0 0 0.65rem;
    flex: 0 0 auto;
    -webkit-line-clamp: 2;
}
body[data-theme="dark"] .charts-page .charts-card .charts-card-type {
    color: #b8c7d9 !important;
}
body[data-theme="dark"] .charts-page .charts-card .charts-card-date,
body[data-theme="dark"] .charts-page .charts-card .charts-card-date.text-muted,
body[data-theme="dark"] .charts-page .charts-card .text-muted,
body[data-theme="dark"] .charts-page .charts-card p.small {
    color: #a8b8cc !important;
}
body[data-theme="dark"] .charts-page .requirement-card.charts-card {
    background: #1a2d47;
    border-color: rgba(142, 185, 224, 0.35);
}
body[data-theme="dark"] .charts-page .charts-card .requirement-card-title,
body[data-theme="dark"] .charts-page .charts-card .charts-card-title {
    color: #8eb9e0;
}
body[data-theme="dark"] .charts-page .charts-card .charts-reaction-count {
    color: #c5d4e4;
}
body[data-theme="dark"] .charts-page .charts-card .btn-outline-primary {
    color: #8eb9e0;
    border-color: rgba(142, 185, 224, 0.55);
}
body[data-theme="dark"] .charts-page .charts-card .charts-reaction-btn {
    background: rgba(21, 34, 56, 0.85);
    border-color: rgba(142, 185, 224, 0.35);
    color: #e0e6ed;
}

.charts-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.charts-page .requirement-card-title.charts-card-title-row {
    display: flex;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    min-height: 0;
}
.charts-card-title-text {
    flex: 1 1 auto;
    min-width: 0;
}
.charts-relevance {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.charts-relevance-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.charts-relevance-active .charts-relevance-dot {
    background: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}
.charts-relevance-active .charts-relevance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #28a745;
    text-transform: lowercase;
}
.charts-relevance-expired .charts-relevance-dot {
    background: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.25);
}
.charts-relevance-expired .charts-relevance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9b59b6;
}

.chart-admin-expires-cell {
    min-width: 10.5rem;
}
.chart-admin-expires-form {
    margin: 0;
}
.chart-admin-expires-input {
    min-width: 9.5rem;
}
.chart-admin-relevance {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
}
.chart-admin-relevance--active {
    color: #198754;
}
.chart-admin-relevance--expired {
    color: #dc3545;
}

.charts-admin-actions-row {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
}
.charts-admin-actions-row form {
    display: inline-flex;
    margin: 0;
}
.charts-admin-list-table th,
.charts-admin-list-table td {
    vertical-align: middle;
}

.charts-card-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.charts-reaction-btn {
    border: 1px solid #dee2e6;
    background: #fff;
    line-height: 1.2;
    padding: 0.2rem 0.45rem;
}
.charts-reaction-btn.active {
    border-color: #0F4685;
    background: #e8f0fe;
}
.charts-reaction-count {
    font-size: 0.7rem;
    margin-left: 0.15rem;
    color: #666;
}
.charts-card-actions {
    margin-top: auto;
}
.charts-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
}

/* Опросы — каталог карточек */
.polls-page .polls-intro {
    margin: -0.35rem 0 1.25rem;
    color: #6c757d;
    font-size: 0.95rem;
}
.polls-page .polls-toolbar .card-body {
    padding: 1rem 1.15rem;
}
.polls-page .polls-filter-form .form-label {
    color: #495057;
    font-weight: 600;
}
.polls-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.polls-cards-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.polls-cards-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.polls-cards-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.polls-cards-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) {
    .polls-cards-grid--cols-6,
    .polls-cards-grid--cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
    .polls-cards-grid--cols-6,
    .polls-cards-grid--cols-5,
    .polls-cards-grid--cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .polls-cards-grid--cols-6,
    .polls-cards-grid--cols-5,
    .polls-cards-grid--cols-4,
    .polls-cards-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .polls-cards-grid--cols-6,
    .polls-cards-grid--cols-5,
    .polls-cards-grid--cols-4,
    .polls-cards-grid--cols-3 { grid-template-columns: minmax(0, 1fr); }
}

/* Новости, объявления, фотоархив — карточек в ряд */
.news-grid[class*="--cols-"],
.announcements-grid[class*="--cols-"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.photo-archive-albums-grid {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}
.news-grid--cols-3,
.announcements-grid--cols-3,
.photo-archive-albums-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-grid--cols-4,
.announcements-grid--cols-4,
.photo-archive-albums-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.news-grid--cols-5,
.announcements-grid--cols-5,
.photo-archive-albums-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.news-grid--cols-6,
.announcements-grid--cols-6,
.photo-archive-albums-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1400px) {
    .news-grid--cols-6,
    .announcements-grid--cols-6,
    .photo-archive-albums-grid--cols-6,
    .news-grid--cols-5,
    .announcements-grid--cols-5,
    .photo-archive-albums-grid--cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
    .news-grid--cols-6,
    .announcements-grid--cols-6,
    .photo-archive-albums-grid--cols-6,
    .news-grid--cols-5,
    .announcements-grid--cols-5,
    .photo-archive-albums-grid--cols-5,
    .news-grid--cols-4,
    .announcements-grid--cols-4,
    .photo-archive-albums-grid--cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
    .news-grid--cols-6,
    .announcements-grid--cols-6,
    .photo-archive-albums-grid--cols-6,
    .news-grid--cols-5,
    .announcements-grid--cols-5,
    .photo-archive-albums-grid--cols-5,
    .news-grid--cols-4,
    .announcements-grid--cols-4,
    .photo-archive-albums-grid--cols-4,
    .news-grid--cols-3,
    .announcements-grid--cols-3,
    .photo-archive-albums-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .news-grid--cols-6,
    .announcements-grid--cols-6,
    .photo-archive-albums-grid--cols-6,
    .news-grid--cols-5,
    .announcements-grid--cols-5,
    .photo-archive-albums-grid--cols-5,
    .news-grid--cols-4,
    .announcements-grid--cols-4,
    .photo-archive-albums-grid--cols-4,
    .news-grid--cols-3,
    .announcements-grid--cols-3,
    .photo-archive-albums-grid--cols-3 { grid-template-columns: minmax(0, 1fr); }
}
.poll-card {
    overflow: hidden;
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.poll-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 70, 133, 0.14) !important;
}
.poll-card-cover {
    aspect-ratio: 16 / 10;
    background: rgba(15, 70, 133, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.poll-card-cover--placeholder {
    background: linear-gradient(180deg, rgba(15, 70, 133, 0.1) 0%, rgba(15, 70, 133, 0.04) 100%);
}
.poll-card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.poll-card-cover-icon-wrap {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: #0f4685;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.35rem 1rem rgba(15, 70, 133, 0.25);
}
.poll-card-cover-icon {
    font-size: 2rem;
    color: #fff;
}
.poll-card-body {
    padding: 1rem 1.1rem 1.15rem;
}
.poll-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.poll-card-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}
.poll-card-badge--type {
    background: #d4edda;
    color: #1e6b34;
}
.poll-card-badge--closed {
    background: #fff3cd;
    color: #856404;
}
.poll-card-badge--active {
    background: #d9ecff;
    color: #0f4685;
}
.poll-card-title {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0f4685;
    text-transform: uppercase;
}
.poll-lines-3 {
    min-height: calc(1.35em * 3);
    max-height: calc(1.35em * 3);
    overflow: hidden;
    word-break: break-word;
}
.poll-lines-4 {
    min-height: calc(1.45em * 4);
    max-height: calc(1.45em * 4);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    word-break: break-word;
}
.poll-card-desc {
    margin: 0 0 0.85rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #5a6573;
}
.poll-card-desc--empty {
    font-style: italic;
    color: #8a939f;
}
.poll-card-stats li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.15rem 0;
    color: #495057;
}
.poll-card-stat-label {
    color: #6c757d;
}
.poll-card-btn {
    font-weight: 700;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}
@media (max-width: 1200px) {
    .polls-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
    .polls-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
    .polls-cards-grid { grid-template-columns: 1fr; }
    .polls-page .polls-filter-form > [class*="col-"] {
        width: 100%;
    }
}
body[data-theme="dark"] .polls-page .polls-intro,
body[data-theme="dark"] .poll-card-desc,
body[data-theme="dark"] .poll-card-stats li {
    color: rgba(224, 230, 237, 0.88);
}
body[data-theme="dark"] .poll-card-desc--empty {
    color: rgba(224, 230, 237, 0.62);
}
body[data-theme="dark"] .poll-card-title {
    color: #8eb9e0;
}
body[data-theme="dark"] .poll-card-cover--placeholder {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
}
body[data-theme="dark"] .poll-card-badge--type {
    background: rgba(40, 167, 69, 0.22);
    color: #8fd4a0;
}
body[data-theme="dark"] .poll-card-badge--active {
    background: rgba(66, 110, 230, 0.22);
    color: #9ec5ff;
}
.poll-card-badge--finished {
    background: #e9ecef;
    color: #495057;
}
body[data-theme="dark"] .poll-card-badge--finished {
    background: rgba(173, 181, 189, 0.2);
    color: #ced4da;
}
.poll-card--finished .poll-card-cover-img {
    filter: grayscale(0.6);
    opacity: 0.85;
}
.polls-admin-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
}
.polls-admin-actions form {
    margin: 0;
}
.polls-admin-actions .btn {
    width: 2rem;
    padding-left: 0;
    padding-right: 0;
}

/* Прохождение опроса */
.poll-view-page .poll-view-header-card,
.poll-view-page .poll-view-question-card,
.poll-view-page .poll-view-report-card {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 1rem rgba(15, 70, 133, 0.08);
}
.poll-view-description {
    color: #0F4685;
    font-size: 1.0625rem;
    line-height: 1.55;
    margin-bottom: 0;
}
.poll-view-page .page-heading__bar .page-heading__title {
    min-height: calc(1.35em * 3);
    max-height: calc(1.35em * 3);
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}
.poll-view-page .poll-lines-4 {
    min-height: calc(1.55em * 4);
    max-height: calc(1.55em * 4);
    line-height: 1.55;
}
.poll-view-question-img-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}
.poll-view-question-img,
.poll-question-inline-img {
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}
.poll-view-question-meta {
    font-weight: 700;
    color: #0f4685;
}
.poll-view-timer-box {
    min-width: 140px;
    text-align: right;
}
.poll-view-timer-label {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 700;
}
.poll-view-timer-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f4685;
    line-height: 1.2;
}
.poll-view-timer-bar {
    height: 4px;
    background: rgba(15, 70, 133, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.35rem;
}
.poll-view-timer-bar-fill {
    height: 100%;
    width: 100%;
    background: #0f4685;
    transition: width 1s linear;
}
.poll-nav-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.poll-nav-card {
    width: 2rem;
    height: 2rem;
    border: 1px solid #cfd8e3;
    border-radius: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    background: #fff;
    padding: 0;
}
button.poll-nav-card {
    cursor: pointer;
}
.poll-nav-card.is-current {
    border-color: #0f4685;
    box-shadow: 0 0 0 1px #0f4685;
    color: #0f4685;
}
.poll-nav-card.is-answered {
    background: #e8f2fc;
    border-color: #7eb0df;
    color: #0f4685;
}
.poll-nav-card.is-disabled {
    opacity: 0.45;
}
.poll-view-question-text {
    background: #eef5fc;
    border-left: 4px solid #0f4685;
    padding: 1rem 1.1rem;
    border-radius: 0.35rem;
    font-weight: 600;
    color: #123d6d;
}
.poll-view-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.poll-view-option-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    margin: 0;
    cursor: pointer;
    background: #fff;
}
.poll-view-option-row:hover {
    border-color: #9ec5ff;
}
.poll-view-priority-row {
    display: grid;
    grid-template-columns: 1fr 5rem;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.55rem;
}
@media (max-width: 575.98px) {
    .poll-view-priority-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .poll-view-priority-select {
        max-width: 100%;
        min-height: 2.5rem;
    }
}
.poll-view-priority-select.is-auto-assigned {
    background-color: #eef5fc;
    border-color: #7eb0df;
    pointer-events: none;
}
.poll-view-open-answer {
    min-height: 120px;
}
.poll-view-cover-center {
    display: flex;
    justify-content: center;
}
.poll-view-cover-img {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0.5rem;
    background: rgba(15, 70, 133, 0.08);
}
.poll-view-cover-wrap {
    max-height: 220px;
    overflow: hidden;
    border-radius: 0.5rem;
}
.poll-view-cover {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}
.poll-thanks-modal .poll-thanks-icon .fa-check-circle {
    font-size: 3rem;
}
.poll-reaction-buttons .poll-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.poll-reaction-emoji {
    font-size: 1.25rem;
    line-height: 1;
}
.poll-reaction-emoji--lg {
    font-size: 1.75rem;
}
.poll-card-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
}
.poll-card-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 70, 133, 0.08);
    font-size: 0.8125rem;
}
.poll-card-reaction-emoji {
    font-size: 1rem;
    line-height: 1;
}
.poll-card-reaction-count {
    font-weight: 600;
    color: #0f4685;
}
/* Инструкции в админке (светло-зелёный блок) */
.profile-admin-instruction,
.polls-admin-instruction {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 1rem 1.15rem 1.1rem;
    color: #14532d;
}
.profile-admin-instruction-title,
.polls-admin-instruction-title {
    color: #166534;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.profile-admin-instruction-subtitle,
.polls-admin-instruction-subtitle {
    color: #15803d;
    font-weight: 600;
    margin-top: 0.5rem;
}
.profile-admin-instruction-body,
.polls-admin-instruction-body {
    line-height: 1.55;
}
.profile-admin-instruction-body ul,
.profile-admin-instruction-body ol,
.polls-admin-instruction-body ul,
.polls-admin-instruction-body ol {
    padding-left: 1.25rem;
}
.profile-admin-instruction-body a,
.polls-admin-instruction-body a {
    color: #047857;
    font-weight: 600;
}
.profile-admin-instruction-body a:hover,
.polls-admin-instruction-body a:hover {
    color: #065f46;
}
.profile-admin-instruction-body code,
.polls-admin-instruction-body code {
    background: rgba(255, 255, 255, 0.65);
    color: #166534;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.92em;
}
body[data-theme="dark"] .profile-admin-instruction,
body[data-theme="dark"] .polls-admin-instruction {
    background: rgba(6, 78, 59, 0.25);
    border-color: rgba(52, 211, 153, 0.35);
    color: #d1fae5;
}
body[data-theme="dark"] .profile-admin-instruction-title,
body[data-theme="dark"] .polls-admin-instruction-title {
    color: #6ee7b7;
}
body[data-theme="dark"] .profile-admin-instruction-subtitle,
body[data-theme="dark"] .polls-admin-instruction-subtitle {
    color: #86efac;
}
body[data-theme="dark"] .profile-admin-instruction-body a,
body[data-theme="dark"] .polls-admin-instruction-body a {
    color: #6ee7b7;
}
body[data-theme="dark"] .profile-admin-instruction-body code,
body[data-theme="dark"] .polls-admin-instruction-body code {
    background: rgba(0, 0, 0, 0.25);
    color: #a7f3d0;
}

.poll-admin-cover-preview,
.poll-admin-question-preview {
    object-fit: cover;
}

.charts-form-control {
    min-width: 200px;
}
.charts-form-select {
    min-width: 180px;
}
.charts-per-page-select {
    width: auto;
    min-width: 5rem;
}

/* Графики и просмотр таблицы — мобильная вёрстка */
@media (max-width: 991.98px) {
    .charts-page .charts-search-filter-form {
        flex-direction: column;
        align-items: stretch !important;
    }
    .charts-page .charts-search-wrap,
    .charts-page .charts-filter-wrap,
    .charts-page .charts-per-page-wrap {
        width: 100%;
        max-width: 100%;
    }
    .charts-page .charts-form-control,
    .charts-page .charts-form-select,
    .charts-page .charts-per-page-select {
        min-width: 0 !important;
        width: 100%;
    }
    .charts-page .charts-per-page-wrap {
        flex-wrap: wrap;
    }
    .charts-page .charts-search-filter-form > .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .charts-page,
    .chart-view-page {
        text-align: start;
    }
    .chart-view-page .chart-export-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }
    .chart-view-page .chart-export-buttons .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 8rem;
    }
    .chart-view-page .chart-table {
        font-size: 0.8125rem;
    }
    .chart-view-page .chart-table th,
    .chart-view-page .chart-table td {
        padding: 0.1rem 0.25rem !important;
    }
}

/* Графики — узкие экраны: без горизонтального клипа, перенос длинных строк */
@media (max-width: 767.98px) {
    article.content:has(.charts-page),
    article.content:has(.chart-view-page) {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        overflow-x: hidden;
        text-align: left;
    }
    .charts-page,
    .chart-view-page {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .charts-page .requirements-intro {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .charts-page .charts-toolbar {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .charts-page .charts-cards-grid-3,
    .charts-page .charts-cards-grid-4,
    .charts-page .charts-cards-grid-5 {
        grid-template-columns: minmax(0, 1fr);
    }
    .charts-page .requirement-card-title,
    .charts-page .charts-card-title {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
        min-height: calc(1.35em * 3);
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .chart-view-page .chart-export-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .chart-view-page .chart-export-buttons .btn {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
}

/* Вопрос-ответ — мобильная вёрстка */
@media (max-width: 767.98px) {
    article.content:has(.faq-page),
    article.content:has(.faq-topic-page),
    article.content:has(.faq-item-page) {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        overflow-x: hidden;
        text-align: left;
    }
    .faq-page,
    .faq-topic-page,
    .faq-item-page {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .faq-page .list-group-item {
        flex-wrap: wrap;
        gap: 0.35rem 0.75rem;
        align-items: flex-start;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .faq-page .faq-topic-label {
        flex: 1 1 auto;
        min-width: 0;
    }
    .faq-topic-page .card-body .d-flex,
    .faq-item-page .card-header.d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
        min-width: 0;
    }
    .faq-topic-page .card-body .flex-grow-1 {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Вопрос-ответ — ширина как у «Оперативно» */
.faq-page,
.faq-topic-page,
.faq-item-page {
    max-width: var(--layout-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Вопрос-ответ — стиль как фотоальбом */
.faq-album-panel {
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
    border: 1px solid rgba(15, 70, 133, 0.12);
    box-shadow: 0 0.35rem 1.25rem rgba(15, 70, 133, 0.08);
    padding: 1.25rem 1.35rem;
}
.faq-album-panel--form {
    background: rgba(255, 255, 255, 0.85);
}
.faq-album-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.faq-album-panel__badges,
.faq-album-panel__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.faq-album-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.faq-album-panel__subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f4685;
}
.faq-album-panel__text {
    color: #3d4f63;
    line-height: 1.55;
}
.faq-album-panel__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.12);
    color: #0f4685;
    font-size: 0.85rem;
    font-weight: 600;
}
.faq-album-panel__chip--muted { color: #5a6b7d; }
.faq-album-panel__chip--closed { background: #f3f4f6; color: #495057; }
.faq-album-panel__chip--open { background: #e8f5e9; color: #2e7d32; border-color: rgba(46, 125, 50, 0.2); }
.faq-topic-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.12);
    box-shadow: 0 0.2rem 0.75rem rgba(15, 70, 133, 0.06);
    color: #0f4685;
    transition: box-shadow 0.2s, transform 0.2s;
}
.faq-topic-card:hover {
    box-shadow: 0 0.35rem 1rem rgba(15, 70, 133, 0.12);
    transform: translateY(-1px);
    color: #0a3566;
}
.faq-topic-card__title { font-weight: 600; }
.faq-question-card {
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.1);
    box-shadow: 0 0.2rem 0.75rem rgba(15, 70, 133, 0.06);
    position: relative;
    transition: box-shadow 0.2s;
}
.faq-question-card:hover { box-shadow: 0 0.35rem 1rem rgba(15, 70, 133, 0.12); }
.faq-question-card__body { padding: 1rem 1.1rem; }
.faq-question-card__text { color: #2c3e50; line-height: 1.5; }
.faq-answer-thread { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-answer-branch { min-width: 0; }
.faq-answer-branch--depth-1 { margin-left: 1rem; }
.faq-answer-branch--depth-2 { margin-left: 2rem; }
.faq-answer-branch--depth-3,
.faq-answer-branch--depth-4 { margin-left: 2.75rem; }
.faq-answer-children {
    margin-top: 0.65rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(15, 70, 133, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.faq-answer-card {
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 70, 133, 0.08);
    padding: 0.85rem 1rem;
}
.faq-answer-card__text { color: #3d4f63; line-height: 1.5; }
.faq-reactions { margin-top: 0.25rem; }
.faq-reaction-btn { padding: 0.15rem 0.45rem; font-size: 0.95rem; }
body[data-theme="dark"] .faq-album-panel {
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.18) 0%, rgba(10, 40, 80, 0.35) 100%);
    border-color: rgba(142, 185, 224, 0.15);
}
body[data-theme="dark"] .faq-album-panel__subtitle,
body[data-theme="dark"] .faq-album-panel__chip { color: #8eb9e0; }
body[data-theme="dark"] .faq-album-panel__chip { background: rgba(255,255,255,0.06); border-color: rgba(142,185,224,0.2); }
body[data-theme="dark"] .faq-album-panel__text,
body[data-theme="dark"] .faq-answer-card__text,
body[data-theme="dark"] .faq-question-card__text { color: rgba(220,230,240,0.9); }
body[data-theme="dark"] .faq-topic-card,
body[data-theme="dark"] .faq-question-card,
body[data-theme="dark"] .faq-answer-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(142,185,224,0.12);
    color: #8eb9e0;
}
body[data-theme="dark"] .faq-answer-children { border-left-color: rgba(142,185,224,0.2); }

/* Страница «О нас» / вкладки — мобильная вёрстка */
@media (max-width: 991.98px) {
    .about-page--tabs .about-page-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        justify-content: flex-start;
        gap: 0.5rem;
        padding-bottom: 8px;
        margin-bottom: 1rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    body[data-theme="dark"] .about-page--tabs .about-page-tabs {
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }
    .about-page--tabs .about-page-tabs .nav-item {
        flex: 0 0 auto;
    }
    .about-page--tabs .about-page-tabs .nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .about-page {
        text-align: start;
    }
    .about-tab-panel-inner {
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .about-tab-panel-inner img,
    .about-tab-panel-inner video,
    .about-tab-panel-inner svg {
        max-width: 100%;
        height: auto;
    }
    .about-tab-panel-inner iframe {
        max-width: 100%;
    }
    .about-tab-panel-inner table {
        max-width: 100%;
    }
    .about-tab-panel-inner pre {
        overflow-x: auto;
        max-width: 100%;
    }
}

/* Страница просмотра графика — компактная таблица */
.chart-view-page .chart-table {
    font-size: 0.875rem;
    line-height: 1.15;
    margin-bottom: 0;
}
.chart-view-page .chart-table > :not(caption) > * > * {
    padding: 0.15rem 0.35rem;
}
.chart-view-page .chart-table thead th {
    padding: 0.25rem 0.35rem !important;
    vertical-align: middle;
    white-space: nowrap;
}
.chart-view-page .chart-table td {
    padding: 0.12rem 0.3rem !important;
    vertical-align: middle;
    line-height: 1.15;
}
.chart-view-page .chart-table .chart-cell-editable {
    display: block;
    min-height: 0;
    line-height: 1.15;
    padding: 0;
    margin: 0;
}

/* Страница просмотра графика — таблица */
body[data-theme="dark"] .chart-view-page .chart-table,
body[data-theme="dark"] .chart-view-page .chart-table td,
body[data-theme="dark"] .chart-view-page .chart-table th,
body[data-theme="dark"] .chart-view-page .chart-table .chart-cell-editable {
    color: #e0e6ed !important;
}
body[data-theme="dark"] .chart-view-page .chart-table td,
body[data-theme="dark"] .chart-view-page .chart-table th {
    background-color: #152238;
    border-color: rgba(142, 185, 224, 0.28) !important;
}
body[data-theme="dark"] .chart-view-page .chart-table thead th {
    background: #0F4685 !important;
    color: #fff !important;
}
body[data-theme="dark"] .chart-view-page .chart-table-wrap {
    background: transparent;
}
body[data-theme="dark"] .chart-view-page .chart-cell-td[style*="background"] {
    background: rgba(69, 162, 214, 0.18) !important;
    color: #e0e6ed !important;
}
body[data-theme="dark"] .chart-view-page--duty-timesheet .chart-duty-total,
body[data-theme="dark"] .chart-view-page--duty-timesheet td.chart-duty-total,
body[data-theme="dark"] .chart-view-page--duty-timesheet .chart-duty-total-head {
    background: #1e3a5f !important;
    color: #e8f1ff !important;
}
body[data-theme="dark"] .chart-view-page--duty-timesheet .chart-duty-mark {
    color: #7ec8ff !important;
}
body[data-theme="dark"] .chart-view-page--duty-timesheet .chart-duty-mark--today {
    color: #ff6b6b !important;
}
body[data-theme="dark"] .chart-view-page span[style*="color:#0F4685"],
body[data-theme="dark"] .chart-view-page .chart-cell-editable[style*="color:#0F4685"] {
    color: #7ec8ff !important;
}
body[data-theme="dark"] .chart-view-page .text-muted {
    color: #a8b8cc !important;
}
body[data-theme="dark"] .chart-view-page .chart-toolbar-row td {
    background: #1a2d47 !important;
    color: #e0e6ed !important;
}

/* Дополнительные блоки — тёмная тема */
body[data-theme="dark"] .tools-table-container {
    background: rgba(21, 34, 56, 0.5) !important;
}
body[data-theme="dark"] .tools-table td,
body[data-theme="dark"] .tools-table th,
body[data-theme="dark"] .tools-purpose,
body[data-theme="dark"] .tools-count { color: #e0e6ed !important; }
body[data-theme="dark"] .ruler-page .ruler-ref-section,
body[data-theme="dark"] .ruler-page .ruler-ref-table tr:nth-child(even),
body[data-theme="dark"] .ruler-page .ruler-size-row {
    background: rgba(21, 34, 56, 0.5) !important;
}
body[data-theme="dark"] .ruler-page .ruler-ref-table td,
body[data-theme="dark"] .ruler-page .ruler-size-label,
body[data-theme="dark"] .ruler-page .ruler-hint { color: #e0e6ed !important; }
body[data-theme="dark"] .defense-section,
body[data-theme="dark"] .defense-card,
body[data-theme="dark"] .defense-table,
body[data-theme="dark"] .defense-error-card,
body[data-theme="dark"] .defense-dress-card,
body[data-theme="dark"] .defense-dress-body {
    background: rgba(21, 34, 56, 0.5) !important;
}
body[data-theme="dark"] .defense-section p,
body[data-theme="dark"] .defense-list li,
body[data-theme="dark"] .defense-table td,
body[data-theme="dark"] .defense-card-body li,
body[data-theme="dark"] .defense-error-card li,
body[data-theme="dark"] .defense-dress-list li,
body[data-theme="dark"] .defense-dress-intro { color: #e0e6ed !important; }
body[data-theme="dark"] .defense-tip,
body[data-theme="dark"] .defense-dress-tip,
body[data-theme="dark"] .defense-dress-tip-female,
body[data-theme="dark"] .defense-dress-tip-male,
body[data-theme="dark"] .defense-dress-tip strong,
body[data-theme="dark"] .defense-dress-section h4 {
    background: rgba(15, 70, 133, 0.2) !important;
    color: #e0e6ed !important;
    border-left-color: rgba(69, 162, 214, 0.5) !important;
}
body[data-theme="dark"] .req-app-purpose-accent,
body[data-theme="dark"] .req-app-purpose-block .fa-quote-right,
body[data-theme="dark"] .ref-topics-accordion .fa-quote-right {
    color: #fff !important;
}
body[data-theme="dark"] .color-wheel-guide .section,
body[data-theme="dark"] .color-wheel-guide h2,
body[data-theme="dark"] .color-wheel-guide h3,
body[data-theme="dark"] .color-wheel-guide h4,
body[data-theme="dark"] .color-wheel-guide p,
body[data-theme="dark"] .color-wheel-guide li { color: #e8eef5 !important; }

/* Страницы «Дизайн» (ee.html, help-design-*) — тёмная тема */
body[data-theme="dark"] .design-page .design-block-desc { color: #c8d4e4 !important; }
body[data-theme="dark"] .design-page .design-block-card {
    background: rgba(21, 34, 56, 0.72) !important;
    border-color: rgba(69, 162, 214, 0.45) !important;
}
body[data-theme="dark"] .design-page .design-block-header .blockname,
body[data-theme="dark"] .design-page .design-block-header .blockname i {
    color: #8eb9e0 !important;
}
body[data-theme="dark"] .design-page .design-block-content {
    border-top-color: rgba(69, 162, 214, 0.25) !important;
}
body[data-theme="dark"] .design-page .main-container h1,
body[data-theme="dark"] .design-page #mig {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .design-page .textbox {
    background: rgba(21, 34, 56, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}
body[data-theme="dark"] .design-page .textbox h1,
body[data-theme="dark"] .design-page .textbox h2 {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .design-page .textbox > p,
body[data-theme="dark"] .design-page .textbox section > p {
    color: #d8e0eb !important;
}
body[data-theme="dark"] .design-page .textbox ul li,
body[data-theme="dark"] .design-page .textbox ol li {
    color: #d8e0eb !important;
}
body[data-theme="dark"] .design-page .color-model,
body[data-theme="dark"] .design-page .color-scheme {
    background: rgba(21, 34, 56, 0.65) !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .design-page .color-model h3,
body[data-theme="dark"] .design-page .color-scheme h3 {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .design-page .color-model p,
body[data-theme="dark"] .design-page .color-scheme p {
    color: #d8e0eb !important;
}
body[data-theme="dark"] .design-page .tip {
    background: rgba(15, 70, 133, 0.28) !important;
    border-left-color: rgba(69, 162, 214, 0.65) !important;
    color: #e0e6ed !important;
}
body[data-theme="dark"] .design-page .tip strong { color: #fff !important; }
body[data-theme="dark"] .design-page .tip code {
    background: rgba(0, 0, 0, 0.35);
    color: #ffb4a8;
    padding: 2px 6px;
    border-radius: 4px;
}
body[data-theme="dark"] .design-page .font-card {
    background: rgba(21, 34, 56, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
}
body[data-theme="dark"] .design-page .font-name {
    color: #8eb9e0 !important;
}
body[data-theme="dark"] .design-page .features {
    color: #b8c8dc !important;
}
body[data-theme="dark"] .design-page .font-sample {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #e8edf3 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .design-page .font-card p {
    color: #c8d4e4 !important;
}
body[data-theme="dark"] .design-page .example-box {
    background: rgba(15, 70, 133, 0.2) !important;
    border-left-color: rgba(69, 162, 214, 0.7) !important;
}
body[data-theme="dark"] .design-page .example-title {
    color: #8eb9e0 !important;
}
body[data-theme="dark"] .design-page .example-content {
    color: #d8e0eb !important;
}
body[data-theme="dark"] .design-page .example-content code {
    background: rgba(0, 0, 0, 0.35);
    color: #e8c4b8;
    padding: 2px 5px;
    border-radius: 3px;
}
body[data-theme="dark"] .design-page .highlight-red-bold {
    color: #ff8a7a !important;
}
body[data-theme="dark"] .design-page .step-header {
    color: #8eb9e0 !important;
}
body[data-theme="dark"] .design-page .image-caption {
    color: #a8b8cc !important;
}
body[data-theme="dark"] .design-page .section h2,
body[data-theme="dark"] .design-page .section h3,
body[data-theme="dark"] .design-page .section > p,
body[data-theme="dark"] .design-page .guidelines h3 {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .design-page .guideline-card {
    background: rgba(21, 34, 56, 0.72) !important;
    border-left-color: rgba(69, 162, 214, 0.65) !important;
}
body[data-theme="dark"] .design-page .guideline-card h3 {
    color: #e8eef5 !important;
}
body[data-theme="dark"] .design-page .guideline-card p,
body[data-theme="dark"] .design-page .section ul li,
body[data-theme="dark"] .design-page .section ol li {
    color: #d8e0eb !important;
}
/* Подписи на светлых образцах — тёмный текст (иначе нечитаемо на #fff / #f5f5f5) */
body[data-theme="dark"] .design-page .color-example-box[style*="#FFFFFF"] .color-example-label,
body[data-theme="dark"] .design-page .color-example-box[style*="#ffffff"] .color-example-label,
body[data-theme="dark"] .design-page .color-example-box[style*="#F5F5F5"] .color-example-label,
body[data-theme="dark"] .design-page .color-example-box[style*="#f5f5f5"] .color-example-label,
body[data-theme="dark"] .design-page .color-example-box[style*="#FAFAFA"] .color-example-label,
body[data-theme="dark"] .design-page .color-example-box[style*="#fafafa"] .color-example-label {
    color: #1a2332 !important;
}
body[data-theme="dark"] .design-page .color-box[style*="rgb(255, 255, 255)"] {
    color: #1a2332 !important;
    text-shadow: none !important;
}
body[data-theme="dark"] .design-page table th {
    background: rgba(15, 70, 133, 0.4) !important;
    color: #e8eef5 !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}
body[data-theme="dark"] .design-page table td {
    color: #d8e0eb !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}
body[data-theme="dark"] .design-page .good-example {
    background: rgba(40, 167, 69, 0.18) !important;
    color: #e0e6ed !important;
    border-left-color: #48c774 !important;
}
body[data-theme="dark"] .design-page .bad-example {
    background: rgba(220, 53, 69, 0.16) !important;
    color: #e0e6ed !important;
    border-left-color: #e85d6d !important;
}
body[data-theme="dark"] .design-page .gradient-box,
body[data-theme="dark"] .design-page .color-example-box {
    border-color: rgba(255, 255, 255, 0.18) !important;
}
body[data-theme="dark"] .design-page .background-box {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body[data-theme="dark"] .app-purpose-item {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
    border-left-color: var(--color-accent);
}
body[data-theme="dark"] .app-purpose-item-desc { color: rgba(255,255,255,0.75); }

/* Страницы «Назначение приложений» (app_purpose) — контент карточек */
.req-app-purpose-block { margin: 0; }
.req-app-purpose-intro {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 70, 133, 0.06);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
}
.req-app-purpose-intro p { margin: 0; line-height: 1.6; }
.req-app-purpose-accent {
    font-weight: 700;
    color: var(--color-primary);
}
.req-app-purpose-section {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}
.req-app-purpose-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}
.req-app-purpose-ico { color: #426ee6; font-size: 1em; }
.req-app-purpose-section p { margin: 0; line-height: 1.55; font-size: 0.95rem; }
.req-app-purpose-norm {
    background: #f0f7ff;
    border-color: #b8d4f0;
}
body[data-theme="dark"] .req-app-purpose-intro {
    background: rgba(15, 70, 133, 0.15);
    border-left-color: var(--color-accent);
}
body[data-theme="dark"] .req-app-purpose-accent { color: #5a9fd4; }
body[data-theme="dark"] .req-app-purpose-section {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}
body[data-theme="dark"] .req-app-purpose-norm {
    background: rgba(15, 70, 133, 0.12);
    border-color: rgba(69, 162, 214, 0.3);
}

/* Страницы «Общие требования» (app_requirements) — описание и примеры */
.req-app-req-block { margin: 0 0 1.5rem 0; }
.req-app-req-desc {
    margin-bottom: 1rem;
    line-height: 1.6;
}
.req-app-req-desc .req-app-purpose-accent { font-weight: 700; color: var(--color-primary); }
.req-app-req-ico { color: #426ee6; margin-right: 0.25rem; }
.req-app-req-block .example-container { margin-top: 0.5rem; }
.req-app-req-block .myprimer1 code,
.req-app-req-block .myprimer1 .req-app-code-sample {
    display: block;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    background: #f5f5f5;
    padding: 10px 12px;
    border-radius: 4px;
    border-left: 3px solid var(--color-primary);
    white-space: pre-wrap;
    margin-top: 6px;
    line-height: 1.5;
}
body[data-theme="dark"] .req-app-req-block .myprimer1 code,
body[data-theme="dark"] .req-app-req-block .myprimer1 .req-app-code-sample {
    background: rgba(0,0,0,0.3);
    border-left-color: var(--color-accent);
}

/* Страницы «ЭТАПЫ РАЗРАБОТКИ ПРЕЗЕНТАЦИИ» (pres_stages) */
.req-pres-step {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
}
.req-pres-step h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
}
.req-pres-step-ico { color: #426ee6; }
.req-pres-step p { margin: 0; line-height: 1.55; font-size: 0.95rem; }
.req-pres-step .req-app-purpose-accent { font-weight: 700; color: var(--color-primary); }
body[data-theme="dark"] .req-pres-step {
    background: rgba(255,255,255,0.04);
    border-left-color: var(--color-accent);
}

/* Изображения в разделах 2–4 презентаций */
.pres-example-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pres-pdf-embed embed {
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pres-pdf-embed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.pres-pdf-embed-grid .pres-pdf-embed {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}
.pres-pdf-embed-grid .pres-pdf-embed iframe {
    display: block;
    width: 100%;
    min-height: 360px;
}
@media (max-width: 768px) {
    .pres-pdf-embed-grid { grid-template-columns: 1fr; }
}

/* ========== Requirement 156: Электронные ресурсы (боковое меню) ========== */
.req156-dopdoc-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 500px;
    margin-top: 1rem;
}
@media (max-width: 992px) {
    .req156-dopdoc-layout { grid-template-columns: 1fr; }
}
.req156-nav {
    background: #f0f4f8;
    border-right: 1px solid #dee2e6;
    padding: 0;
}
.req156-nav-header {
    background: transparent;
    color: #333;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.req156-nav-header i { font-size: 1.2em; }
.req156-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 12px 18px;
    border: none;
    border-bottom: 1px solid #dee2e6;
    background: #e8eef5;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}
.req156-nav-item:hover { background: #d0dceb; }
.req156-nav-item.active { background: #0F4685; color: white; }
.req156-content { padding: 24px; background: #fff; }
.req156-panel { display: none; }
.req156-panel.active { display: block; }
.req156-requirements {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
}
.req156-requirements h4 {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    color: #1565c0;
}
.req156-block-body ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.req156-block-body li { margin-bottom: 0.5rem; }
.req156-block-body code {
    background: rgba(0,0,0,0.06);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
/* Логины и пароли обязательных пользователей в блоке «Пользователи системы» */
.req156-block-body .req-user-credential,
.req-system-content-block-body .req-user-credential {
    color: #c0392b;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}
/* Количество дополнительных пользователей (курсовая/диплом) */
.req156-block-body .req-extra-count,
.req-system-content-block-body .req-extra-count {
    color: #2980b9;
    font-weight: 700;
}
body[data-theme="dark"] .req156-block-body .req-user-credential,
body[data-theme="dark"] .req-system-content-block-body .req-user-credential { color: #e74c3c; }
body[data-theme="dark"] .req156-block-body .req-extra-count,
body[data-theme="dark"] .req-system-content-block-body .req-extra-count { color: #3498db; }
body[data-theme="dark"] .req156-nav { background: rgba(0,0,0,0.2); }
body[data-theme="dark"] .req156-nav-item { background: rgba(255,255,255,0.05); }
body[data-theme="dark"] .req156-nav-item.active { background: #0d3a6d; }

/* ========== Diploma: самоконтроль (таблица отработки) ========== */
.diploma-selfcheck-wrap { margin-top: 1rem; }
.diploma-selfcheck-collapse-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}
.diploma-selfcheck-collapse-header:hover { background: #dee2e6; }
.diploma-selfcheck-chevron {
    transition: transform 0.2s;
    color: #0F4685;
}
.diploma-selfcheck-badge {
    margin-left: auto;
    font-size: 0.85rem;
    color: #6c757d;
}
.diploma-selfcheck-table .diploma-selfcheck-pct { max-width: 100px; }
.diploma-selfcheck-warning { margin-top: 1rem; }

/* ========== Страница «Курсовые» ========== */
.course-features-list {
    margin: 1rem 0 1.5rem 1.5rem;
    padding-left: 1rem;
}

.course-features-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.course-brief-instruction {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
}
body[data-theme="dark"] .course-brief-instruction {
    background: rgba(15, 70, 133, 0.25);
    border-left-color: rgba(69, 162, 214, 0.6);
    color: #e0e6ed;
}

/* ========== Страница «Демоэкзамен» ========== */
.de-info-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.de-info-col {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.de-col-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
}

.de-col-title i {
    margin-right: 8px;
}

.de-col-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.de-col-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.de-col-list li i {
    color: var(--color-primary);
    min-width: 20px;
}

.de-internet-supplement {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}
.de-supplement-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
}
.de-supplement-title i {
    margin-right: 8px;
}
.de-internet-supplement p {
    margin: 0 0 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.5;
}
.de-internet-supplement p i:first-child {
    position: absolute;
    left: 0;
}
.de-internet-supplement p:last-child {
    margin-bottom: 0;
}
body[data-theme="dark"] .de-internet-supplement {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

.de-participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.de-participant-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.de-participant-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
    flex-shrink: 0;
}

.de-participant-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.de-participant-title-wrap {
    min-height: 2.6em;
}
.de-participant-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 0;
}

.de-participant-desc {
    flex: 1;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.de-participant-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    flex-shrink: 0;
}

.de-btn-equal {
    flex: 1;
    min-width: 0;
}

.de-btn-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.de-participant-detail {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
    font-size: 0.9rem;
}

.de-participant-detail h4 {
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
}

.de-participant-detail p {
    margin: 0;
    line-height: 1.5;
}

.de-abbrev {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}
body[data-theme="dark"] .de-abbrev {
    background: rgba(15, 70, 133, 0.25) !important;
    color: #e0e6ed;
}

/* Алгоритм — раскрывающиеся пункты */
.de-algorithm-accordion {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.de-alg-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.de-alg-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: background 0.2s;
}

.de-alg-header:hover {
    background: #e9ecef;
}

.de-alg-header:not(.collapsed) {
    background: #e7f1ff;
    border-bottom: 1px solid #dee2e6;
}

.de-alg-num {
    flex-shrink: 0;
    font-weight: bold;
    color: var(--color-primary);
    min-width: 28px;
}

.de-alg-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.de-alg-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--color-primary);
}

.de-alg-header:not(.collapsed) .de-alg-chevron {
    transform: rotate(180deg);
}

.de-alg-body {
    border-top: none;
}

.de-alg-content {
    padding: 14px 16px 14px 44px;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fff;
}

/* Алгоритм — 5 блоков с кнопкой «Подробнее» */
.de-algorithm-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.de-alg-block-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.de-alg-block-card:hover {
    border-color: var(--color-primary, #0f4685);
    box-shadow: 0 4px 12px rgba(15, 70, 133, 0.12);
}
.de-alg-block-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}
.de-alg-block-icon {
    font-size: 1.75rem;
    color: var(--color-primary, #0f4685);
    flex-shrink: 0;
}
.de-alg-block-title-wrap {
    min-height: 2.6em;
}
.de-alg-block-title {
    font-size: 1.05rem;
    font-weight: bold;
    margin: 0 0 2px 0;
}
.de-alg-block-subtitle { font-size: 0.85rem; }
.de-alg-block-desc {
    flex: 1;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.de-alg-block-btn {
    margin-top: auto;
    flex-shrink: 0;
}

/* Страница подробного содержания блока алгоритма */
.demoexam-algo-page .de-algo-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.demoexam-algo-page .de-algo-detail-icon {
    font-size: 2.5rem;
    color: var(--color-primary, #0f4685);
}
.demoexam-algo-page .de-algo-detail-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}
.demoexam-algo-page .de-algo-detail-subtitle { font-size: 1rem; }
.demoexam-algo-page .de-algo-detail-content h4 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem 0;
    color: var(--color-primary, #0f4685);
}
.demoexam-algo-page .de-algo-detail-content h4:first-child { margin-top: 0; }
.demoexam-algo-page .de-algo-detail-content p {
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}
.demoexam-algo-page .de-algo-detail-content ul {
    margin: 0.5rem 0 1rem 1.25rem;
    padding: 0;
}
.demoexam-algo-page .de-algo-detail-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
body[data-theme="dark"] .de-alg-block-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .de-alg-block-card:hover {
    border-color: rgba(142,185,224,0.5);
}
body[data-theme="dark"] .de-alg-block-desc { color: rgba(255,255,255,0.7); }

/* Запрещённые действия — квадратные мини-карточки */
.de-forbidden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.de-forbidden-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fff3cd;
    border: 2px solid #dc3545;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #856404;
}

.de-forbidden-card:hover {
    background: #ffe69c;
    border-color: #bb2d3b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220,53,69,0.2);
}

.de-forbidden-icon {
    font-size: 1.5rem;
    color: #dc3545;
}

.de-forbidden-label {
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.de-grading-scale {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-left: 4px solid var(--color-primary);
    border-radius: 4px;
}

.de-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.de-module-card {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
}

.de-module-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--color-accent);
}

.de-module-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.de-module-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}

.de-module-desc {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    margin-bottom: 1rem;
}

.de-module-btn {
    align-self: flex-start;
    margin-top: auto;
}

.de-task-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Блок задания модуля 1 — образец ГИА ДЭ БУ */
.de-task-block {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.6;
}
.de-task-block-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--color-primary, #0f4685);
    margin: 0 0 0.5rem 0;
}
.de-task-block-title i {
    margin-right: 8px;
}
.de-task-module-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 1rem 0;
}
.de-task-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 1rem 0 0.5rem 0;
}
.de-task-block p {
    margin: 0 0 0.75rem 0;
}
.de-task-role-list {
    margin: 0.5rem 0 1rem 1.25rem;
    padding: 0;
    list-style: none;
}
.de-task-role-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.5rem;
}
.de-task-role-list li i {
    flex-shrink: 0;
    margin-top: 2px;
}
.de-task-materials {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}
.de-task-materials-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}
.de-task-materials-title i {
    margin-right: 8px;
}
.de-task-material-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.de-task-material-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
body[data-theme="dark"] .de-task-block {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .de-task-module-title { color: rgba(255,255,255,0.9); }
body[data-theme="dark"] .de-task-materials { border-color: rgba(255,255,255,0.15); }

/* Списки в content (ol/ul) — вторая часть выделяется */
.de-content-list { margin: 0.75rem 0; padding-left: 1.5rem; }
.de-content-list li { margin-bottom: 0.4rem; }

/* Список определений dl */
.de-definition-list { margin: 0.75rem 0; }
.de-definition-list .de-dl-term { font-weight: bold; color: #0F4685; margin-top: 0.5rem; margin-bottom: 0.2rem; }
.de-definition-list .de-dl-term:first-child { margin-top: 0; }
.de-definition-list .de-dl-def {
    margin: 0 0 0.5rem 0; padding: 0.5rem 0.75rem;
    border: 1px solid #0F4685; border-radius: 6px;
    background: #e8f5e9; /* бледно-зелёный */
}

.de-inline-img { max-width: 100%; height: auto; border-radius: 4px; }

/* Карточки требований: списки и изображения в контенте */
.req-inline-img { max-width: 100%; height: auto; border-radius: 4px; }
/* Пагинация шаблона ТЗ — высота по рисунку примера (690px) */
.req-tz-template-paginated { position: relative; }
.req-tz-template-pages { position: relative; min-height: 690px; }
.req-tz-template-page {
    display: none;
    max-height: 690px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}
.req-tz-template-page.active { display: block; }
.req-tz-template-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
    padding: 8px 0;
}
.req-tz-template-pagination .req-tz-page-info { font-size: 0.9em; color: #555; }
.req-tz-template-pagination .req-tz-prev,
.req-tz-template-pagination .req-tz-next { min-width: 100px; }
body[data-theme="dark"] .req-tz-template-page {
    background: rgba(30, 35, 45, 0.6);
    border-color: #444;
}
body[data-theme="dark"] .req-tz-template-pagination .req-tz-page-info { color: #aaa; }

.req-content-list { margin: 0.75rem 0; padding-left: 1.5rem; }
.req-content-list li { margin-bottom: 0.4rem; }
.req-definition {
    padding: 12px 16px;
    border-left: 4px solid #0f4685;
    background: rgba(15, 70, 133, 0.06);
    border-radius: 0 6px 6px 0;
    font-size: 0.95em;
    line-height: 1.5;
}
body[data-theme="dark"] .req-definition {
    background: rgba(142, 185, 224, 0.08);
    border-left-color: #5a9fd4;
}
.req-definition-list { margin: 0.75rem 0; }
.req-definition-list .req-dl-term { font-weight: bold; color: #0F4685; margin-top: 0.5rem; margin-bottom: 0.2rem; }
.req-definition-list .req-dl-term:first-child { margin-top: 0; }
.req-definition-list .req-dl-def {
    margin: 0 0 0.5rem 0; padding: 0.5rem 0.75rem;
    border: 1px solid #0F4685; border-radius: 6px;
    background: #e8f5e9;
}
body[data-theme="dark"] .req-definition-list .req-dl-def {
    background: rgba(46, 125, 50, 0.2);
    border-color: rgba(15, 70, 133, 0.6);
}

body[data-theme="dark"] .de-definition-list .de-dl-def {
    background: rgba(46, 125, 50, 0.2);
    border-color: rgba(15, 70, 133, 0.6);
}

body[data-theme="dark"] .de-info-col,
body[data-theme="dark"] .de-participant-card,
body[data-theme="dark"] .de-module-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

body[data-theme="dark"] .de-participant-detail {
    background: rgba(0,0,0,0.2);
}

body[data-theme="dark"] .de-alg-item {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
}

body[data-theme="dark"] .de-alg-header {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

body[data-theme="dark"] .de-alg-header:hover {
    background: rgba(255,255,255,0.1);
}

body[data-theme="dark"] .de-alg-header:not(.collapsed) {
    background: rgba(15,70,133,0.3);
    border-color: rgba(255,255,255,0.1);
}

body[data-theme="dark"] .de-alg-content {
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.85);
}

body[data-theme="dark"] .de-forbidden-card {
    background: rgba(255,193,7,0.15);
    border-color: rgba(220,53,69,0.6);
    color: rgba(255,255,255,0.9);
}

body[data-theme="dark"] .de-forbidden-card:hover {
    background: rgba(255,193,7,0.25);
}

/* ========== Страница «Балл реферата» ========== */
.criteria-referat-page .requirements-main-title,
.criteria-presentation-page .requirements-main-title,
.criteria-diploma-page .requirements-main-title,
.criteria-course-page .requirements-main-title {
    margin-bottom: 1.5rem;
}

.criteria-penalties {
    font-size: 0.9rem;
    color: #856404;
    margin-top: 0.5rem;
}

.criteria-section {
    margin-bottom: 2.5rem;
}

.criteria-section-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background: var(--color-primary);
    padding: 12px 16px;
    margin: 0 0 1rem 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.criteria-section-title i {
    opacity: 0.9;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.criteria-table thead {
    background: var(--color-primary);
    color: #fff;
}

.criteria-th-criterion {
    padding: 12px 16px;
    text-align: left;
    font-weight: bold;
    width: 22%;
}

.criteria-th-score {
    padding: 10px 12px;
    text-align: center;
    font-weight: bold;
    font-size: 0.95rem;
}

.criteria-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.criteria-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.criteria-table tbody tr:hover {
    background: #f0f9ff;
}

.criteria-td-criterion {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--color-primary);
    vertical-align: top;
}

.criteria-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Страница «Критерии» — сравнение систем оценивания */
.criteria-main-page .criteria-notations {
    margin-bottom: 2rem;
}
.criteria-notation-list {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
    line-height: 1.8;
}
.criteria-notation-list li {
    margin-bottom: 0.35rem;
}
.criteria-comparison-section {
    margin-bottom: 2.5rem;
}
.criteria-nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.criteria-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.criteria-nav-btn:hover {
    background: var(--color-primary-hover, #1a5a9e);
    color: #fff !important;
}
.criteria-nav-btn i {
    font-size: 1.1rem;
}
@media (max-width: 768px) {
    .criteria-nav-buttons { flex-direction: column; }
    .criteria-nav-btn { justify-content: center; }
}

.criteria-final .criteria-section-title {
    margin-bottom: 1rem;
}

.criteria-grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.criteria-grade-item {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
}

.criteria-grade-range {
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.criteria-grade-mark {
    font-size: 1.1rem;
}

.criteria-referat-code-form {
    max-width: 500px;
    margin: 0 auto 2rem;
    padding: 1.25rem;
    background: rgba(15, 70, 133, 0.06);
    border-radius: 8px;
}

.criteria-referat-code-form .input-group {
    display: flex;
    gap: 0.5rem;
}

.criteria-referat-code-form .form-control {
    flex: 1;
}

.criteria-referat-eval-block .eval-participant-info,
.criteria-referat-eval-block .eval-result-box,
.criteria-referat-eval-block .eval-actions {
    margin-bottom: 1.5rem;
}

.criteria-table-eval .criteria-td-score {
    vertical-align: top;
}

.criteria-table-eval .criteria-cell-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin: 0;
}

.criteria-table-eval .criteria-cell-label input[type="radio"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.criteria-table-eval .criteria-cell-label:hover {
    color: var(--color-primary);
}

.criteria-table-eval tbody tr:has(.criteria-cell-label input:checked) {
    background: rgba(15, 70, 133, 0.08) !important;
}

body[data-theme="dark"] .criteria-table {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
}

body[data-theme="dark"] .criteria-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

body[data-theme="dark"] .criteria-table tbody tr:hover {
    background: rgba(15,70,133,0.2);
}

body[data-theme="dark"] .criteria-grade-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

/* Фотоархив (публичная страница) — ширина как у «Оперативно» */
.photo-archive-page {
    max-width: var(--layout-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.photo-archive-page .photo-archive-filters .news-filter-item-wide:first-child {
    flex: 1 1 14rem;
    min-width: 12rem;
}
@media (max-width: 767.98px) {
    .photo-archive-page .photo-archive-filters .news-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .photo-archive-page .photo-archive-filters .news-filter-item,
    .photo-archive-page .photo-archive-filters .news-filter-item-wide {
        width: 100%;
    }
    .photo-archive-page .photo-archive-filters .news-filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.photo-archive-page .photo-archive-album-cover {
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: rgba(15, 70, 133, 0.08);
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
}
.photo-archive-page .photo-archive-album-cover__icon {
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    min-width: 0;
}
.photo-archive-page .photo-archive-album-cover__thumbs {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0.4rem 0.4rem 0.4rem 0;
    min-width: 0;
}
.photo-archive-page .photo-archive-album-cover__thumb {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
    border-radius: 0.35rem;
    background: rgba(15, 70, 133, 0.12);
}
.photo-archive-page .photo-archive-album-cover__thumb--empty {
    background: rgba(15, 70, 133, 0.1);
}
.photo-archive-page .photo-archive-album-cover img:not(.photo-archive-album-icon) {
    object-fit: cover;
    display: block;
}
.photo-archive-page .photo-archive-album-icon {
    width: 92%;
    max-width: 11.5rem;
    height: auto;
    min-height: 0 !important;
    flex-shrink: 0;
    object-fit: contain !important;
    opacity: 0.95;
}
.photo-archive-page .photo-archive-album-count-badge {
    position: absolute;
    left: 52%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0 0.4rem;
    border-radius: 50%;
    background: #0f4685;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    line-height: 2.35rem;
    box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(15, 70, 133, 0.35);
}
.photo-archive-page .photo-archive-album-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    color: #0F4685;
    font-size: 2.5rem;
}
.photo-archive-page .photo-archive-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
.photo-archive-page .photo-archive-album-card {
    --pa-card-title-lh: 1.3;
    --pa-card-title-lines: 2;
    --pa-card-snippet-lh: 1.45;
    --pa-card-snippet-lines: 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 1px 2px rgba(15, 70, 133, 0.07),
        0 3px 8px rgba(15, 70, 133, 0.08),
        0 8px 20px rgba(15, 70, 133, 0.1),
        0 0 0 1px rgba(15, 70, 133, 0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.photo-archive-page .photo-archive-album-card:hover {
    box-shadow:
        0 2px 4px rgba(15, 70, 133, 0.08),
        0 6px 16px rgba(15, 70, 133, 0.12),
        0 14px 32px rgba(15, 70, 133, 0.14),
        0 0 0 1px rgba(15, 70, 133, 0.06) !important;
    transform: translateY(-3px);
}
.photo-archive-page .photo-archive-album-cover-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.photo-archive-page .photo-archive-album-cover-link:hover .photo-archive-album-icon {
    opacity: 1;
    transform: scale(1.03);
}
.photo-archive-page .photo-archive-album-cover-link .photo-archive-album-icon {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.photo-archive-page .photo-archive-album-card__body {
    --pa-card-padding-x: 1.3rem;
    padding: 1rem var(--pa-card-padding-x) 1.15rem;
    gap: 0.65rem;
}
.photo-archive-page .photo-archive-album-card__head {
    padding-bottom: 0.55rem;
    margin-bottom: 0.1rem;
    border-bottom: 1px solid rgba(15, 70, 133, 0.1);
}
.photo-archive-page .photo-archive-album-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: var(--pa-card-title-lh);
    color: #0f4685;
    min-height: calc(var(--pa-card-title-lh) * 1em * var(--pa-card-title-lines));
}
.photo-archive-page .photo-archive-album-card__title-link {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: var(--pa-card-title-lines);
    line-clamp: var(--pa-card-title-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(var(--pa-card-title-lh) * 1em * var(--pa-card-title-lines));
    word-break: break-word;
}
.photo-archive-page .photo-archive-album-card__title-link:hover {
    color: #1a5fad;
    text-decoration: underline;
}
.photo-archive-page .photo-archive-album-card__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}
.photo-archive-page .photo-archive-album-card__rating-stars {
    display: inline-flex;
    gap: 0.1rem;
    color: #e8a317;
    font-size: 0.9rem;
    line-height: 1;
}
.photo-archive-page .photo-archive-album-card__rating-stars .far.fa-star {
    color: #c5d0dc;
}
.photo-archive-page .photo-archive-album-card__rating-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f4685;
    line-height: 1;
}
.photo-archive-page .photo-archive-album-card__rating-votes {
    font-size: 0.8rem;
    color: #5a6b7d;
    font-weight: 500;
}
.photo-archive-page .photo-archive-album-card__rating-votes--empty {
    font-style: italic;
    opacity: 0.85;
}
.photo-archive-page .photo-archive-album-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #5a6b7d;
}
.photo-archive-page .photo-archive-album-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.photo-archive-page .photo-archive-album-card__meta-item i {
    width: 1rem;
    text-align: center;
    color: #0f4685;
    opacity: 0.75;
}
.photo-archive-page .photo-archive-album-card__reactions {
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f4f9ff 0%, #eef4fc 100%);
    border: 1px solid rgba(15, 70, 133, 0.1);
}
.photo-archive-page .photo-archive-album-card__reactions-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.15rem;
    margin-bottom: 0.3rem;
}
.photo-archive-page .photo-archive-album-card__reactions-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f4685;
}
.photo-archive-page .photo-archive-album-card__reactions-total {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5a6b7d;
}
.photo-archive-page .photo-archive-album-card__reactions-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    min-height: 1.45rem;
}
.photo-archive-page .photo-archive-album-card__snippet-wrap {
    min-height: calc(var(--pa-card-snippet-lh) * 1em * var(--pa-card-snippet-lines));
    flex-shrink: 0;
}
.photo-archive-page .photo-archive-album-card__snippet {
    margin: 0;
    font-size: 0.8rem;
    line-height: var(--pa-card-snippet-lh);
    color: #6b7c8f;
    display: -webkit-box;
    -webkit-line-clamp: var(--pa-card-snippet-lines);
    line-clamp: var(--pa-card-snippet-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(var(--pa-card-snippet-lh) * 1em * var(--pa-card-snippet-lines));
    word-break: break-word;
}
.photo-archive-page .photo-archive-album-card .photo-archive-reaction-total-badge--compact {
    flex: 0 0 auto;
    padding: 0.1rem 0.32rem;
    font-size: 0.7rem;
    line-height: 1.15;
    white-space: nowrap;
}
.photo-archive-page .photo-archive-album-card .photo-archive-reaction-total-badge--compact strong {
    font-size: 0.7rem;
    font-weight: 700;
}
.photo-archive-reaction-total-badge--compact {
    flex-shrink: 0;
    padding: 0.15rem 0.4rem;
    font-size: 0.78rem;
    white-space: nowrap;
}
.photo-archive-page .photo-archive-album-view-btn {
    min-width: 100%;
    font-weight: 600;
    border-radius: 0.45rem;
    margin-top: 0.25rem !important;
}
.photo-archive-page .photo-archive-figure {
    display: flex;
    flex-direction: column;
}
.photo-archive-page .photo-archive-photo-reactions {
    margin-top: auto;
    border-top: 1px solid rgba(15, 70, 133, 0.08);
}
.photo-archive-page .photo-archive-reaction-btn {
    padding: 0.15rem 0.45rem;
    font-size: 0.95rem;
}
.photo-archive-page .photo-archive-reaction-sum strong {
    color: #0f4685;
}
.photo-archive-album-reactions-totals {
    gap: 0.5rem;
}
.photo-archive-reaction-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #f0f7ff;
    border: 1px solid rgba(15, 70, 133, 0.15);
    font-size: 0.95rem;
    color: #0f4685;
}
.photo-archive-page .photo-archive-grid [id^="photo-"] {
    scroll-margin-top: 6rem;
}
.photo-archive-page .photo-archive-album-views {
    color: #5a6b7d;
}
.photo-archive-page .photo-archive-albums-grid .photo-archive-album-card__body.card-body {
    padding: 1rem var(--pa-card-padding-x, 1.3rem) 1.15rem;
}
@media (min-width: 992px) {
    .photo-archive-page .photo-archive-albums-grid .photo-archive-album-icon {
        width: 78%;
        max-width: 10.5rem;
    }
}
body[data-theme="dark"] .photo-archive-page .photo-archive-photo-reactions {
    border-top-color: rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .photo-archive-reaction-total-badge {
    background: rgba(15, 70, 133, 0.25);
    border-color: rgba(142, 185, 224, 0.25);
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-page .photo-archive-reaction-sum strong {
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-placeholder {
    color: rgba(100, 160, 220, 0.9);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-cover {
    background: rgba(255, 255, 255, 0.06);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-cover__thumb,
body[data-theme="dark"] .photo-archive-page .photo-archive-album-cover__thumb--empty {
    background: rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-count-badge {
    background: #2a74c4;
    box-shadow: 0 0 0 3px #1a2332, 0 2px 8px rgba(0, 0, 0, 0.45);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__head {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__title,
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__rating-value {
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__title-link:hover {
    color: #b8d4f0;
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__rating-votes,
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__meta,
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__snippet {
    color: rgba(255, 255, 255, 0.65);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__reactions {
    background: rgba(15, 70, 133, 0.2);
    border-color: rgba(142, 185, 224, 0.15);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__reactions-label {
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card__reactions-total {
    color: rgba(255, 255, 255, 0.6);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card {
    background: var(--color-content-bg, #1a2840);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 10px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(142, 185, 224, 0.12);
}
body[data-theme="dark"] .photo-archive-page .photo-archive-album-card:hover {
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 16px 36px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* Панель информации об альбоме */
.photo-archive-album-panel {
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
    border: 1px solid rgba(15, 70, 133, 0.12);
    box-shadow: 0 0.35rem 1.25rem rgba(15, 70, 133, 0.08);
    padding: 1.25rem 1.35rem 1.1rem;
    scroll-margin-top: 6rem;
}
.photo-archive-album-panel__grid {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 992px) {
    .photo-archive-album-panel__grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.95fr);
        align-items: start;
    }
}
.photo-archive-album-panel__subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f4685;
    margin-bottom: 0.65rem;
}
.photo-archive-album-panel__desc {
    color: #3d4f63;
    margin-bottom: 0.85rem;
    line-height: 1.55;
}
.photo-archive-album-panel__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.photo-archive-album-panel__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.12);
    color: #0f4685;
    font-size: 0.85rem;
    font-weight: 600;
}
.photo-archive-album-panel__charts {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 0.85rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(15, 70, 133, 0.08);
}
.photo-archive-mini-chart__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6b7d;
    margin-bottom: 0.45rem;
}
.photo-archive-mini-chart__row {
    display: grid;
    grid-template-columns: 6.75rem 1fr 2rem;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}
.photo-archive-mini-chart__name {
    font-size: 0.78rem;
    color: #3d4f63;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-archive-mini-chart__bar-wrap {
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(15, 70, 133, 0.08);
    overflow: hidden;
}
.photo-archive-mini-chart__bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    min-width: 0;
    transition: width 0.25s ease;
}
.photo-archive-mini-chart__bar--reaction {
    background: linear-gradient(90deg, #3d7ec7, #0f4685);
}
.photo-archive-mini-chart__bar--rating {
    background: linear-gradient(90deg, #f0b429, #e09000);
}
.photo-archive-mini-chart__value {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f4685;
    text-align: right;
}
.photo-archive-mini-chart__empty {
    font-size: 0.8rem;
    color: #8a97a8;
    margin-bottom: 0;
}
.photo-archive-album-panel__aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.photo-archive-album-panel__rating,
.photo-archive-album-panel__reactions {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 0.85rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(15, 70, 133, 0.08);
}
.photo-archive-album-panel__avg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}
.photo-archive-album-panel__avg-stars {
    color: #e09000;
    letter-spacing: 0.05rem;
}
.photo-archive-album-panel__avg-text {
    font-size: 0.85rem;
    color: #5a6b7d;
    font-weight: 600;
}
.photo-archive-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
}
.photo-archive-star-rating__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.photo-archive-star-rating__label {
    cursor: pointer;
    margin: 0;
    color: #c5cdd8;
    transition: color 0.15s ease, transform 0.15s ease;
}
.photo-archive-star-rating__label:hover,
.photo-archive-star-rating__label.is-hover,
.photo-archive-star-rating__label:has(.photo-archive-star-rating__input:checked),
.photo-archive-star-rating__label:has(~ .photo-archive-star-rating__label .photo-archive-star-rating__input:checked) {
    color: #e09000;
}
.photo-archive-star-rating__label:hover {
    transform: scale(1.08);
}
.photo-archive-star-rating__icon {
    font-size: 1.35rem;
    pointer-events: none;
}
.photo-archive-album-panel__comments {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 70, 133, 0.1);
    scroll-margin-top: 6rem;
}
.photo-archive-album-panel__comments-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}
.photo-archive-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.photo-archive-comment-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 70, 133, 0.08);
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
}
.photo-archive-comment-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.photo-archive-comment-item__author {
    color: #0f4685;
}
.photo-archive-comment-item__text {
    color: #3d4f63;
    font-size: 0.92rem;
    line-height: 1.5;
}
body[data-theme="dark"] .photo-archive-album-panel {
    background: linear-gradient(135deg, rgba(15, 70, 133, 0.18) 0%, rgba(10, 40, 80, 0.35) 100%);
    border-color: rgba(142, 185, 224, 0.15);
    box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.25);
}
body[data-theme="dark"] .photo-archive-album-panel__subtitle {
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-album-panel__desc,
body[data-theme="dark"] .photo-archive-comment-item__text {
    color: rgba(220, 230, 240, 0.88);
}
body[data-theme="dark"] .photo-archive-album-panel__chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(142, 185, 224, 0.2);
    color: #8eb9e0;
}
body[data-theme="dark"] .photo-archive-album-panel__charts,
body[data-theme="dark"] .photo-archive-album-panel__rating,
body[data-theme="dark"] .photo-archive-album-panel__reactions,
body[data-theme="dark"] .photo-archive-comment-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(142, 185, 224, 0.12);
}
body[data-theme="dark"] .photo-archive-mini-chart__value,
body[data-theme="dark"] .photo-archive-comment-item__author {
    color: #8eb9e0;
}
/* Photo archive lightbox viewer */
.photo-modal-dialog {
    max-width: min(1100px, 96vw);
}
.photo-modal-content {
    overflow: hidden;
}
.photo-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.photo-modal-header__meta {
    min-width: 0;
    flex: 1 1 12rem;
}
.photo-modal-counter {
    display: inline-block;
    margin-top: 0.15rem;
}
.photo-modal-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.photo-modal-zoom-btn {
    min-width: 2.25rem;
    line-height: 1.2;
}
.photo-modal-body {
    position: relative;
    background: #0b0d10;
}
.photo-modal-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    max-height: 72vh;
    overflow: auto;
    padding: 1rem 3rem 2.5rem;
    touch-action: pan-y;
}
.photo-modal-stage.is-zoomed {
    justify-content: flex-start;
    align-items: flex-start;
}
.photo-modal-img {
    max-width: 100%;
    max-height: 68vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
}
.photo-modal-stage.is-zoomed .photo-modal-img {
    max-width: none;
    max-height: none;
}
.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.photo-modal-nav:hover,
.photo-modal-nav:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}
.photo-modal-nav:disabled {
    opacity: 0.35;
    cursor: default;
}
.photo-modal-nav--prev { left: 0.5rem; }
.photo-modal-nav--next { right: 0.5rem; }
.photo-modal-markers {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.65rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 3rem;
    pointer-events: none;
}
.photo-modal-marker {
    pointer-events: auto;
    width: 0.55rem;
    height: 0.55rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}
.photo-modal-marker.is-active,
.photo-modal-marker:hover {
    background: #fff;
}
.photo-modal-footer {
    background: #14171c;
}
.photo-modal-reactions .charts-card-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
@media (max-width: 575.98px) {
    .photo-modal-stage {
        padding: 0.75rem 2.5rem 2.25rem;
        max-height: 62vh;
        min-height: 40vh;
    }
    .photo-modal-img {
        max-height: 56vh;
    }
    .photo-modal-nav {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.4rem;
    }
}

body[data-theme="dark"] .photo-archive-album-panel__comments {
    border-top-color: rgba(142, 185, 224, 0.12);
}

/* Мероприятия */
.events-page .event-card .event-card-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
    background: rgba(15, 70, 133, 0.08);
    min-height: 160px;
}
.events-page .event-card .event-card-cover img {
    display: block;
    min-height: 160px;
}
.events-page .event-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #0F4685;
    font-size: 2.5rem;
}
.events-page .event-card:hover {
    box-shadow: 0 0.35rem 1rem rgba(15, 70, 133, 0.12) !important;
}
.event-detail-page .event-detail-cover {
    max-height: 420px;
    object-fit: cover;
}
body[data-theme="dark"] .events-page .event-card-cover-placeholder {
    color: rgba(100, 160, 220, 0.9);
}
body[data-theme="dark"] .events-page .event-card .event-card-cover {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 767.98px) {
    article.content:has(.events-page),
    article.content:has(.event-detail-page) {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        overflow-x: hidden;
        text-align: left;
    }
    .events-page,
    .event-detail-page {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .events-page {
        padding-top: 0.25rem !important;
        padding-bottom: 1rem !important;
    }
    .events-page .row {
        --bs-gutter-x: 0.75rem;
    }
    .events-page .row > [class*="col-"] {
        min-width: 0;
    }
    .events-page .event-card .event-card-cover {
        min-height: 140px;
    }
    .events-page .event-card .event-card-cover img {
        min-height: 140px;
    }
    .events-page .event-card .card-body .d-flex.flex-wrap.gap-2 {
        flex-direction: column;
        align-items: stretch;
    }
    .events-page .event-card .card-body .d-flex.flex-wrap.gap-2 > * {
        width: 100%;
        text-align: center;
    }
    .events-page .event-card .card-body form.d-inline {
        display: block !important;
        width: 100%;
    }
    .events-page .event-card .card-body form.d-inline .btn,
    .events-page .event-card .card-body .btn {
        width: 100%;
    }

    .event-detail-page {
        padding-top: 0.25rem !important;
        padding-bottom: 1rem !important;
    }
    .event-detail-page .row {
        min-width: 0;
    }
    .event-detail-page .row > [class*="col-"] {
        min-width: 0;
    }
    .event-detail-page .page-heading {
        margin-bottom: 0.75rem;
    }
    .event-detail-page .breadcrumb {
        flex-wrap: wrap;
        word-break: break-word;
        font-size: 0.85rem;
        padding: 0.5rem 0.65rem;
        border-radius: 0.375rem;
        background: rgba(15, 70, 133, 0.06);
    }
    body[data-theme="dark"] .event-detail-page .breadcrumb {
        background: rgba(255, 255, 255, 0.06);
    }
    .event-detail-page .breadcrumb-item {
        max-width: 100%;
    }
    .event-detail-page .breadcrumb-item.active {
        white-space: normal;
        word-break: break-word;
    }
    .event-detail-page .event-detail-cover {
        max-height: min(42vh, 300px);
        width: 100%;
        object-fit: cover;
    }
    .event-detail-body {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .event-detail-page .list-unstyled li {
        overflow-wrap: anywhere;
    }
    .event-detail-page .event-detail-body + .mb-4 .btn,
    .event-detail-page p.mb-4 .btn {
        width: 100%;
        max-width: 100%;
    }
    .event-detail-page ul.list-unstyled.mb-0 .btn {
        display: block;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    .event-detail-page #event-register .btn {
        width: 100%;
        max-width: 100%;
    }
    .event-detail-page #event-register form {
        width: 100%;
    }
    .event-detail-page .alert {
        font-size: 0.95rem;
    }
}

/* ========== Мобильная адаптация: общие улучшения ========== */
#wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.main .container {
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
    min-width: 0;
    max-width: min(90%, var(--layout-max-width));
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 576px) {
    .header-user-name {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .container {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    .content {
        padding: 0.45rem 0.85rem 1rem;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    article.content:has(.page-heading) {
        padding-top: 0;
    }

    .page-heading {
        margin-top: 0.4rem;
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        width: calc(100% + 1.7rem);
    }

    .main {
        padding: 0 0 1rem;
    }

    .home-page .home-slider-block {
        padding-left: 0;
        padding-right: 0;
    }

    .login-btn {
        min-height: 44px;
        padding: 10px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .theme-btn {
        width: 44px;
        height: 44px;
    }

    .header-search-input,
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 16px !important;
    }
}

/* Вкладки личного кабинета — горизонтальная прокрутка */
@media (max-width: 991.98px) {
    .profile-page .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 2px;
        padding-bottom: 4px;
        border-bottom-width: 2px;
    }

    .profile-page .nav-tabs .nav-item {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .profile-page .nav-tabs .nav-link {
        white-space: nowrap;
        margin-right: 0;
        padding: 0.55rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 6px 6px 0 0;
    }

    .profile-cabinet-layout,
    .profile-cabinet2 {
        flex-direction: column !important;
    }

    .profile-cabinet-layout .profile-sidebar,
    .profile-cabinet2 .profile-sidebar {
        flex: 1 1 100%;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        max-height: min(50vh, 320px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 6px;
    }

    .profile-cabinet-layout .profile-sidebar .list-group-item,
    .profile-cabinet2 .profile-sidebar .list-group-item {
        padding: 0.65rem 0.85rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .profile-cabinet-layout .profile-main,
    .profile-cabinet2 .profile-main {
        min-width: 0;
        padding-left: 0;
    }
    .profile-cabinet-layout .profile-main .profile-tab-content,
    .profile-cabinet2 .profile-main .profile-tab-content {
        padding-left: 0.5rem;
    }

    body[data-theme="dark"] .profile-cabinet-layout .profile-sidebar,
    body[data-theme="dark"] .profile-cabinet2 .profile-sidebar {
        border-color: rgba(69, 162, 214, 0.35);
    }
}

/* Таблицы и широкий контент */
.table-responsive,
.profile-page .table-responsive {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .btn-group,
    .d-flex.flex-wrap.gap-2 {
        gap: 0.35rem !important;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.35rem 0.65rem;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}

/* Карточки новостей / сетки */
@media (max-width: 576px) {
    .row.g-3,
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

/* ——— Календарь мероприятий ——— */
.events-calendar-table {
    width: 100%;
    overflow: hidden;
}

.events-calendar-table .row {
    margin-left: 0;
    margin-right: 0;
    flex-wrap: nowrap;
}

.events-calendar-table .row > .col {
    flex: 0 0 14.285714%;
    max-width: 14.285714%;
    min-width: 0;
}

.events-calendar-head-cell {
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(15, 70, 133, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.events-calendar-week + .events-calendar-week .events-calendar-day {
    border-top: none;
}

.events-calendar-day {
    min-height: 6.5rem;
    padding: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-right: none;
    vertical-align: top;
}

.events-calendar-week .events-calendar-day:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.events-calendar-day--empty {
    background: rgba(0, 0, 0, 0.02);
}

.events-calendar-day--no-events,
.events-calendar-week-col.events-calendar-empty-day,
.events-calendar-day--interactive {
    cursor: pointer;
}

.events-calendar-day--interactive:focus-visible {
    outline: 2px solid rgba(15, 70, 133, 0.45);
    outline-offset: -2px;
}

.events-calendar-day-view-body.events-calendar-empty-day {
    cursor: pointer;
    min-height: 6rem;
}

.events-calendar-day--no-events:hover,
.events-calendar-week-col.events-calendar-empty-day:hover,
.events-calendar-day-view-body.events-calendar-empty-day:hover {
    background: rgba(15, 70, 133, 0.04);
}

.events-calendar-day--today {
    background: rgba(15, 70, 133, 0.06);
    box-shadow: inset 0 0 0 2px rgba(15, 70, 133, 0.35);
}

.events-calendar-day--weekend,
.events-calendar-day--holiday {
    background: #d6ebff;
}

.events-calendar-day--weekend.events-calendar-day--no-events:hover,
.events-calendar-day--holiday.events-calendar-day--no-events:hover,
.events-calendar-week-col.events-calendar-empty-day.events-calendar-day--weekend:hover,
.events-calendar-week-col.events-calendar-empty-day.events-calendar-day--holiday:hover {
    background: #c8e2fb;
}

.events-calendar-day-num {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.25rem;
}

.events-calendar-day-event {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 4px;
    background: #0f4685;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.25;
    padding: 0.2rem 0.35rem;
    margin-bottom: 0.2rem;
    cursor: pointer;
}

.events-calendar-day-event:hover {
    background: #0a3568;
}

.events-calendar-day-event--holiday {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    color: #7b4f00;
    border: 1px solid #ffc107;
    font-weight: 600;
}

.events-calendar-day-event--holiday:hover {
    background: linear-gradient(135deg, #ffe082 0%, #ffd54f 100%);
    color: #5d4037;
}

.events-calendar-day-event-icon {
    margin-right: 0.2rem;
    font-size: 0.85em;
    vertical-align: -0.05em;
}

.events-calendar-day-event-time {
    opacity: 0.85;
    margin-right: 0.2rem;
}

.event-detail-modal-content {
    border-radius: 12px;
}

.events-calendar-controls {
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.2);
}

.events-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: center;
}

.events-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #0f4685;
}

.events-calendar-legend-bar {
    width: 4px;
    height: 1.25rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.events-calendar-legend-bar--holiday {
    background: linear-gradient(180deg, #ffe082, #ffc107);
}

.events-calendar-legend-icon {
    font-size: 0.9rem;
    opacity: 0.85;
}

.events-calendar-view-switch .btn {
    min-width: 4.5rem;
    font-weight: 600;
}

.events-calendar-period-label {
    color: #0f4685;
    font-weight: 700;
    white-space: nowrap;
}

.events-calendar-nav-pill {
    border-radius: 999px;
    font-weight: 600;
}

.events-calendar-week-head {
    background: #f0f4f8;
    border-bottom: 1px solid rgba(15, 70, 133, 0.15);
}

.events-calendar-week-col-head {
    padding: 0.5rem 0.35rem;
    text-align: center;
    border-right: 1px solid rgba(15, 70, 133, 0.12);
    color: #0f4685;
    font-weight: 600;
}

.events-calendar-week-col-head:last-child {
    border-right: none;
}

.events-calendar-week-col-head--today {
    background: #fff8e1;
}

.events-calendar-week-wd {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.events-calendar-week-dn {
    display: block;
    font-size: 1rem;
}

.events-calendar-week-body {
    min-height: 12rem;
}

.events-calendar-week-col {
    border-right: 1px solid rgba(15, 70, 133, 0.12);
    background: #fafbfd;
}

.events-calendar-week-col:last-child {
    border-right: none;
}

.events-calendar-week-col--today {
    background: #fffef5;
}

.events-calendar-week-col-head.events-calendar-day--weekend,
.events-calendar-week-col-head.events-calendar-day--holiday,
.events-calendar-week-col.events-calendar-day--weekend,
.events-calendar-week-col.events-calendar-day--holiday {
    background: #d6ebff;
}

.events-calendar-week-col.events-calendar-day--weekend.events-calendar-day--no-events:hover,
.events-calendar-week-col.events-calendar-day--holiday.events-calendar-day--no-events:hover {
    background: #c8e2fb;
}

.events-calendar-week-col-inner {
    padding: 0.5rem 0.35rem;
    min-height: 10rem;
}

.events-calendar-week-empty {
    margin: 0;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    font-style: italic;
    color: #6c757d;
}

.events-calendar-day-event--week {
    display: block;
    width: 100%;
    margin-bottom: 0.35rem;
    text-align: left;
}

.events-calendar-day-view-head {
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 70, 133, 0.12);
    color: #0f4685;
}

.events-calendar-day-view-body {
    padding: 1.25rem;
    background: #fafbfd;
}

.events-calendar-day-view-empty {
    font-style: italic;
    color: #6c757d;
}

.events-calendar-day-view-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.events-calendar-hour-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.events-calendar-hour-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.events-calendar-hour-row--all-day {
    background: rgba(15, 70, 133, 0.04);
    border-bottom-width: 2px;
}

.events-calendar-hour-row--empty .events-calendar-hour-empty {
    opacity: 0.55;
}

.events-calendar-hour-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f4685;
    padding-top: 0.15rem;
    white-space: nowrap;
}

.events-calendar-hour-events {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.events-calendar-day-event--hour-slot {
    width: 100%;
    text-align: left;
    white-space: normal;
}

.events-calendar-day-view-body--empty {
    min-height: 6rem;
}

.events-calendar-main {
    gap: 1rem;
}

.events-calendar-mobile-add {
    display: none;
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.events-calendar-day-event--day-list {
    display: block;
    width: 100%;
    max-width: 32rem;
    text-align: left;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .events-calendar-controls-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .events-calendar-view-switch {
        width: 100%;
        display: flex;
    }

    .events-calendar-view-switch .btn {
        flex: 1 1 33%;
    }

    .events-calendar-period-nav {
        width: 100%;
        justify-content: center;
    }

    .events-calendar-period-label {
        font-size: 1rem;
        text-align: center;
        white-space: normal;
    }

    .events-calendar-week-body {
        flex-direction: column;
    }

    .events-calendar-week-col,
    .events-calendar-week-col-head {
        border-right: none;
        border-bottom: 1px solid rgba(15, 70, 133, 0.12);
        flex: 0 0 100%;
        max-width: 100%;
    }

    .events-calendar-week-col:last-child,
    .events-calendar-week-col-head:last-child {
        border-bottom: none;
    }
}

.events-calendar-create {
    background: #f0f7ff;
    border: 1px solid rgba(15, 70, 133, 0.35);
    border-radius: 0.75rem;
}

.events-calendar-create-toggle {
    cursor: pointer;
    user-select: none;
    background: rgba(15, 70, 133, 0.06);
    border-bottom: 1px solid transparent;
}

.events-calendar-create-toggle:hover {
    background: rgba(15, 70, 133, 0.1);
}

.events-calendar-create-chevron {
    transition: transform 0.2s ease;
    color: #0F4685;
}

.events-calendar-create-toggle[aria-expanded="true"] .events-calendar-create-chevron {
    transform: rotate(180deg);
}

.events-calendar-create-title {
    color: #0f4685;
    font-weight: 700;
}

.events-calendar-create-optional-heading {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #5c6b7a;
}

.events-calendar-field-optional {
    font-size: 0.75em;
    font-weight: 400;
    color: #6c757d;
}

.events-calendar-attachments-row .form-control-sm {
    font-size: 0.8125rem;
}

.events-calendar-create-submit {
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
}
.event-file-preview-thumb {
    display: block;
    max-width: 120px;
    max-height: 90px;
    object-fit: cover;
    border-radius: 0.35rem;
    border: 1px solid rgba(15, 70, 133, 0.2);
}
.event-file-preview-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    background: #f1f5f9;
    color: #0F4685;
}

.events-calendar-recurrence {
    border: 1px dashed rgba(15, 70, 133, 0.25);
    border-radius: 0.5rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.65);
}

.events-calendar-weekday-chip {
    margin: 0;
}

.events-calendar-weekday-chip .btn-check:checked + .btn {
    background: #0f4685;
    border-color: #0f4685;
    color: #fff;
}

.events-calendar-weekday-chip .btn {
    min-width: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.event-team-picker-collapsed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.event-team-picker-summary {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.event-team-picker--compact {
    border: 1px solid rgba(15, 70, 133, 0.12) !important;
    border-radius: 0.5rem;
    background: #f8fafc !important;
}

.event-team-picker--compact .event-team-picker-head {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f4685;
    margin-bottom: 0.5rem;
}

.event-team-picker--compact .event-team-picker-list {
    max-height: 140px;
    overflow: auto;
}

.event-team-picker--compact .event-team-picker-item {
    margin-bottom: 0.15rem !important;
}

.event-team-picker--compact .form-select-sm,
.event-team-picker--compact .form-select {
    font-size: 0.875rem;
}

.event-team-picker--compact .event-team-picker-collapsed {
    gap: 0.35rem 0.5rem;
}

.event-team-picker--compact .event-team-picker-summary {
    font-size: 0.8125rem;
    line-height: 1.35;
}

.events-calendar-day-event--plan {
    font-weight: 600;
}

.events-calendar-day-event-status {
    float: right;
    font-size: 0.75rem;
    opacity: 0.9;
}

.events-calendar-day-event-mark {
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    font-size: 0.65rem;
    margin-left: 0.15rem;
}

.events-calendar-day-event-mark--completed {
    background: #198754;
    color: #fff;
}

.events-calendar-day-event-mark--rescheduled {
    background: #0d6efd;
    color: #fff;
}

.events-calendar-day-event-mark--excluded {
    background: #dc143c;
    color: #fff;
}

.events-calendar-day-event--has-status.events-calendar-day-event--plan {
    padding-right: 0.25rem;
}

.event-cal-modal-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-cal-plan-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #0f4685;
}

.event-cal-plan-meta-item i {
    margin-top: 0.15rem;
    opacity: 0.75;
}

.event-cal-plan-thumb {
    max-width: 140px;
    max-height: 100px;
    object-fit: cover;
    border: 1px solid rgba(15, 70, 133, 0.15);
}

.event-cal-modal-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.event-cal-modal-status--completed {
    background: #198754;
    color: #fff;
}

.event-cal-modal-status--rescheduled {
    background: #0d6efd;
    color: #fff;
}

.event-cal-modal-status--excluded {
    background: #dc143c;
    color: #fff;
}

.event-cal-status-section {
    border-top: 1px solid #e8eef5;
    padding-top: 1rem;
}

.event-cal-status-btn {
    border: 1px solid #adb5bd;
    background: #fff;
    color: #495057;
    border-radius: 0.35rem;
    flex: 1 1 auto;
    min-width: 7rem;
}

.event-cal-status-btn.active.event-cal-status-btn--completed {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.event-cal-status-btn.active.event-cal-status-btn--rescheduled {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.event-cal-status-btn.active.event-cal-status-btn--excluded {
    background: #dc143c;
    border-color: #dc143c;
    color: #fff;
}

.event-card-title {
    color: #0f4685;
    font-weight: 700;
}

.event-card-body--holiday .event-card-holiday-greeting,
.event-card-holiday-greeting {
    font-size: 1.08rem;
    line-height: 1.55;
    color: #0f4685;
    text-align: start;
}

.event-holiday-details .btn {
    font-weight: 600;
}

.home-it-holiday-card--focused {
    outline: 2px solid #426ee6;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(66, 110, 230, 0.18) !important;
}

.holiday-gallery-thumb,
.holiday-gallery-card-img,
.holiday-image-slot-preview-img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid rgba(15, 70, 133, 0.15);
    background: #f0f4fa;
}

.holiday-gallery-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 70, 133, 0.12);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    height: 100%;
}

.holiday-gallery-card--new {
    border-color: #198754;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
}

.holiday-gallery-card--used {
    border-color: rgba(15, 70, 133, 0.35);
}

.holiday-gallery-card--dup {
    border-color: rgba(255, 193, 7, 0.65);
}

.holiday-gallery-delete-form {
    margin-top: auto;
}

.holiday-gallery-card-caption {
    padding: 0.35rem 0.45rem 0.5rem;
    line-height: 1.3;
}

.holiday-image-slot-preview-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 4.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px dashed rgba(15, 70, 133, 0.25);
    border-radius: 0.375rem;
    background: rgba(15, 70, 133, 0.04);
}

.holiday-image-slot-preview-empty .bi {
    font-size: 1.5rem;
}

body[data-theme="dark"] .holiday-gallery-card,
body[data-theme="dark"] .holiday-image-slot-preview-empty {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .holiday-gallery-card-img,
body[data-theme="dark"] .holiday-image-slot-preview-img {
    background: rgba(0, 0, 0, 0.2);
}

.event-card-meta-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.event-card-meta-item i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.event-card-image {
    object-fit: cover;
    max-height: 320px;
}

body[data-theme="dark"] .events-calendar-day-event {
    background: #2a6cb8;
}

body[data-theme="dark"] .events-calendar-day--weekend,
body[data-theme="dark"] .events-calendar-day--holiday {
    background: rgba(120, 170, 220, 0.14);
}

body[data-theme="dark"] .events-calendar-day--weekend.events-calendar-day--no-events:hover,
body[data-theme="dark"] .events-calendar-day--holiday.events-calendar-day--no-events:hover {
    background: rgba(120, 170, 220, 0.22);
}

body[data-theme="dark"] .events-calendar-week-col-head.events-calendar-day--weekend,
body[data-theme="dark"] .events-calendar-week-col-head.events-calendar-day--holiday,
body[data-theme="dark"] .events-calendar-week-col.events-calendar-day--weekend,
body[data-theme="dark"] .events-calendar-week-col.events-calendar-day--holiday {
    background: rgba(120, 170, 220, 0.14);
}

body[data-theme="dark"] .events-calendar-week-col.events-calendar-day--weekend.events-calendar-day--no-events:hover,
body[data-theme="dark"] .events-calendar-week-col.events-calendar-day--holiday.events-calendar-day--no-events:hover {
    background: rgba(120, 170, 220, 0.22);
}

body[data-theme="dark"] .events-calendar-day-event--holiday {
    background: linear-gradient(135deg, #5d4037 0%, #8d6e63 100%);
    color: #fff8e1;
    border-color: #ffb74d;
}

body[data-theme="dark"] .events-calendar-day-event--holiday:hover {
    background: linear-gradient(135deg, #6d4c41 0%, #a1887f 100%);
}

body[data-theme="dark"] .events-calendar-head-cell {
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .event-card-title {
    color: #8ec5eb;
}

@media (max-width: 767.98px) {
    article.content:has(.events-calendar-page) {
        overflow-x: hidden;
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        padding-bottom: max(4.5rem, env(safe-area-inset-bottom, 0px));
    }

    .events-calendar-page {
        min-width: 0;
        max-width: 100%;
    }

    .events-calendar-main {
        gap: 0.75rem;
    }

    .events-calendar-create {
        display: block !important;
        margin-top: 0 !important;
    }

    .events-calendar-create-form .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .events-calendar-create-submit {
        width: 100%;
    }

    .events-calendar-mobile-add {
        display: inline-flex;
    }

    .events-calendar-hour-row {
        grid-template-columns: 3.25rem minmax(0, 1fr);
        gap: 0.5rem;
    }

    .events-calendar-day {
        min-height: 4.5rem;
        padding: 0.2rem;
    }

    .events-calendar-day-num {
        font-size: 0.7rem;
    }

    .events-calendar-day-event {
        font-size: 0.62rem;
        padding: 0.15rem 0.2rem;
    }

    .events-calendar-head-cell {
        font-size: 0.7rem;
        padding: 0.35rem 0.1rem;
    }
}

/* ========== Страница «Оперативно» ========== */
.operativ-page {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

.operativ-intro {
    margin-bottom: 1.25rem;
}

.operativ-duty-today {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 70, 133, 0.22);
    background: linear-gradient(135deg, #E8F4FF 0%, #F5FBFF 55%, #EEF8F4 100%);
    color: #143555;
    box-shadow: 0 1px 0 rgba(15, 70, 133, 0.06);
}

.operativ-duty-today__icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: rgba(15, 70, 133, 0.1);
    color: var(--color-primary);
    font-size: 1.05rem;
}

.operativ-duty-today__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    line-height: 1.35;
}

.operativ-duty-today__date {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-primary);
}

.operativ-duty-today__names {
    font-size: 0.98rem;
}

.operativ-duty-today__names strong {
    font-weight: 700;
    color: #0F4685;
}

body[data-theme="dark"] .operativ-duty-today {
    background: linear-gradient(135deg, #1c3352 0%, #18304c 60%, #1a3a45 100%);
    border-color: rgba(69, 162, 214, 0.28);
    color: #e0e6ed;
}

body[data-theme="dark"] .operativ-duty-today__icon {
    background: rgba(69, 162, 214, 0.15);
    color: var(--color-accent);
}

body[data-theme="dark"] .operativ-duty-today__date,
body[data-theme="dark"] .operativ-duty-today__names strong {
    color: #9fd3f0;
}

.operativ-tabs,
.comm-main-tabs {
    border-bottom: 2px solid var(--color-primary);
    background: #F0F7FF;
    padding: 0.35rem 0.35rem 0;
    border-radius: 0.75rem 0.75rem 0 0;
    gap: 0.25rem;
}
.operativ-tabs .nav-item,
.comm-main-tabs .nav-item {
    margin-bottom: -2px;
}
.operativ-tabs .nav-link,
.comm-main-tabs .nav-link {
    color: var(--color-primary);
    background: transparent;
    border: 1px solid rgba(15, 70, 133, 0.35);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-right: 0.25rem;
    padding: 0.65rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.operativ-tabs .nav-link i,
.comm-main-tabs .nav-link i {
    font-size: 1.05em;
    opacity: 0.92;
}
.operativ-tabs .nav-link:hover,
.operativ-tabs .nav-link:focus,
.comm-main-tabs .nav-link:hover,
.comm-main-tabs .nav-link:focus {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.operativ-tabs .nav-link.active,
.comm-main-tabs .nav-link.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}
body[data-theme="dark"] .operativ-tabs,
body[data-theme="dark"] .comm-main-tabs {
    background: rgba(15, 70, 133, 0.22);
    border-bottom-color: rgba(69, 162, 214, 0.5);
}
body[data-theme="dark"] .operativ-tabs .nav-link,
body[data-theme="dark"] .comm-main-tabs .nav-link {
    color: #8eb9e0;
    border-color: #2a4365;
}
body[data-theme="dark"] .operativ-tabs .nav-link:hover,
body[data-theme="dark"] .operativ-tabs .nav-link:focus,
body[data-theme="dark"] .operativ-tabs .nav-link.active,
body[data-theme="dark"] .comm-main-tabs .nav-link:hover,
body[data-theme="dark"] .comm-main-tabs .nav-link:focus,
body[data-theme="dark"] .comm-main-tabs .nav-link.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.operativ-form-card {
    border: 0;
    border-radius: 0.75rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.operativ-form-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.operativ-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.85rem;
}

.operativ-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.operativ-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-primary);
}

.operativ-input-wrap {
    position: relative;
}

.operativ-input-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    opacity: 0.75;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.operativ-input-wrap .operativ-input {
    padding-left: 2.15rem;
}

.operativ-input,
.operativ-form .form-select.operativ-input {
    font-size: 1rem;
    min-height: 2.75rem;
    border-radius: 0.5rem;
}

.operativ-textarea.operativ-input {
    min-height: 4.5rem;
    padding-top: 0.55rem;
    padding-left: 0.75rem;
    resize: vertical;
}

.operativ-form-row--datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.operativ-photo-zone {
    border: 2px dashed rgba(15, 70, 133, 0.28);
    border-radius: 0.65rem;
    padding: 0.85rem 0.75rem;
    background: #f8fbff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.operativ-photo-zone--filled {
    border-style: solid;
    padding: 0.65rem;
}

.operativ-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.operativ-photo-btn {
    flex: 1 1 8.5rem;
    min-height: 2.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.5rem;
    padding: 0.45rem 0.65rem;
}

.operativ-photo-hint {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    color: #6c757d;
    text-align: center;
    line-height: 1.35;
}

.operativ-photo-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.operativ-photo-preview__img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 70, 133, 0.2);
    flex-shrink: 0;
}

.operativ-photo-preview__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

.operativ-photo-preview__name {
    font-size: 0.8rem;
    color: #495057;
    word-break: break-word;
}

.operativ-extra-collapse {
    margin-top: 0.1rem;
}

.operativ-extra-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.45rem 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
}

.operativ-extra-toggle__hint {
    font-weight: 400;
    color: #6c757d;
}

.operativ-extra-toggle__icon {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.operativ-extra-toggle:not(.collapsed) .operativ-extra-toggle__icon {
    transform: rotate(90deg);
}

.operativ-field--extra {
    margin-top: 0.35rem;
}

.operativ-submit-btn {
    min-height: 3rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.operativ-camera-modal__body {
    background: #000;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.operativ-camera-video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

body[data-theme="dark"] .operativ-photo-zone {
    background: rgba(15, 70, 133, 0.12);
    border-color: rgba(142, 185, 224, 0.35);
}

body[data-theme="dark"] .operativ-photo-preview__name {
    color: #adb5bd;
}

body[data-theme="dark"] .operativ-extra-toggle__hint {
    color: #9aa5b1;
}

.operativ-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.operativ-field--full {
    grid-column: 1 / -1;
}

.operativ-filter-card .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.operativ-field--photo-error .form-text {
    color: #842029;
}

.operativ-table-scroll {
    overflow: auto;
    max-height: min(70vh, 720px);
    border: 1px solid rgba(15, 70, 133, 0.18);
    border-radius: 0 0 0.375rem 0.375rem;
    -webkit-overflow-scrolling: touch;
}

.operativ-admin-table-panel {
    padding: 1rem;
}

.operativ-per-page-select {
    width: auto;
    min-width: 4.5rem;
}

.operativ-pagination-wrap .news-pagination-wrap {
    margin-top: 0;
}

.operativ-row-actions {
    flex-wrap: nowrap;
}

.operativ-admin-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 960px;
}

.operativ-admin-table th,
.operativ-admin-table td {
    vertical-align: middle;
    border: 1px solid rgba(15, 70, 133, 0.14);
}

.operativ-admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fa;
    box-shadow: 0 1px 0 rgba(15, 70, 133, 0.12);
}

.operativ-admin-table .operativ-col-category {
    min-width: 9rem;
    white-space: nowrap;
}

.operativ-cell-text {
    min-width: 12rem;
    max-width: 22rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

body[data-theme="dark"] .operativ-table-scroll {
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .operativ-admin-table th,
body[data-theme="dark"] .operativ-admin-table td {
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .operativ-admin-table thead th {
    background: rgba(255, 255, 255, 0.06);
}

.operativ-stats__header {
    background: #0f4685;
    border: none;
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.operativ-stats__toggle {
    color: #fff;
    border: none;
    box-shadow: none;
}

.operativ-stats__title {
    color: #fff;
    font-weight: 600;
}

.operativ-stats__hint {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 400;
}

.operativ-stats__toggle:hover,
.operativ-stats__toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.operativ-stats__chevron {
    transition: transform 0.2s ease;
    color: #fff;
    width: 0.85rem;
}

.operativ-stats__toggle[aria-expanded="true"] .operativ-stats__chevron {
    transform: rotate(90deg);
}

.operativ-stats__subtitle {
    font-weight: 600;
    color: #0f4685;
    margin-bottom: 0.65rem;
}

.operativ-stats-table-scroll {
    overflow: auto;
    max-height: 280px;
    border: 1px solid rgba(15, 70, 133, 0.14);
    border-radius: 0.35rem;
}

.operativ-stats-table th,
.operativ-stats-table td {
    border-color: rgba(15, 70, 133, 0.14) !important;
}

.operativ-stat-chart-wrap {
    max-height: 220px;
    margin-bottom: 0.5rem;
}

.operativ-stat-chart-wrap--wide {
    max-height: 280px;
}

.operativ-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.operativ-sort-link:hover,
.operativ-sort-link:focus {
    color: var(--bs-primary);
    text-decoration: underline;
}

.operativ-sort-link--active {
    font-weight: 700;
    color: var(--bs-primary);
}

.operativ-matrix-scroll {
    overflow: auto;
    max-height: 280px;
}

.operativ-matrix-table th,
.operativ-matrix-table td {
    font-size: 0.75rem;
    vertical-align: middle;
    min-width: 3rem;
}

.operativ-matrix-label {
    font-weight: 700;
    font-size: 0.72rem;
}

body[data-theme="dark"] .operativ-sort-link {
    color: #dce8f5;
}

body[data-theme="dark"] .operativ-sort-link--active {
    color: #7eb8ff;
}

body[data-theme="dark"] .operativ-matrix-table th,
body[data-theme="dark"] .operativ-matrix-table td {
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e8f0fa;
}

.operativ-stats__toggle[aria-expanded="true"] .operativ-stats__chevron,
.operativ-stats__chevron--open {
    transform: rotate(90deg);
}

.operativ-filter-card > .card-header {
    background: rgba(15, 70, 133, 0.08);
    border-bottom: 1px solid rgba(15, 70, 133, 0.15);
    font-size: 0.95rem;
}

.users-verification-table .btn-sm {
    white-space: nowrap;
}

.profile-sidebar-nav .list-group-item.active .badge.bg-warning {
    color: #212529;
}

body[data-theme="dark"] .operativ-filter-card > .card-header {
    background: rgba(255, 255, 255, 0.06);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #e8f0fa;
}

body[data-theme="dark"] .operativ-stats__header {
    background: #0f4685;
}

body[data-theme="dark"] .operativ-stats__toggle,
body[data-theme="dark"] .operativ-stats__title {
    color: #fff;
}

body[data-theme="dark"] .operativ-stats__hint {
    color: rgba(255, 255, 255, 0.88);
}

body[data-theme="dark"] .operativ-stats__toggle:hover,
body[data-theme="dark"] .operativ-stats__toggle:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .operativ-stats__chevron {
    color: #fff;
}

body[data-theme="dark"] .operativ-stats__subtitle {
    color: #8eb9e0;
}

body[data-theme="dark"] .operativ-stats-table-scroll {
    border-color: rgba(255, 255, 255, 0.1);
}

.attendance-report-text {
    white-space: pre-wrap;
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    line-height: 1.55;
    background: #fafafa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    max-height: 480px;
    overflow: auto;
}

body[data-theme="dark"] .attendance-report-text {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8e8e8;
}

.attendance-timesheet-table th,
.attendance-timesheet-table td {
    font-size: 12px;
}

.attendance-timesheet-foot th,
.attendance-timesheet-foot td {
    background: rgba(15, 70, 133, 0.07);
    border-top: 2px solid rgba(15, 70, 133, 0.22);
    vertical-align: middle;
}

.attendance-timesheet-foot-label {
    text-align: left;
    white-space: nowrap;
}

.attendance-timesheet-foot-day {
    min-width: 24px;
}

.attendance-timesheet-table .attendance-timesheet-day--weekend,
.attendance-timesheet-table thead .attendance-timesheet-day--weekend {
    background: #d6ebff;
}

.attendance-timesheet-foot .attendance-timesheet-day--weekend {
    background: #cce5ff;
}

.attendance-ts-charts .attendance-ts-chart-block {
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.12);
    border-radius: 10px;
    padding: 0.85rem 1rem 1rem;
    box-shadow: 0 1px 3px rgba(15, 70, 133, 0.05);
}

.attendance-ts-chart-wrap {
    position: relative;
    height: 280px;
    min-width: 0;
}

.attendance-ts-chart-wrap--wide {
    height: 320px;
}

.duty-day-banner {
    background: linear-gradient(90deg, #0F4685 0%, #1a6bc4 55%, #17a2b8 100%);
    color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.duty-day-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
}

.duty-day-banner-icon {
    font-size: 1.25rem;
    opacity: 0.95;
}

.duty-day-banner-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    font-size: 0.95rem;
}

.duty-day-banner-meta {
    opacity: 0.92;
    font-size: 0.9rem;
}

.duty-schedule-table .duty-schedule-row--weekend td {
    background: #eef6ff;
}

body[data-theme="dark"] .duty-day-banner {
    background: linear-gradient(90deg, #0a2f5c 0%, #134a8a 60%, #0e6e7a 100%);
}

body[data-theme="dark"] .duty-schedule-table .duty-schedule-row--weekend td {
    background: rgba(66, 133, 244, 0.12);
}

body[data-theme="dark"] .attendance-ts-charts .attendance-ts-chart-block {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .attendance-timesheet-table .attendance-timesheet-day--weekend,
body[data-theme="dark"] .attendance-timesheet-table thead .attendance-timesheet-day--weekend {
    background: rgba(100, 160, 220, 0.22);
}

body[data-theme="dark"] .attendance-timesheet-foot .attendance-timesheet-day--weekend {
    background: rgba(100, 160, 220, 0.28);
}

.attendance-sheet-card .card-body {
    padding: 1rem 1.1rem 1.25rem;
}

.attendance-marks-legend {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.attendance-sheet-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.attendance-sheet-scroll {
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #212529;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.attendance-sheet-table {
    margin: 0 auto;
    border-collapse: collapse;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    width: auto;
    min-width: 0;
}

.attendance-sheet-table th,
.attendance-sheet-table td {
    border: 1px solid #000;
    padding: 6px 12px;
    vertical-align: middle;
}

.attendance-sheet-table thead th {
    text-align: center;
    font-weight: 700;
    background: #f8f9fa;
    font-size: 15px;
}

.attendance-sheet-col-num {
    width: 42px;
    min-width: 42px;
    text-align: center;
    color: #333;
    font-size: 15px;
}

.attendance-sheet-col-name {
    width: 1%;
    white-space: nowrap;
    text-align: left;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.attendance-sheet-col-mark {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    text-align: center;
    font-weight: 700;
    padding: 0;
    position: relative;
    vertical-align: middle;
}

.attendance-sheet-col-comment {
    width: 48px;
    min-width: 48px;
    text-align: center;
    vertical-align: middle;
    padding: 2px;
}

.attendance-comment-toggle {
    border: none;
    background: transparent;
    color: #0d6efd;
    font-size: 16px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.attendance-comment-toggle:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0a58ca;
}

.attendance-comment-input {
    width: 170px;
    max-width: 34vw;
    margin: 2px auto 0;
}

.attendance-mark-input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font: inherit;
    font-weight: 700;
    padding: 2px 0;
    text-transform: uppercase;
    outline: none;
}

.attendance-mark-picker {
    position: relative;
    width: 100%;
    height: 100%;
}

.attendance-mark-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    padding: 6px 4px;
    cursor: pointer;
    color: inherit;
    outline: none;
    touch-action: manipulation;
}

.attendance-mark-trigger:hover,
.attendance-mark-trigger:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.45);
    outline-offset: -2px;
}

.attendance-mark-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    min-width: 240px;
    background: #fff;
    border: 1px solid #adb5bd;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    padding: 6px;
}

.attendance-mark-menu.attendance-mark-menu--sheet {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    top: auto;
    transform: none;
    min-width: 0;
    z-index: 1060;
    padding: 8px;
}

.attendance-mark-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1055;
    border: none;
    padding: 0;
    margin: 0;
    cursor: default;
}

.attendance-mark-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    color: #212529;
    touch-action: manipulation;
}

.attendance-mark-option:hover,
.attendance-mark-option[aria-selected="true"] {
    background: #e9ecef;
}

.attendance-mark-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.attendance-mark-option-label {
    flex: 1;
}

.attendance-mark-select {
    width: 100%;
    min-width: 48px;
    border: none;
    background: transparent;
    text-align: center;
    text-align-last: center;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 2px 0;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: menulist;
    outline: none;
}

.attendance-mark-select option {
    font-weight: 600;
    text-align: left;
}

/* Подсветка отметок: --bs-table-bg нужен, иначе Bootstrap 5 перекрывает background ячейки */
.table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--p,
.attendance-mark-cell--p,
.attendance-mark-cell--p .attendance-mark-input,
.attendance-mark-cell--p .attendance-mark-select,
.attendance-mark-cell--p .attendance-mark-trigger {
    --bs-table-bg: #ffffff;
    --bs-table-accent-bg: transparent;
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

.table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--b,
.attendance-mark-cell--b,
.attendance-mark-cell--b .attendance-mark-input,
.attendance-mark-cell--b .attendance-mark-select,
.attendance-mark-cell--b .attendance-mark-trigger {
    --bs-table-bg: #fcd5b0;
    --bs-table-accent-bg: transparent;
    background: #fcd5b0 !important;
    background-color: #fcd5b0 !important;
    box-shadow: none !important;
}

.table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--z,
.attendance-mark-cell--z,
.attendance-mark-cell--z .attendance-mark-input,
.attendance-mark-cell--z .attendance-mark-select,
.attendance-mark-cell--z .attendance-mark-trigger {
    --bs-table-bg: #f4cccc;
    --bs-table-accent-bg: transparent;
    background: #f4cccc !important;
    background-color: #f4cccc !important;
    box-shadow: none !important;
}

.table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--n,
.attendance-mark-cell--n,
.attendance-mark-cell--n .attendance-mark-input,
.attendance-mark-cell--n .attendance-mark-select,
.attendance-mark-cell--n .attendance-mark-trigger {
    --bs-table-bg: #ccc0da;
    --bs-table-accent-bg: transparent;
    background: #ccc0da !important;
    background-color: #ccc0da !important;
    box-shadow: none !important;
}

.table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--o,
.attendance-mark-cell--o,
.attendance-mark-cell--o .attendance-mark-input,
.attendance-mark-cell--o .attendance-mark-select,
.attendance-mark-cell--o .attendance-mark-trigger {
    --bs-table-bg: #b4c6e7;
    --bs-table-accent-bg: transparent;
    background: #b4c6e7 !important;
    background-color: #b4c6e7 !important;
    box-shadow: none !important;
}

.attendance-marks-legend .att-leg--n {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: #ccc0da;
    color: #212529;
}
.attendance-marks-legend .att-leg--b {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: #fcd5b0;
    color: #212529;
}
.attendance-marks-legend .att-leg--z {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: #f4cccc;
    color: #212529;
}
.attendance-marks-legend .att-leg--o {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: #b4c6e7;
    color: #212529;
}
.attendance-marks-legend .att-leg--p {
    display: inline-block;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #adb5bd;
    color: #212529;
}

.attendance-no-tracking-alert {
    font-size: 1rem;
}

body[data-theme="dark"] .attendance-sheet-table th,
body[data-theme="dark"] .attendance-sheet-table td {
    border-color: rgba(255, 255, 255, 0.35);
    color: #eee;
}

body[data-theme="dark"] .table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--p,
body[data-theme="dark"] .attendance-mark-cell--p,
body[data-theme="dark"] .attendance-mark-cell--p .attendance-mark-input,
body[data-theme="dark"] .attendance-mark-cell--p .attendance-mark-trigger {
    --bs-table-bg: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.06) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
}

body[data-theme="dark"] .table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--b,
body[data-theme="dark"] .attendance-mark-cell--b,
body[data-theme="dark"] .attendance-mark-cell--b .attendance-mark-trigger {
    --bs-table-bg: #8a5a2b;
    background: #8a5a2b !important;
    background-color: #8a5a2b !important;
    color: #fff;
}

body[data-theme="dark"] .table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--z,
body[data-theme="dark"] .attendance-mark-cell--z,
body[data-theme="dark"] .attendance-mark-cell--z .attendance-mark-trigger {
    --bs-table-bg: #7a3d3d;
    background: #7a3d3d !important;
    background-color: #7a3d3d !important;
    color: #fff;
}

body[data-theme="dark"] .table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--n,
body[data-theme="dark"] .attendance-mark-cell--n,
body[data-theme="dark"] .attendance-mark-cell--n .attendance-mark-trigger {
    --bs-table-bg: #5c4a6e;
    background: #5c4a6e !important;
    background-color: #5c4a6e !important;
    color: #fff;
}

body[data-theme="dark"] .table.attendance-sheet-table > :not(caption) > * > .attendance-mark-cell--o,
body[data-theme="dark"] .attendance-mark-cell--o,
body[data-theme="dark"] .attendance-mark-cell--o .attendance-mark-trigger {
    --bs-table-bg: #3d5578;
    background: #3d5578 !important;
    background-color: #3d5578 !important;
    color: #fff;
}

body[data-theme="dark"] .attendance-mark-menu {
    background: #2b3035;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .attendance-mark-option {
    color: #f1f3f5;
}

body[data-theme="dark"] .attendance-mark-option:hover,
body[data-theme="dark"] .attendance-mark-option[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .attendance-sheet-scroll {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .attendance-sheet-table thead th {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 767.98px) {
    .attendance-sheet-card .card-body {
        padding: 0.85rem 0.75rem 1rem;
    }

    .attendance-marks-legend {
        font-size: 0.875rem;
        padding: 0 0.15rem;
    }

    .attendance-sheet-wrap {
        justify-content: stretch;
    }

    .attendance-sheet-scroll {
        width: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .attendance-sheet-table {
        display: block;
        width: 100%;
        font-size: 15px;
    }

    .attendance-sheet-table thead {
        display: none;
    }

    .attendance-sheet-table tbody {
        display: block;
    }

    .attendance-sheet-table tbody tr {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin-bottom: 0.5rem;
        padding: 0.55rem 0.65rem;
        border: 1px solid #ced4da;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .attendance-sheet-table tbody td {
        display: block;
        border: none;
        padding: 0;
    }

    .attendance-sheet-col-num {
        flex: 0 0 1.75rem;
        width: auto;
        min-width: 0;
        font-size: 14px;
        font-weight: 700;
        color: #6c757d;
        text-align: center;
    }

    .attendance-sheet-col-name {
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        font-size: 16px;
        line-height: 1.3;
        word-break: break-word;
    }

    .attendance-sheet-col-mark {
        flex: 0 0 48px;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        border: 1px solid #adb5bd;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        min-height: 44px;
    }

    .attendance-sheet-col-mark.attendance-mark-cell--b {
        background: #fcd5b0 !important;
        background-color: #fcd5b0 !important;
    }
    .attendance-sheet-col-mark.attendance-mark-cell--z {
        background: #f4cccc !important;
        background-color: #f4cccc !important;
    }
    .attendance-sheet-col-mark.attendance-mark-cell--n {
        background: #ccc0da !important;
        background-color: #ccc0da !important;
    }
    .attendance-sheet-col-mark.attendance-mark-cell--o {
        background: #b4c6e7 !important;
        background-color: #b4c6e7 !important;
    }
    .attendance-sheet-col-mark.attendance-mark-cell--p {
        background: #fff !important;
        background-color: #fff !important;
    }

    .attendance-sheet-col-comment {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }

    .attendance-comment-input {
        width: 130px;
        max-width: 46vw;
    }

    .attendance-mark-trigger {
        min-height: 44px;
        font-size: 18px;
    }

    .attendance-daily-form .row.g-3 {
        --bs-gutter-x: 0.75rem;
    }

    .attendance-date-form .col-md-auto .btn {
        width: 100%;
    }

    body[data-theme="dark"] .attendance-sheet-table tbody tr {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.18);
    }
}

.operativ-subtabs .nav-link {
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .operativ-page {
        max-width: 100%;
    }

    .operativ-page .page-heading__stats {
        display: none !important;
    }

    .operativ-form-grid {
        grid-template-columns: 1fr;
    }

    .operativ-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 0.35rem;
    }

    .operativ-tabs .nav-item {
        margin-bottom: 0;
        width: 100%;
    }

    .operativ-tabs .nav-link {
        width: 100%;
        margin-right: 0;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
        padding: 0.5rem 0.35rem;
        font-size: 0.8rem;
        gap: 0.3rem;
        border-bottom: 1px solid rgba(15, 70, 133, 0.35);
        border-radius: 0.5rem;
    }

    .operativ-tabs .nav-link i {
        font-size: 0.95em;
    }

    .operativ-form-card {
        max-width: 100%;
    }

    .operativ-form-card__body {
        padding: 0.85rem 0.9rem 1rem;
    }

    .operativ-form-row--datetime {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .operativ-photo-actions {
        flex-direction: column;
    }

    .operativ-photo-btn {
        flex: 1 1 auto;
        width: 100%;
    }

    .operativ-intro {
        font-size: 0.9rem;
        margin-bottom: 0.85rem;
    }
}

/* Ознакомление (operativ → briefing) */
.operativ-briefing-admin-tabs .nav-link {
    font-weight: 600;
}
.operativ-briefing-student-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0f4685 0%, #1a5fad 100%);
    color: #fff;
    border: none;
}
.operativ-briefing-student-card__header .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.operativ-briefing-student-text {
    line-height: 1.6;
    white-space: pre-wrap;
}
.operativ-briefing-profile-dl dt {
    font-weight: 600;
    color: #0f4685;
}
.operativ-briefing-not-ack {
    max-width: 220px;
    word-break: break-word;
}
.operativ-briefing-row--blocked td {
    opacity: 0.65;
}
.operativ-share-link-box {
    padding: 0.75rem;
    border: 1px dashed #c5d4e8;
    border-radius: 0.375rem;
    background: #f8fafc;
}
.operativ-share-link-input {
    font-size: 0.8125rem;
}
.operativ-share-link-alert .operativ-share-link-input {
    background: #fff;
}
body[data-theme="dark"] .operativ-share-link-box {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}
body[data-theme="dark"] .operativ-share-link-alert .operativ-share-link-input {
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
}
.operativ-briefing-admin-table code {
    font-size: 0.85em;
}
.operativ-briefing-form-card .card-header {
    background: #f0f4fa;
    font-weight: 600;
}
body[data-theme="dark"] .operativ-briefing-form-card .card-header {
    background: rgba(255, 255, 255, 0.06);
}
body[data-theme="dark"] .operativ-briefing-student-card__header {
    background: linear-gradient(135deg, #1a3d6b 0%, #245a94 100%);
}
body[data-theme="dark"] .operativ-briefing-meta.card {
    background: rgba(255, 255, 255, 0.05) !important;
}
.operativ-briefing-text-block {
    padding: 12px 14px;
    border: 1px solid #d7e2ef;
    border-radius: 0.375rem;
    background: #f8fafc;
}
.operativ-briefing-text-block__title {
    color: #1f3f6a;
    font-weight: 700;
}
.operativ-briefing-text-block__body {
    white-space: pre-wrap;
    line-height: 1.55;
    text-align: justify;
}
.operativ-briefing-footer {
    padding-top: 4px;
    font-size: 0.875rem;
}
.operativ-briefing-footer__line {
    line-height: 1.6;
}
body[data-theme="dark"] .operativ-briefing-text-block {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .operativ-briefing-text-block__title {
    color: #d7e8ff;
}

/* Меры безопасности — ведомость (как на 26myanketa) */
.operativ-safety-layout .operativ-safety-note a {
    text-decoration: underline;
}
.operativ-vedomost__title {
    text-align: center;
    margin: 0 0 6px;
    font-size: 1.125rem;
    text-transform: uppercase;
    color: #1f2e3c;
}
.operativ-vedomost__sub,
.operativ-vedomost__topic {
    text-align: center;
    margin: 0 0 4px;
    font-size: 0.8125rem;
    color: #4f6580;
}
.operativ-vedomost__topic {
    color: #1f3f6a;
    font-weight: 700;
    margin-bottom: 12px;
}
.operativ-vedomost__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8125rem;
}
.operativ-vedomost__meta-wide {
    grid-column: 1 / -1;
}
.operativ-vedomost__meta div {
    border-bottom: 1px dashed #b8c8dd;
    padding: 4px 0;
}
.operativ-vedomost-table th {
    background: #f2f7ff;
    font-size: 0.6875rem;
    text-align: center;
}
.operativ-vedomost-table .instr-cell {
    font-size: 0.6875rem;
    line-height: 1.35;
    vertical-align: top;
}
.operativ-vedomost-table .instr-formatted {
    text-align: justify;
}
.operativ-vedomost-table .instr-block {
    display: flex;
    gap: 6px;
    margin: 0 0 8px;
    align-items: flex-start;
}
.operativ-vedomost-table .instr-block--section {
    margin-top: 10px;
    font-weight: 700;
}
.operativ-vedomost-table .instr-num,
.operativ-vedomost-table .instr-label {
    flex: 0 0 auto;
    font-weight: 700;
    min-width: 2em;
}
.operativ-vedomost-table .instr-text {
    flex: 1 1 auto;
    text-align: justify;
}
.operativ-vedomost-table .instr-sublist {
    margin: 2px 0 8px 14px;
    padding-left: 10px;
    border-left: 2px solid #c5d4e8;
}
.operativ-vedomost-table .instr-bullet {
    margin: 0 0 5px;
    padding-left: 12px;
    text-indent: -12px;
    text-align: justify;
}
@media (max-width: 991.98px) {
    .operativ-safety-layout .col-lg-4,
    .operativ-safety-layout .col-lg-8 {
        max-width: 100%;
    }
}

/* ——— Мобильная адаптация: operativ, ведомости, календарь ——— */
@media (max-width: 767.98px) {
    .operativ-briefing-admin-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .operativ-briefing-admin-tabs .nav-item {
        flex: 1 1 calc(50% - 0.2rem);
        min-width: 0;
    }

    .operativ-briefing-admin-tabs .nav-link {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
    }

    .operativ-table-scroll {
        width: 100%;
        max-width: 100%;
    }

    .operativ-row-actions {
        flex-wrap: wrap !important;
        justify-content: flex-end;
        max-width: 100%;
    }

    .operativ-page .card-header.d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .operativ-page .card-header .btn-group,
    .operativ-page .card-header .operativ-list-export-btns {
        width: 100%;
    }

    .operativ-page .card-header .btn-group .btn,
    .operativ-page .card-header .operativ-list-export-btns .btn {
        flex: 1 1 auto;
    }

    .operativ-chart-type-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .operativ-chart-type-group .btn {
        flex: 1 1 calc(50% - 2px);
        font-size: 0.75rem;
        padding: 0.3rem 0.35rem;
    }

    .operativ-stats__toggle {
        flex-wrap: wrap;
    }

    .operativ-stats__hint {
        flex: 1 1 100%;
        margin-left: 0 !important;
        margin-top: 0.15rem;
    }

    .operativ-vedomost-table {
        font-size: 0.8rem;
    }

    .operativ-vedomost-table th,
    .operativ-vedomost-table td {
        padding: 0.35rem 0.4rem;
    }

    .operativ-share-link-alert .input-group,
    .operativ-share-link-box .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .operativ-share-link-alert .input-group .form-control,
    .operativ-share-link-box .input-group .form-control {
        border-radius: 0.25rem !important;
    }

    .operativ-share-link-alert .input-group .btn,
    .operativ-share-link-box .input-group .btn {
        width: 100%;
        margin-top: 0.35rem;
        border-radius: 0.25rem !important;
    }

    .operativ-admin-table-panel {
        padding: 0.65rem 0.5rem;
    }

    .operativ-per-page-wrap {
        flex-direction: column;
        align-items: stretch !important;
    }

    .events-calendar-day {
        min-height: 4.5rem;
        padding: 0.25rem;
    }

    .events-calendar-head-cell {
        font-size: 0.72rem;
        padding: 0.35rem 0.15rem;
    }

    .events-calendar-day-num {
        font-size: 0.78rem;
    }

    .events-calendar-day-event {
        font-size: 0.62rem;
        padding: 0.1rem 0.15rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .operativ-briefing-admin-tabs .nav-item {
        flex: 1 1 100%;
    }

    .operativ-tabs {
        grid-template-columns: 1fr !important;
    }

    .page-heading__title {
        font-size: 1.35rem;
    }

    .page-heading__bar .page-heading__title {
        font-size: 0.95rem !important;
    }

    .auth-card {
        padding: 1.5rem 1.15rem 1.35rem;
        border-radius: 18px;
    }

    .auth-card--register {
        max-width: 100%;
    }
}

/* ——— Дни рождения (MyAnketa-style) ——— */
.header-birthday-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    text-decoration: none;
    background: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.header-birthday-bell i {
    color: #555;
}

.header-birthday-bell:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #333;
}

.header-birthday-bell--today {
    background: #ff4444;
    border-color: #e53935;
}

.header-birthday-bell--today i {
    color: #fff;
}

.header-birthday-bell--tomorrow {
    background: #0066cc;
    border-color: #005bb5;
}

.header-birthday-bell--tomorrow i {
    color: #fff;
}

.header-birthday-bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.header-birthday-bell--today .header-birthday-bell-badge {
    background: #b71c1c;
}

.header-birthday-bell--tomorrow .header-birthday-bell-badge {
    background: #003d80;
}

/* Значок: не предоставлено объяснение по незаконному отсутствию */
.header-absence-expl-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #ff3b3b;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.15s ease, transform 0.15s ease;
}
.header-absence-expl-badge:hover,
.header-absence-expl-badge:focus-visible {
    background: rgba(255, 59, 59, 0.18);
    color: #ff1a1a;
    transform: scale(1.06);
}

/* Блок «Дежурные сегодня» на странице графика */
.chart-duty-today-block {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.04) 100%);
    border: 1px solid rgba(220, 53, 69, 0.35);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.08);
}
.chart-duty-today-block__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    font-size: 1.15rem;
}
.chart-duty-today-block__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    line-height: 1.35;
}
.chart-duty-today-block__body strong {
    color: #b02a37;
    font-size: 0.95rem;
}
body[data-theme="dark"] .chart-duty-today-block {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.22) 0%, rgba(220, 53, 69, 0.08) 100%);
    border-color: rgba(255, 120, 130, 0.35);
}
body[data-theme="dark"] .chart-duty-today-block__body strong {
    color: #ff8a95;
}

.header-absence-expl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}
.header-absence-expl-icon i {
    font-size: 0.95rem;
    line-height: 1;
}
.header-absence-expl-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: #c62828;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.absence-expl-page .absence-expl-text {
    max-width: 28rem;
    white-space: pre-wrap;
}
.absence-expl-badge-status--pending { background: #c62828; }
.absence-expl-badge-status--submitted { background: #ef6c00; }
.absence-expl-badge-status--accepted { background: #2e7d32; }
.absence-expl-badge-status--rejected { background: #6a1b9a; }

.birthdays-intro {
    margin-bottom: 1rem;
}

.birthdays-table__photo-col {
    width: 56px;
}

.birthdays-table__action-col {
    width: 52px;
}

.birthdays-table__photo {
    object-fit: cover;
    width: 40px;
    height: 40px;
}

.birthdays-table__photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e9ecef;
    color: #6c757d;
}

.birthdays-row--today {
    background: rgba(255, 68, 68, 0.08) !important;
}

.birthdays-row--tomorrow {
    background: rgba(0, 102, 204, 0.07) !important;
}

.birthdays-days-badge {
    font-weight: 600;
}

.birthdays-row--today .birthdays-days-badge {
    color: #c62828;
}

.birthday-bell-modal__header {
    position: relative;
}

.birthday-bell-modal__icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #0f4685;
}

.birthday-bell-section__title {
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.birthday-bell-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.birthday-bell-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(15, 70, 133, 0.15);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.birthday-bell-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.birthday-bell-card__name {
    font-weight: 600;
    line-height: 1.25;
}

.birthday-bell-card__photo,
.birthday-bell-card__photo-ph {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
}

.birthday-bell-card__photo-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dee2e6;
    color: #6c757d;
}

.birthday-greeting-modal__hero {
    background: linear-gradient(135deg, #0f4685 0%, #1a5fad 100%);
    padding: 1.5rem 1rem 1.25rem;
    position: relative;
}

.birthday-greeting-modal__cake-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.birthday-greeting-modal__name {
    font-size: 1.15rem;
    font-weight: 700;
}

.birthday-greeting-modal__age {
    opacity: 0.88;
}

.birthday-greeting-modal__body {
    padding: 1rem 1.25rem 0.5rem;
}

.birthday-greeting-modal__photo {
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.birthday-greeting-modal__card {
    position: relative;
    background: #faf6ef;
    border-radius: 0.75rem;
    padding: 1rem 0.85rem 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.birthday-greeting-modal__quote {
    position: absolute;
    top: 0.15rem;
    left: 0.65rem;
    font-size: 2.5rem;
    line-height: 1;
    color: #c9b08a;
    font-family: Georgia, serif;
}

.birthday-greeting-modal__text {
    border: none;
    background: transparent;
    resize: none;
    box-shadow: none;
    padding-top: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

.birthday-greeting-modal__footer {
    background: #f3f5f8;
    border-top: 1px solid #dee2e6;
}

body[data-theme="dark"] .birthday-bell-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .birthday-greeting-modal__card {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 576px) {
    .birthday-greeting-modal__footer {
        flex-direction: column;
        align-items: stretch !important;
    }

    .birthday-greeting-modal__footer .btn-link {
        order: 3;
        width: 100%;
    }
}

/* Аватары в таблицах пользователей и дней рождения */
.user-avatar-thumb {
    object-fit: cover;
    vertical-align: middle;
    flex-shrink: 0;
}
.user-avatar-thumb--placeholder {
    background: #e8f2fc;
    color: #0F4685;
    font-size: 0.85rem;
}
.users-photo-col {
    width: 4.75rem;
}
.users-photo-cell-inner {
    min-width: 4.5rem;
}
.admin-avatar-preview {
    object-fit: cover;
    border: 2px solid #dee2e6;
}
.admin-avatar-preview--ph {
    width: 96px;
    height: 96px;
    background: #e8f2fc;
    color: #0F4685;
}
.birthdays-admin-table .admin-user-avatar-btn,
.users-photo-cell .admin-user-avatar-btn {
    line-height: 1;
}

/* ========== Статистика сайта ========== */
.site-statistics-page .site-stats-lead {
    color: #555;
    max-width: 720px;
    margin-bottom: 0.5rem;
}

.site-stats-since {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0.45rem 0.85rem;
    background: #eef5fc;
    border: 1px solid rgba(15, 70, 133, 0.15);
    border-radius: 8px;
    color: #0F4685;
    font-weight: 600;
    font-size: 0.95rem;
}

body[data-theme="dark"] .site-stats-since {
    background: rgba(15, 70, 133, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
    color: #8eb9e0;
}

.site-stats-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    background: #f0f6fc;
    border: 1px solid rgba(15, 70, 133, 0.15);
    border-radius: 8px;
}

.site-stats-toolbar-label {
    font-weight: 600;
    color: #0F4685;
}

.site-stats-toolbar-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.site-stats-card-export {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #dee2e6;
}

.site-stats-card-export-label {
    font-size: 0.85rem;
    color: #666;
    margin-right: 0.25rem;
}

body[data-theme="dark"] .site-stats-toolbar {
    background: rgba(15, 70, 133, 0.25);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .site-stats-toolbar-label {
    color: #8eb9e0;
}

body[data-theme="dark"] .site-stats-card-export {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.site-stats-summary .site-stats-kpi {
    background: linear-gradient(135deg, #e8f2fc 0%, #f0f7ff 100%);
    border: 1px solid rgba(15, 70, 133, 0.12);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    text-align: center;
    height: 100%;
}

.site-stats-kpi-val {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F4685;
    line-height: 1.2;
}

.site-stats-kpi-val--sm {
    font-size: 1rem;
}

.site-stats-kpi-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.35rem;
}

.site-stats-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F4685;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.35rem;
}

.site-stats-section-lead {
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.site-stats-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.85rem;
}

.site-stats-inventory-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid rgba(15, 70, 133, 0.1);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 4px rgba(15, 70, 133, 0.06);
    border-left: 3px solid var(--inv-accent, #0F4685);
    min-width: 0;
}

.site-stats-inventory-icon {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--inv-accent, #0F4685) 14%, #fff);
    color: var(--inv-accent, #0F4685);
    font-size: 1.05rem;
}

.site-stats-inventory-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.site-stats-inventory-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #667;
    line-height: 1.25;
}

.site-stats-inventory-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1a2b3c;
    line-height: 1.1;
}

.site-stats-charts-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    margin-bottom: 1rem;
}

.site-stats-card-titles {
    flex: 1 1 180px;
    min-width: 0;
}

.site-stats-card-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #777;
    line-height: 1.35;
}

.site-statistics-page--embedded .site-stats-header {
    margin-bottom: 0.5rem;
}

body[data-theme="dark"] .site-stats-section-title {
    color: #8eb9e0;
}

body[data-theme="dark"] .site-stats-inventory-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .site-stats-inventory-label {
    color: #aab;
}

body[data-theme="dark"] .site-stats-inventory-value {
    color: #e8eef5;
}

body[data-theme="dark"] .site-stats-inventory-icon {
    background: color-mix(in srgb, var(--inv-accent, #8eb9e0) 22%, transparent);
}

body[data-theme="dark"] .site-stats-card-subtitle {
    color: #9aa7b5;
}

.site-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.site-stats-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem 1.1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(15, 70, 133, 0.06);
    min-width: 0;
}

.site-stats-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.site-stats-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0F4685;
    margin: 0;
    flex: 1 1 180px;
}

.site-stats-type-wrap {
    flex: 0 1 160px;
    min-width: 140px;
}

.site-stats-canvas-wrap {
    position: relative;
    height: 280px;
    min-width: 0;
}

.site-stats-card {
    min-width: 0;
}

.site-stats-canvas-wrap--side {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.site-stats-canvas-wrap--side > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.site-stats-hidden-slices {
    flex: 0 1 44%;
    min-width: 0;
    max-height: 280px;
    overflow: auto;
    font-size: .78rem;
}

.site-stats-canvas-wrap--side {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.site-stats-canvas-wrap--side > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
}

.site-stats-hidden-slices {
    flex: 0 1 44%;
    min-width: 0;
    max-height: 280px;
    overflow: auto;
    font-size: .78rem;
    background: #ffffff;
    border-radius: 6px;
}

.site-stats-hidden-slices td {
    padding: 3px 6px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.site-stats-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

body[data-theme="dark"] .site-stats-card {
    background: rgba(21, 34, 56, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .site-stats-kpi {
    background: rgba(15, 70, 133, 0.25);
    border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .site-stats-kpi-val,
body[data-theme="dark"] .site-stats-card-title {
    color: #8eb9e0;
}

@media (max-width: 992px) {
    .site-stats-grid {
        grid-template-columns: 1fr;
    }
}


/* —— Матрица прав ролей (профиль) —— */
.role-permissions-wrap {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    max-height: min(70vh, 720px);
    overflow: auto;
}
.role-permissions-matrix {
    min-width: 960px;
    margin: 0;
}
.role-permissions-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
    border-bottom-width: 2px;
}
.role-permissions-cap-col {
    min-width: 220px;
    left: 0;
    z-index: 3 !important;
}
.role-permissions-role-col {
    min-width: 118px;
}
.role-permissions-role-label {
    display: inline-block;
    line-height: 1.25;
}
.role-permissions-section-row th {
    background: #0F4685;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.75rem;
    position: sticky;
    left: 0;
}
.role-permissions-cap-row th.role-permissions-cap-name {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f8fafc;
    font-weight: 500;
    font-size: 0.88rem;
    white-space: nowrap;
}
.role-permissions-cap-key {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    font-family: Consolas, Monaco, monospace;
}
.role-permissions-cell {
    padding: 0.35rem 0.25rem !important;
    background: #fff;
}
.role-permissions-radios {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
}
.role-permissions-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
}
.role-permissions-radio input {
    margin: 0;
    accent-color: #0F4685;
}
.role-permissions-radio.is-active {
    background: rgba(15, 70, 133, 0.12);
    border-color: rgba(15, 70, 133, 0.35);
    color: #0F4685;
}
.role-permissions-radio.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
body[data-theme="dark"] .role-permissions-wrap {
    background: rgba(21, 34, 56, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .role-permissions-matrix thead th {
    background: #152238;
    color: #c5d4e8;
}
body[data-theme="dark"] .role-permissions-cap-row th.role-permissions-cap-name,
body[data-theme="dark"] .role-permissions-cell {
    background: #122033;
    color: #c5d4e8;
}
body[data-theme="dark"] .role-permissions-radio.is-active {
    background: rgba(142, 185, 224, 0.15);
    border-color: rgba(142, 185, 224, 0.35);
    color: #8eb9e0;
}
