/* Премиальный тёмный UI: весь ЛК (#mainApp), раздел «Собрание», таблицы, формы, модалки */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Бренд в шапке — на всех разделах */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.header-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    /* Design system (источник правды по палитре) */
    --ds-bg-page: #0b0f1a;
    --ds-surface-1: #131825;
    --ds-surface-2: #1a1f2e;
    --ds-sidebar: #070b12;
    --ds-border: #1f2a44;
    --ds-text: #e5e7eb;
    --ds-text-muted: #9ca3af;
    --ds-text-dim: #6b7280;
    --ds-accent-from: #3b82f6;
    --ds-accent-to: #8b5cf6;
    --ds-accent-cyan: #22d3ee;
    --ds-radius-card: 12px;
    --ds-radius-btn: 8px;
    --ds-radius-sm: 6px;
    --ds-radius-modal: 20px;
    --ds-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    --ds-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --ds-transition: all 0.2s ease;
    --ds-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ds-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");

    /* Совместимость: существующие селекторы используют --oss-* */
    --oss-bg-deep: var(--ds-bg-page);
    --oss-bg-panel: var(--ds-surface-1);
    --oss-bg-elevated: var(--ds-surface-2);
    --oss-border: var(--ds-border);
    --oss-text: var(--ds-text);
    --oss-text-muted: var(--ds-text-muted);
    --oss-text-dim: var(--ds-text-dim);
    --oss-accent-a: var(--ds-accent-from);
    --oss-accent-b: var(--ds-accent-to);
    --oss-accent-c: var(--ds-accent-cyan);
    --oss-radius: var(--ds-radius-card);
    --oss-radius-sm: var(--ds-radius-btn);
    --oss-shadow: var(--ds-shadow);
    --oss-font: var(--ds-font);
}

html {
    color-scheme: dark;
    scrollbar-color: rgba(107, 114, 128, 0.45) rgba(7, 11, 18, 0.5);
}

/* ——— Шапка и навигация (весь #mainApp) ——— */
#mainApp {
    font-family: var(--oss-font);
    background: var(--oss-bg-deep);
    color: var(--oss-text);
    max-width: 100%;
}

#mainApp .app-header {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--oss-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

#mainApp .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

#mainApp .header-brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--oss-accent-a), var(--oss-accent-b));
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

#mainApp .header-title {
    color: var(--oss-text);
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.35;
}

#mainApp .organization-display,
#mainApp #headerOrganizationName {
    color: var(--oss-text-muted);
    font-size: 0.875rem;
}

#mainApp .main-sections {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--oss-border);
    padding: 0.35rem 0.75rem;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#mainApp .main-section-btn {
    font-family: var(--oss-font);
    color: var(--oss-text-muted);
    border-radius: var(--oss-radius-sm);
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#mainApp .main-section-btn:hover {
    color: var(--oss-text);
    background: rgba(59, 130, 246, 0.08);
}

#mainApp .main-section-btn.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.35));
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
}

#mainApp .main-section-btn.active::after {
    background: linear-gradient(90deg, var(--oss-accent-a), var(--oss-accent-b), var(--oss-accent-c));
    height: 3px;
    border-radius: 2px;
    width: 100%;
    transition: none;
}

/* ——— Раздел собраний ——— */
#housesSection.oss-meetings-root {
    font-family: var(--oss-font);
    background: linear-gradient(180deg, var(--oss-bg-deep) 0%, #0f172a 55%, var(--oss-bg-deep) 100%);
    color: var(--oss-text);
    min-height: 60vh;
    padding: 0 0 2.5rem;
}

#housesSection.oss-meetings-root .meetings-subtabs-toolbar.oss-meetings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 0 1rem;
    margin-bottom: 0.5rem;
}

#housesSection.oss-meetings-root .sub-tabs {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(30, 37, 56, 0.9);
    border: 1px solid var(--oss-border);
    gap: 4px;
}

#housesSection.oss-meetings-root .sub-tab-btn {
    font-family: var(--oss-font);
    border: none;
    background: transparent;
    color: var(--oss-text-muted);
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

#housesSection.oss-meetings-root .sub-tab-btn:hover {
    color: var(--oss-text);
}

#housesSection.oss-meetings-root .sub-tab-btn.active {
    position: relative;
    isolation: isolate;
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

#housesSection.oss-meetings-root .sub-tab-btn.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, var(--oss-accent-a), var(--oss-accent-b), var(--oss-accent-c), var(--oss-accent-a));
    background-size: 300% 100%;
    animation: oss-gradient-shift 4s ease infinite;
    z-index: -1;
}

@keyframes oss-gradient-shift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#housesSection.oss-meetings-root .meetings-refresh-wrap .btn.btn-secondary {
    font-family: var(--oss-font);
    background: var(--oss-bg-elevated);
    color: var(--oss-text);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius-sm);
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#housesSection.oss-meetings-root .meetings-refresh-wrap .btn.btn-secondary:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

/* Filters */
#housesSection.oss-meetings-root .oss-meetings-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: stretch;
}

#housesSection.oss-meetings-root .oss-meetings-filters__search {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem 0.5rem 0.85rem;
    min-height: 48px;
    border-radius: var(--oss-radius-btn);
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, var(--oss-bg-panel) 100%);
    border: 1px solid var(--oss-border);
    color: var(--oss-text-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#housesSection.oss-meetings-root .oss-meetings-filters__search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--oss-text-dim);
    transition: color 0.2s ease;
}

#housesSection.oss-meetings-root .oss-meetings-filters__search:focus-within {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#housesSection.oss-meetings-root .oss-meetings-filters__search:focus-within .oss-meetings-filters__search-icon {
    color: var(--oss-accent-c);
}

#housesSection.oss-meetings-root #meetingsFilterSearch {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--oss-text);
    font-family: var(--oss-font);
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
    padding: 0.35rem 0.25rem;
}

#housesSection.oss-meetings-root #meetingsFilterSearch::placeholder {
    color: var(--oss-text-dim);
}

#housesSection.oss-meetings-root .oss-meetings-search-clear {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: var(--oss-radius-sm);
    background: transparent;
    color: var(--oss-text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

#housesSection.oss-meetings-root .oss-meetings-search-clear:hover {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
}

#housesSection.oss-meetings-root .oss-meetings-search-clear:active {
    transform: scale(0.94);
}

#housesSection.oss-meetings-root .oss-meetings-filters__select-wrap {
    flex: 0 1 200px;
}

#housesSection.oss-meetings-root #meetingsFilterStage {
    width: 100%;
    height: 100%;
    min-height: 46px;
    border-radius: var(--oss-radius-sm);
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    font-family: var(--oss-font);
    font-size: 0.875rem;
    padding: 0 0.75rem;
    cursor: pointer;
}

/* Table shell */
#housesSection.oss-meetings-root .oss-meetings-table-scroll {
    border-radius: var(--oss-radius);
    border: 1px solid var(--oss-border);
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: auto;
    max-width: 100%;
    box-shadow: var(--oss-shadow);
}

#housesSection.oss-meetings-root .oss-meetings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 920px;
}

#housesSection.oss-meetings-root .oss-meetings-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oss-text-dim);
    padding: 1rem 1rem 0.85rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--oss-border);
    white-space: nowrap;
}

#housesSection.oss-meetings-root .oss-meetings-table thead th:not(:last-child) {
    border-right: 1px solid rgba(148, 163, 184, 0.06);
}

#housesSection.oss-meetings-root .oss-meetings-row {
    transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

#housesSection.oss-meetings-root .oss-meetings-row .oss-meetings-td {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--oss-text);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    vertical-align: middle;
}

#housesSection.oss-meetings-root .oss-meetings-row .oss-meetings-td:not(:last-child) {
    border-right: 1px solid rgba(148, 163, 184, 0.05);
}

#housesSection.oss-meetings-root .oss-meetings-row:hover {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    #housesSection.oss-meetings-root .oss-meetings-row:hover {
        transform: scale(1.006);
    }
}

#housesSection.oss-meetings-root .oss-meetings-td--address {
    font-weight: 600;
    max-width: 280px;
    line-height: 1.45;
}

#housesSection.oss-meetings-root .oss-meetings-td--period {
    vertical-align: top;
    padding-top: 1.1rem;
    line-height: 1.5;
    color: var(--oss-text-muted);
    font-size: 0.82rem;
}

#housesSection.oss-meetings-root .oss-meetings-td--muted {
    color: var(--oss-text-muted);
    font-size: 0.82rem;
}

#housesSection.oss-meetings-root .oss-meetings-td--actions {
    text-align: center;
    width: 100px;
}

#housesSection.oss-meetings-root .oss-meetings-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

#housesSection.oss-meetings-root .oss-meetings-eye {
    color: var(--oss-text-dim);
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.25s ease;
}

#housesSection.oss-meetings-root .oss-meetings-row:hover .oss-meetings-eye {
    color: var(--oss-accent-c);
    transform: scale(1.12);
}

#housesSection.oss-meetings-root .oss-meetings-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--oss-border);
    background: rgba(30, 37, 56, 0.8);
    color: var(--oss-text-muted);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    line-height: 0;
}

#housesSection.oss-meetings-root .oss-meetings-icon-btn .icon-delete-img,
#housesSection.oss-meetings-root .oss-meetings-icon-btn .icon-delete-img--sm {
    width: 20px;
    height: 20px;
}

#housesSection.oss-meetings-root .oss-meetings-icon-btn--danger:hover {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(127, 29, 29, 0.35);
    transform: scale(1.08);
}

#housesSection.oss-meetings-root .oss-meetings-eye-svg {
    display: block;
}

#housesSection.oss-meetings-root .oss-meetings-dash {
    color: var(--oss-text-dim);
}

/* Chips & pills */
#housesSection.oss-meetings-root .oss-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

#housesSection.oss-meetings-root .oss-chip i {
    font-size: 0.8em;
}

#housesSection.oss-meetings-root .oss-chip__num {
    font-variant-numeric: tabular-nums;
}

#housesSection.oss-meetings-root .oss-chip--muted {
    background: rgba(148, 163, 184, 0.12);
    color: var(--oss-text-muted);
}

#housesSection.oss-meetings-root .oss-chip--done {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

#housesSection.oss-meetings-root .oss-chip--overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

#housesSection.oss-meetings-root .oss-chip--soon.oss-chip--ok {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(34, 211, 238, 0.15));
    color: #bae6fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

#housesSection.oss-meetings-root .oss-chip--soon.oss-chip--warn {
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

#housesSection.oss-meetings-root .oss-chip--soon.oss-chip--urgent {
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.45);
}

#housesSection.oss-meetings-root .oss-pill {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}

#housesSection.oss-meetings-root .oss-pill--st-default {
    background: rgba(148, 163, 184, 0.12);
    color: var(--oss-text-muted);
}

#housesSection.oss-meetings-root .oss-pill--st-done {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.25);
}

#housesSection.oss-meetings-root .oss-pill--st-proj {
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.35);
}

#housesSection.oss-meetings-root .oss-pill--st-notif {
    color: #fde68a;
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.3);
}

#housesSection.oss-meetings-root .oss-pill--st-live {
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
}

#housesSection.oss-meetings-root .oss-pill--st-walk {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.15);
}

#housesSection.oss-meetings-root .oss-pill--st-count {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
}

#housesSection.oss-meetings-root .oss-pill--st-doc {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
}

/* Quorum */
#housesSection.oss-meetings-root .oss-quorum {
    min-width: 140px;
}

#housesSection.oss-meetings-root .oss-quorum__line {
    font-size: 0.78rem;
    color: var(--oss-text-muted);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

#housesSection.oss-meetings-root .oss-quorum__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    overflow: hidden;
    border: 1px solid var(--oss-border);
}

#housesSection.oss-meetings-root .oss-quorum__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Empty row */
#housesSection.oss-meetings-root .oss-meetings-empty-row td {
    text-align: center;
    padding: 2.5rem 1rem !important;
    color: var(--oss-text-muted);
    font-size: 0.95rem;
    border: none !important;
}

/* Mobile cards */
@media (max-width: 768px) {
    #housesSection.oss-meetings-root .oss-meetings-table {
        min-width: 0;
    }

    #housesSection.oss-meetings-root .oss-meetings-table thead {
        display: none;
    }

    #housesSection.oss-meetings-root .oss-meetings-table tbody,
    #housesSection.oss-meetings-root .oss-meetings-table tr,
    #housesSection.oss-meetings-root .oss-meetings-table td {
        display: block;
        width: 100% !important;
        max-width: 100%;
    }

    #housesSection.oss-meetings-root .oss-meetings-row {
        margin-bottom: 1rem;
        padding: 0.25rem;
        border-radius: var(--oss-radius);
        background: var(--oss-bg-elevated);
        border: 1px solid var(--oss-border);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    }

    #housesSection.oss-meetings-root .oss-meetings-row:hover {
        transform: none;
    }

    #housesSection.oss-meetings-root .oss-meetings-row .oss-meetings-td {
        border: none !important;
        padding: 0.65rem 0.85rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        text-align: right;
    }

    #housesSection.oss-meetings-root .oss-meetings-row .oss-meetings-td::before {
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--oss-text-dim);
        flex-shrink: 0;
        text-align: left;
        max-width: 42%;
    }

    #housesSection.oss-meetings-root .oss-meetings-td--address {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    #housesSection.oss-meetings-root .oss-meetings-td--address::before {
        max-width: 100%;
        margin-bottom: 0.35rem;
    }

    #housesSection.oss-meetings-root .oss-meetings-td--period::before,
    #housesSection.oss-meetings-root .oss-meetings-td--quorum::before {
        padding-top: 0.2rem;
    }

    #housesSection.oss-meetings-root .oss-meetings-td--actions {
        justify-content: flex-end;
    }

    #housesSection.oss-meetings-root .oss-meetings-td--actions::before {
        content: 'Действия';
    }

    #housesSection.oss-meetings-root .oss-meetings-empty-row td::before {
        display: none;
    }
}

/* ═══════════ Глобально: все разделы, таблицы, поля ввода ═══════════ */

#mainApp .main-section-content {
    padding: 0 1rem 2.5rem;
    color: var(--oss-text);
    font-family: var(--oss-font);
}

#mainApp .section-title,
#mainApp h2.section-title,
#mainApp .admin-container > h2.section-title {
    color: var(--oss-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

#mainApp .section-subtitle,
#mainApp .section-header p {
    color: var(--oss-text-muted);
}

#mainApp .section-header {
    border-bottom: 1px solid var(--oss-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* —— Новости —— */
#mainApp #newsSection .news-header {
    border-bottom: 1px solid var(--oss-border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

#mainApp #newsSection .news-filter,
#mainApp .news-filter {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    border-radius: var(--oss-radius-sm);
    padding: 0.5rem 0.75rem;
    font-family: var(--oss-font);
}

#mainApp .news-cards-grid {
    gap: 1.1rem;
}

#mainApp .news-card {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    box-shadow: var(--oss-shadow) !important;
    color: var(--oss-text);
    border-radius: var(--oss-radius) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#mainApp .news-card:hover {
    border-color: rgba(59, 130, 246, 0.35) !important;
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

#mainApp .news-card-category {
    color: var(--oss-accent-c);
}

#mainApp .news-card-title {
    color: var(--oss-text);
}

#mainApp .news-card-meta,
#mainApp .news-card-excerpt {
    color: var(--oss-text-muted);
}

#mainApp .news-empty {
    color: var(--oss-text-muted);
    background: var(--oss-bg-panel);
    border: 1px dashed var(--oss-border);
    border-radius: var(--oss-radius);
    padding: 2rem;
}

#mainApp .news-modal-overlay,
#mainApp .news-modal-overlay.news-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#mainApp .news-modal-card {
    background: var(--oss-bg-elevated);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    box-shadow: var(--oss-shadow);
    border-radius: var(--ds-radius-modal);
}

#mainApp #newsDetailModal #newsDetailTitle,
#mainApp #newsDetailModal .news-detail-category {
    color: var(--oss-text);
}

#mainApp #newsDetailModal .news-detail-meta,
#mainApp #newsDetailModal .news-detail-content {
    color: var(--oss-text-muted);
}

#mainApp .news-modal-close-btn {
    color: var(--oss-text-muted);
}

#mainApp .news-comment-textarea {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    border-radius: var(--oss-radius-sm);
}

/* —— Дома (список МКД) —— */
#mainApp #houses-infoSection .houses-info-container {
    color: var(--oss-text);
}

#mainApp #houses-infoSection .house-card,
#mainApp .house-card {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    box-shadow: var(--oss-shadow) !important;
    color: var(--oss-text) !important;
    border-radius: var(--oss-radius) !important;
}

#mainApp #houses-infoSection .house-card h3,
#mainApp .house-card h3 {
    color: var(--oss-text) !important;
}

#mainApp #houses-infoSection .house-card [style*='color: #'],
#mainApp .house-card [style*='color:#'] {
    color: var(--oss-text-muted) !important;
}

#mainApp #houses-infoSection .house-actions-dropdown-panel,
#mainApp .house-card .house-actions-dropdown-panel {
    background: var(--oss-bg-panel) !important;
    border: 1px solid var(--oss-border) !important;
    box-shadow: var(--oss-shadow) !important;
    color: var(--oss-text) !important;
}

#mainApp #houses-infoSection .house-actions-dropdown-item,
#mainApp .house-card .house-actions-dropdown-item {
    color: var(--oss-text) !important;
}

#mainApp #houses-infoSection .house-actions-dropdown-item:hover,
#mainApp .house-card .house-actions-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.12) !important;
}

#mainApp #houses-infoSection .house-actions-dropdown-item--danger,
#mainApp .house-card .house-actions-dropdown-item--danger {
    color: #fca5a5 !important;
}

#mainApp #houses-infoSection .house-actions-dropdown-item--danger:hover,
#mainApp .house-card .house-actions-dropdown-item--danger:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* —— Админка —— */
#mainApp #adminSection .admin-container {
    color: var(--oss-text);
}

#mainApp .admin-tabs-main {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius-sm);
    padding: 0.25rem;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#mainApp .admin-tabs-main .admin-group-btn {
    border-radius: var(--oss-radius-sm);
    color: var(--oss-text-muted);
    border: 1px solid transparent;
    background: transparent;
}

#mainApp .admin-tabs-main .admin-group-btn:hover {
    color: var(--oss-text);
    background: rgba(59, 130, 246, 0.1);
}

#mainApp .admin-tabs-main .admin-group-btn.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.35), rgba(139, 92, 246, 0.4));
    border-color: rgba(139, 92, 246, 0.45);
}

#mainApp #adminSubTabs.admin-sub-tabs {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius-sm);
    padding: 0.35rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

#mainApp #adminSubTabs .admin-tab-btn {
    color: var(--oss-text-muted);
    border-radius: 999px;
    border: none;
    background: transparent;
    transition: color 0.2s ease, background 0.2s ease;
}

#mainApp #adminSubTabs .admin-tab-btn:hover {
    color: var(--oss-text);
    background: rgba(148, 163, 184, 0.1);
}

#mainApp #adminSubTabs .admin-tab-btn.active {
    color: #fff;
    background: linear-gradient(90deg, var(--oss-accent-a), var(--oss-accent-b));
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

#mainApp .admin-tab-content {
    background: transparent;
    color: var(--oss-text);
}


/* —— Таблицы (все data-table + house-meetings вне oss) —— */
#mainApp .table-container,
#mainApp .contracts-table-container {
    background: rgba(17, 24, 39, 0.5) !important;
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius);
    overflow: auto;
    box-shadow: var(--oss-shadow);
}

#mainApp .data-table {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
}

#mainApp .data-table thead {
    background: rgba(15, 23, 42, 0.95) !important;
}

#mainApp .data-table th {
    color: var(--ds-text-muted) !important;
    border-bottom: 1px solid var(--oss-border) !important;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 14px 16px !important;
}

#mainApp .data-table td {
    color: var(--oss-text-muted) !important;
    border-bottom: 1px solid rgba(31, 42, 68, 0.85) !important;
    padding: 14px 16px !important;
}

#mainApp .data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

#mainApp #votingMeetingsTable.house-meetings-table,
#mainApp .meetings-table-container .house-meetings-table:not(.oss-meetings-table) {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius);
    overflow: hidden;
}

#mainApp #votingMeetingsTable.house-meetings-table thead,
#mainApp .meetings-table-container .house-meetings-table:not(.oss-meetings-table) thead {
    background: rgba(15, 23, 42, 0.95);
}

#mainApp #votingMeetingsTable.house-meetings-table th,
#mainApp #votingMeetingsTable.house-meetings-table td,
#mainApp .meetings-table-container .house-meetings-table:not(.oss-meetings-table) th,
#mainApp .meetings-table-container .house-meetings-table:not(.oss-meetings-table) td {
    color: var(--oss-text-muted);
    border-color: rgba(148, 163, 184, 0.1);
}

#mainApp #votingMeetingsTable.house-meetings-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

/* —— Поля ввода и формы —— */
#mainApp .form-control,
#mainApp input[type='text'],
#mainApp input[type='email'],
#mainApp input[type='password'],
#mainApp input[type='tel'],
#mainApp input[type='search'],
#mainApp input[type='number'],
#mainApp input[type='date'],
#mainApp input[type='time'],
#mainApp input[type='datetime-local'],
#mainApp select,
#mainApp textarea {
    font-family: var(--oss-font);
    background: var(--oss-bg-panel) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text) !important;
    border-radius: var(--ds-radius-btn) !important;
    box-shadow: none !important;
}

#mainApp select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.35rem !important;
    background-image: var(--ds-select-chevron) !important;
    background-repeat: no-repeat !important;
    background-position: right 0.65rem center !important;
    background-size: 1rem !important;
    cursor: pointer;
}

#mainApp .form-control::placeholder,
#mainApp input::placeholder,
#mainApp textarea::placeholder {
    color: var(--oss-text-dim);
}

#mainApp .form-control:focus,
#mainApp input:focus,
#mainApp select:focus,
#mainApp textarea:focus {
    outline: none !important;
    border-color: rgba(59, 130, 246, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

#mainApp input[type='file'].form-control {
    padding: 0.5rem;
    font-size: 0.85rem;
}

#mainApp input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0 0.35rem 0 0;
    flex-shrink: 0;
    border: 2px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-surface-1);
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    transition: var(--ds-transition);
}

#mainApp input[type='checkbox']:hover {
    border-color: rgba(59, 130, 246, 0.55);
}

#mainApp input[type='checkbox']:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

#mainApp input[type='checkbox']:checked {
    background: linear-gradient(135deg, var(--ds-accent-from), var(--ds-accent-to));
    border-color: transparent;
}

#mainApp input[type='checkbox']:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

#mainApp input[type='radio'] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0 0.35rem 0 0;
    flex-shrink: 0;
    border: 2px solid var(--ds-border);
    border-radius: 50%;
    background: var(--ds-surface-1);
    cursor: pointer;
    vertical-align: middle;
    transition: var(--ds-transition);
}

#mainApp input[type='radio']:hover {
    border-color: rgba(59, 130, 246, 0.55);
}

#mainApp input[type='radio']:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

#mainApp input[type='radio']:checked {
    border-color: var(--ds-accent-from);
    box-shadow: inset 0 0 0 5px var(--ds-accent-from);
}

#mainApp label,
#mainApp .form-group label {
    color: var(--oss-text-muted);
}

/* —— Кнопки —— */
#mainApp .btn-secondary {
    background: var(--oss-bg-elevated) !important;
    color: var(--oss-text) !important;
    border: 1px solid var(--oss-border) !important;
}

#mainApp .btn-secondary:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    background: rgba(59, 130, 246, 0.12) !important;
}

#mainApp .btn-primary {
    background: linear-gradient(90deg, var(--oss-accent-a), var(--oss-accent-b)) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35) !important;
}

#mainApp .btn {
    transition: var(--ds-transition);
    border-radius: var(--ds-radius-btn);
}

#mainApp .btn:active:not(:disabled) {
    transform: scale(0.98);
}

#mainApp .btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

#mainApp .btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.35) !important;
}

#mainApp .btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35) !important;
}

#mainApp .btn-danger:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#mainApp .btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
}

#mainApp .btn-sm {
    border-radius: var(--ds-radius-sm);
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}

#mainApp .btn-lg,
#mainApp .btn.btn-lg {
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
    border-radius: var(--ds-radius-btn);
}

/* —— Карточка собрания (детальный вид) —— */
#mainApp .meeting-detail-view {
    color: var(--oss-text);
    padding: 0 0.25rem;
}

#mainApp .meeting-detail-view .house-selector-bar {
    margin-bottom: 1rem;
}

#mainApp #meetingDetailTitle {
    color: var(--oss-text);
}

#mainApp .meeting-tabs {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius-sm);
    padding: 0.35rem;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#mainApp .meeting-tab-btn {
    color: var(--oss-text-muted);
    background: transparent;
    border: none;
    border-radius: var(--oss-radius-sm);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#mainApp .meeting-tab-btn:hover {
    color: var(--oss-text);
    background: rgba(59, 130, 246, 0.1);
}

#mainApp .meeting-tab-btn.active {
    color: #fff;
    background: linear-gradient(90deg, var(--oss-accent-a), var(--oss-accent-b));
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

#mainApp .meeting-tab-btn.active::after {
    display: none;
}

#mainApp .meeting-tab-content {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius);
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    color: var(--oss-text-muted);
}

/* —— Профиль —— */
#mainApp #profileSection .profile-card,
#mainApp #profileSection [class*='profile'] {
    color: var(--oss-text);
}

#mainApp #profileSection .info-label,
#mainApp .info-label {
    color: var(--oss-text-dim);
}

#mainApp #profileSection .info-value,
#mainApp .info-value {
    color: var(--oss-text);
}

#mainApp #profileSection .profile-card {
    background: var(--oss-bg-elevated);
    border: 1px solid var(--oss-border);
    border-radius: var(--oss-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--oss-shadow);
}

#mainApp #profileSection .profile-card h3 {
    color: var(--oss-text);
    margin-top: 0;
}

#mainApp #profileSection .profile-card p {
    color: var(--oss-text-muted) !important;
}

/* —— Меню пользователя —— */
#mainApp .user-menu-dropdown {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    box-shadow: var(--oss-shadow) !important;
    border-radius: var(--oss-radius-sm) !important;
}

#mainApp .user-menu-title {
    color: var(--oss-text-muted);
}

#mainApp .user-menu-item {
    color: var(--oss-text);
}

#mainApp .user-menu-item:hover {
    background: rgba(59, 130, 246, 0.12);
}

/* —— Уведомления —— */
#notificationContainer.notification-container .notification {
    border-radius: var(--oss-radius-sm);
    border: 1px solid var(--oss-border);
    font-family: var(--oss-font);
    background: var(--oss-bg-elevated);
    color: var(--oss-text);
    box-shadow: var(--oss-shadow);
}

#notificationContainer .notification-title {
    color: var(--oss-text);
}

#notificationContainer .notification-message {
    color: var(--oss-text-muted);
}

#notificationContainer .notification-close {
    color: var(--oss-text-muted);
}

#notificationContainer .notification.success {
    border-color: rgba(34, 197, 94, 0.35);
}

#notificationContainer .notification.warning {
    border-color: rgba(234, 179, 8, 0.4);
}

#notificationContainer .notification.error {
    border-color: rgba(239, 68, 68, 0.45);
}

#notificationContainer .notification.info {
    border-color: rgba(59, 130, 246, 0.4);
}

/* —— Модальные окна (общие + тарифы) —— */
#mainApp .modal-overlay,
#modalOverlay.modal-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#mainApp .modal,
#modalOverlay .modal {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text) !important;
    border-radius: var(--ds-radius-modal) !important;
    box-shadow: var(--oss-shadow) !important;
    animation: ds-modal-in 0.22s ease;
}

@keyframes ds-modal-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#mainApp .modal .close-btn,
#modalOverlay .close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--ds-transition);
    line-height: 1;
    font-size: 1.35rem;
    color: var(--ds-text-muted);
    background: rgba(19, 24, 37, 0.9);
    border: 1px solid var(--ds-border);
}

#mainApp .modal .close-btn:hover,
#modalOverlay .close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fecaca;
}

#mainApp .modal .close-btn:active,
#modalOverlay .close-btn:active {
    transform: scale(0.96);
}

#mainApp .modal h2,
#mainApp .modal h3,
#modalOverlay .modal h2,
#modalOverlay .modal h3 {
    color: var(--oss-text);
}

#mainApp .tariffs-modal-overlay,
#tariffsModal.tariffs-modal-overlay,
#forgotPasswordModal.tariffs-modal-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#mainApp .tariffs-modal-content,
#tariffsModal .tariffs-modal-content,
#forgotPasswordModal .tariffs-modal-content {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text) !important;
    border-radius: var(--ds-radius-modal) !important;
    animation: ds-modal-in 0.22s ease;
}

#mainApp .tariffs-modal-body h2,
#mainApp .tariffs-modal-body h3,
#tariffsModal .tariffs-modal-body h2,
#forgotPasswordModal h2 {
    color: var(--oss-text) !important;
}

#mainApp .tariffs-modal-body p,
#tariffsModal .tariffs-modal-body p,
#forgotPasswordModal .tariffs-modal-body p {
    color: var(--oss-text-muted) !important;
}

/* —— Страница входа —— */
.login-page {
    font-family: var(--oss-font);
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(59, 130, 246, 0.2), transparent),
        var(--oss-bg-deep) !important;
    color: var(--oss-text);
}

.login-page .login-logo-text,
.login-page .login-promo-line {
    color: var(--oss-text) !important;
}

.login-page .login-card {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    box-shadow: var(--oss-shadow) !important;
    border-radius: var(--oss-radius) !important;
}

.login-page .login-title {
    color: var(--oss-text) !important;
}

.login-page .form-group label {
    color: var(--oss-text-muted) !important;
}

.login-page input[type='text'],
.login-page input[type='password'],
.login-page input[type='email'] {
    background: var(--oss-bg-panel) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text) !important;
    border-radius: var(--oss-radius-sm) !important;
}

.login-page .btn-secondary {
    background: var(--oss-bg-panel) !important;
    color: var(--oss-text) !important;
    border: 1px solid var(--oss-border) !important;
}

/* —— Редактор новости —— */
#mainApp #newsEditorModal.news-modal .news-modal-content,
#mainApp .news-editor-modal__card {
    background: var(--oss-bg-elevated) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text);
    border-radius: var(--ds-radius-modal) !important;
    box-shadow: var(--oss-shadow);
}

#mainApp #newsEditorModal .news-modal-header {
    border-bottom: 1px solid var(--oss-border);
}

#mainApp #newsEditorModal .news-modal-title,
#mainApp #newsModalTitle {
    color: var(--oss-text);
}

#mainApp #newsEditorModal .news-editor-modal__input,
#mainApp #newsTitleInput {
    background: var(--oss-bg-panel) !important;
    border: 1px solid var(--oss-border) !important;
    color: var(--oss-text) !important;
}

#mainApp #newsEditorModal .news-editor {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    border-radius: var(--oss-radius-sm);
    min-height: 200px;
}

#mainApp #newsEditorModal .news-tool-btn {
    background: rgba(30, 37, 56, 0.95);
    border: 1px solid var(--oss-border);
    color: var(--oss-text);
    border-radius: 8px;
}

#mainApp #newsEditorModal .news-tool-btn:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.15);
}

#mainApp #newsEditorModal .news-editor-hint,
#mainApp #newsEditorModal small.news-editor-hint {
    color: var(--oss-text-dim);
}

#mainApp #newsEditorModal .news-cover-preview {
    background: var(--oss-bg-panel);
    border: 1px dashed var(--oss-border);
    color: var(--oss-text-muted);
}

/* Ошибки полей */
#mainApp .error-message,
#mainApp .field-error {
    color: #fca5a5 !important;
}

/* Кнопка меню в шапке */
#mainApp .user-menu-btn {
    background: var(--oss-bg-panel);
    border: 1px solid var(--oss-border);
    border-radius: 10px;
}

/* Ссылки */
#mainApp a:not(.main-section-btn):not(.user-menu-item):not(.news-read-btn):not(.btn) {
    color: #93c5fd;
    text-decoration: none;
    transition: var(--ds-transition);
}

#mainApp a:not(.main-section-btn):not(.user-menu-item):not(.news-read-btn):not(.btn):hover {
    color: #c4d4ff;
    text-decoration: underline;
    text-decoration-color: var(--ds-accent-to);
    text-underline-offset: 3px;
}

/* Скроллбары (WebKit) */
#mainApp ::-webkit-scrollbar,
.login-page ::-webkit-scrollbar,
#tariffsModal ::-webkit-scrollbar,
#tariffOrderModal ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#mainApp ::-webkit-scrollbar-thumb,
.login-page ::-webkit-scrollbar-thumb,
#tariffsModal ::-webkit-scrollbar-thumb,
#tariffOrderModal ::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.35);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

#mainApp ::-webkit-scrollbar-thumb:hover,
.login-page ::-webkit-scrollbar-thumb:hover,
#tariffsModal ::-webkit-scrollbar-thumb:hover,
#tariffOrderModal ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--ds-accent-from), var(--ds-accent-to));
    background-clip: padding-box;
}

#mainApp ::-webkit-scrollbar-track,
.login-page ::-webkit-scrollbar-track,
#tariffsModal ::-webkit-scrollbar-track,
#tariffOrderModal ::-webkit-scrollbar-track {
    background: rgba(7, 11, 18, 0.6);
}

/* ========== Design system: типографика, анимации, админка, модалки вне #mainApp ========== */

#mainApp h1,
#mainApp h2,
#mainApp h3,
#mainApp h4,
#mainApp h5,
#mainApp h6 {
    color: var(--ds-text);
    font-weight: 600;
    letter-spacing: -0.02em;
}

#mainApp p,
#mainApp span:not(.badge):not([class*='fa-']) {
    color: inherit;
}

#mainApp small,
#mainApp .hint,
#mainApp .text-muted {
    color: var(--ds-text-dim) !important;
}

#mainApp ul:not(.news-list):not([class*='toolbar']),
#mainApp ol {
    color: var(--ds-text-muted);
}

#mainApp ul:not([class*='toolbar']) li::marker {
    color: var(--ds-accent-from);
}

#mainApp .main-section-content {
    animation: ds-fade-in 0.28s ease;
}

@keyframes ds-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mainApp .meeting-tab-content {
    animation: ds-fade-in 0.22s ease;
}

#mainApp #profileSection .profile-card:hover,
#mainApp .profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ds-shadow-card);
    transition: var(--ds-transition);
}

#mainApp .house-card:hover {
    transform: translateY(-2px);
    transition: var(--ds-transition);
}

/* Тосты: снизу справа, тёмная тема */
#notificationContainer.notification-container {
    top: auto;
    bottom: 1.25rem;
    right: 1.25rem;
    flex-direction: column-reverse;
}

#notificationContainer .notification {
    border-radius: var(--ds-radius-btn) !important;
    border-left: 4px solid var(--ds-accent-from) !important;
}

#notificationContainer .notification::before {
    display: none;
}

#notificationContainer .notification.success {
    border-left-color: #22c55e !important;
}

#notificationContainer .notification.warning {
    border-left-color: #eab308 !important;
}

#notificationContainer .notification.error {
    border-left-color: #ef4444 !important;
}

#notificationContainer .notification.info {
    border-left-color: var(--ds-accent-from) !important;
}

#notificationContainer .notification-icon {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
}

#notificationContainer .notification.success .notification-icon {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
}

#notificationContainer .notification.warning .notification-icon {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #facc15 !important;
}

#notificationContainer .notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

#notificationContainer .notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
}

#notificationContainer .notification-close:hover {
    color: var(--ds-text) !important;
}

/* Модалки тарифов / заявка (вне #mainApp) */
#tariffsModal [style*='color: #333'],
#tariffsModal [style*='color:#333'],
#tariffOrderModal [style*='color: #333'],
#tariffOrderModal [style*='color:#333'],
#forgotPasswordModal [style*='color: #333'] {
    color: var(--ds-text) !important;
}

#tariffsModal [style*='color: #666'],
#tariffsModal [style*='color:#666'],
#tariffOrderModal [style*='color: #666'],
#tariffOrderModal [style*='color:#666'],
#tariffsModal [style*='color: #999'] {
    color: var(--ds-text-muted) !important;
}

#tariffsModal [style*='background: #fff'],
#tariffsModal [style*='background:#fff'],
#tariffsModal [style*='background: white'],
#tariffOrderModal [style*='background: #f8f7fc'],
#tariffOrderModal [style*='background:#f8f7fc'] {
    background: var(--ds-surface-1) !important;
    border-color: var(--ds-border) !important;
    color: var(--ds-text) !important;
}

#tariffOrderModal select,
#tariffOrderModal input[type='text'],
#tariffOrderModal input[type='email'],
#tariffOrderModal input[type='tel'] {
    background: var(--ds-surface-1) !important;
    border: 1px solid var(--ds-border) !important;
    color: var(--ds-text) !important;
    border-radius: var(--ds-radius-btn) !important;
}

#tariffOrderModal select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.35rem !important;
    background-image: var(--ds-select-chevron) !important;
    background-repeat: no-repeat !important;
    background-position: right 0.65rem center !important;
    background-size: 1rem !important;
}

#tariffsModal .tariff-period-btn:not(.active) {
    background: var(--ds-surface-1) !important;
    color: var(--ds-text-muted) !important;
    border: 2px solid var(--ds-border) !important;
}

#tariffsModal .tariff-period-btn.active {
    color: #fff !important;
}

#forgotPasswordModal input[type='email'] {
    background: var(--ds-surface-1) !important;
    border: 1px solid var(--ds-border) !important;
    color: var(--ds-text) !important;
    border-radius: var(--ds-radius-btn) !important;
}

.tariffs-modal-close,
#tariffsModalClose,
#tariffOrderModalClose {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    transition: var(--ds-transition);
    border: 1px solid var(--ds-border);
    background: rgba(19, 24, 37, 0.95);
    color: var(--ds-text-muted);
}

.tariffs-modal-close:hover,
#tariffsModalClose:hover,
#tariffOrderModalClose:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fecaca;
}

#mainApp .news-modal-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ds-border);
    background: rgba(19, 24, 37, 0.9);
    transition: var(--ds-transition);
}

#mainApp .news-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.55);
    color: #fecaca;
}

/* Админка: тёмная навигация (полная ширина; боковая колонка 260px — при появлении aside в разметке) */
#mainApp #adminSection .admin-tabs-main,
#mainApp #adminSection #adminSubTabs {
    background: var(--ds-sidebar) !important;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
}

#mainApp #adminSection .admin-tabs-main .admin-group-btn.active {
    position: relative;
}

#mainApp #adminSection .admin-tabs-main .admin-group-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--ds-accent-from), var(--ds-accent-to));
}

#mainApp #adminSection .section-title,
#mainApp #adminSection h2.section-title,
#mainApp #adminSection .section-header h2 {
    color: var(--ds-text) !important;
    font-family: var(--ds-font) !important;
    font-weight: 600 !important;
}

#mainApp #adminSection .section-subtitle,
#mainApp #adminSection p[style*='color: #666'] {
    color: var(--ds-text-muted) !important;
}

#mainApp #adminSection [style*='border: 1px solid #ddd'],
#mainApp #adminSection [style*='border: 1px solid #e0e0e0'],
#mainApp #adminSection [style*='border:1px solid #e0e0e0'] {
    border-color: var(--ds-border) !important;
    background: var(--ds-surface-1) !important;
}

#mainApp #adminSection [style*='background: #f8f9fa'],
#mainApp #adminSection [style*='background:#f8f9fa'],
#mainApp #adminSection [style*='background: #f5f5f5'],
#mainApp #adminSection [style*='background:#f5f5f5'],
#mainApp #adminSection [style*='background: #f0f7ff'],
#mainApp #adminSection [style*='background:#f0f7ff'] {
    background: var(--ds-surface-1) !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border) !important;
}

#mainApp #adminSection [style*='color: #666'],
#mainApp #adminSection [style*='color:#666'],
#mainApp #adminSection [style*='color: #999'],
#mainApp #adminSection [style*='color:#999'],
#mainApp #adminSection [style*='color: #333'],
#mainApp #adminSection [style*='color:#333'] {
    color: var(--ds-text-muted) !important;
}

#mainApp #adminSection [style*='border-top: 1px solid #e8e8e8'] {
    border-top-color: var(--ds-border) !important;
}

#mainApp #reportsPagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem !important;
}

#mainApp #reportsPagination span {
    color: var(--ds-text-muted);
    font-size: 0.875rem;
}

#mainApp .loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--ds-text-muted) !important;
    padding: 2rem 1rem !important;
}

#mainApp .loading::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--ds-border);
    border-top-color: var(--ds-accent-from);
    border-right-color: var(--ds-accent-to);
    animation: ds-spin 0.75s linear infinite;
}

@keyframes ds-spin {
    to {
        transform: rotate(360deg);
    }
}

#mainApp .empty-state {
    color: var(--ds-text-muted) !important;
    background: var(--ds-surface-1);
    border: 1px dashed var(--ds-border);
    border-radius: var(--ds-radius-card);
    padding: 2.5rem 1.5rem !important;
}

#mainApp .empty-state::before {
    filter: saturate(0.85);
    opacity: 0.9;
}

#mainApp .ds-skeleton,
#mainApp .skeleton-line {
    border-radius: var(--ds-radius-sm);
    background: linear-gradient(
        90deg,
        rgba(31, 42, 68, 0.6) 0%,
        rgba(59, 130, 246, 0.12) 50%,
        rgba(31, 42, 68, 0.6) 100%
    );
    background-size: 200% 100%;
    animation: ds-shimmer 1.2s ease-in-out infinite;
}

@keyframes ds-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

#mainApp .progress-bar {
    background: var(--ds-surface-1) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-sm) !important;
    overflow: hidden;
}

#mainApp .progress-bar-fill {
    border-radius: var(--ds-radius-sm) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

#mainApp progress {
    width: 100%;
    height: 0.5rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    background: var(--ds-surface-1);
}

#mainApp progress::-webkit-progress-bar {
    background: var(--ds-surface-1);
    border-radius: 999px;
}

#mainApp progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ds-accent-from), #60a5fa);
}

#mainApp progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--ds-accent-from), #60a5fa);
    border-radius: 999px;
}

#mainApp .badge,
#mainApp .status-badge,
#mainApp [class*='badge-'] {
    border-radius: 30px;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--ds-transition);
}

#mainApp .user-menu-item:last-child:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fecaca !important;
}

.login-page .btn {
    transition: var(--ds-transition);
}

.login-page .btn:active:not(:disabled) {
    transform: scale(0.98);
}

.login-page .btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.login-page input:focus-visible {
    outline: none;
    border-color: rgba(59, 130, 246, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Отдельные страницы с #mainApp.container (напр. tariffs.html) */
#mainApp.container {
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Кнопки документов в карточке собрания — перебиваем старые inline-светлые стили */
#mainApp .document-item,
#mainApp button.document-item {
    background: var(--ds-surface-1) !important;
    border: 1px solid var(--ds-border) !important;
    color: var(--ds-text) !important;
    border-radius: var(--ds-radius-sm) !important;
    transition: var(--ds-transition);
}

#mainApp .document-item:hover,
#mainApp button.document-item:hover {
    border-color: rgba(59, 130, 246, 0.45) !important;
    background: rgba(59, 130, 246, 0.1) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#mainApp .document-item:active,
#mainApp button.document-item:active {
    transform: scale(0.98);
}

/* Модалки, вставляемые в document.body (вне #mainApp): вторичные кнопки всегда читаемы */
.modal-overlay .btn.btn-secondary,
.modal-overlay .btn-secondary {
    background: var(--ds-surface-2, #1a1f2e) !important;
    color: var(--ds-text, #e5e7eb) !important;
    border: 1px solid var(--ds-border, #1f2a44) !important;
}

.modal-overlay .btn.btn-secondary:hover,
.modal-overlay .btn-secondary:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    color: #fff !important;
}

#mainApp #broadcastToolbar {
    background: var(--ds-surface-2) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-btn) !important;
}

#mainApp .format-btn {
    background: var(--ds-surface-1) !important;
    border: 1px solid var(--ds-border) !important;
    color: var(--ds-text) !important;
    border-radius: var(--ds-radius-btn) !important;
}

#mainApp .format-btn:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    color: #fff !important;
}

#mainApp .format-btn__icon {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* —— Панель «Массовое голосование» / документы / права в модалке / аналитика —— */

#mainApp .decisions-bulk-toolbar {
    margin-bottom: 15px;
    padding: 14px 16px;
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    box-shadow: var(--ds-shadow-card);
    transition: var(--ds-transition);
}

#mainApp .decisions-bulk-toolbar:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

#mainApp .documents-layout {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

#mainApp .documents-layout--single {
    grid-template-columns: 1fr;
}

#mainApp .documents-layout--cols {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
    #mainApp .documents-layout--cols {
        grid-template-columns: 1fr;
    }
}

#mainApp .document-group {
    background: var(--ds-surface-1);
    padding: 20px;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-shadow-card);
}

#mainApp .document-group--spaced {
    margin-top: 20px;
}

#mainApp .document-group__title {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-text-muted);
}

/* Права на помещение (модалка) */
.modal-overlay .rights-tab-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.modal-overlay .rights-tab-input {
    flex: 1 1 140px;
    min-width: 0;
}

.modal-overlay .rights-tab-select {
    flex: 1 1 160px;
    min-width: 0;
}

.modal-overlay .rights-share-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--ds-radius-btn);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    background: linear-gradient(135deg, var(--ds-accent-from), var(--ds-accent-to));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.modal-overlay .rights-share-banner__add {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--ds-radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(11, 15, 26, 0.35);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--ds-transition);
}

.modal-overlay .rights-share-banner__add:hover {
    transform: translateY(-2px);
    background: rgba(11, 15, 26, 0.55);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.modal-overlay .rights-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-surface-1);
}

.modal-overlay .rights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modal-overlay .rights-table thead {
    background: var(--ds-surface-2);
}

.modal-overlay .rights-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--ds-text);
    border-bottom: 2px solid var(--ds-border);
    white-space: nowrap;
}

.modal-overlay .rights-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--ds-border);
    color: var(--ds-text-muted);
    vertical-align: middle;
}

.modal-overlay .rights-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

.modal-overlay .rights-table__actions {
    white-space: nowrap;
}

.modal-overlay .rights-table__actions .meetings-row-delete-btn {
    margin-left: 6px;
    vertical-align: middle;
}

.modal-overlay .rights-owner-icon {
    margin-right: 6px;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .modal-overlay .rights-table thead {
        display: none;
    }

    .modal-overlay .rights-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--ds-border);
        border-radius: var(--ds-radius-card);
        overflow: hidden;
        background: var(--ds-surface-1);
    }

    .modal-overlay .rights-table td {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--ds-border);
        box-sizing: border-box;
    }

    .modal-overlay .rights-table td:last-child {
        border-bottom: none;
    }

    .modal-overlay .rights-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        color: var(--ds-text-dim);
        text-transform: uppercase;
        margin-bottom: 6px;
    }

    .modal-overlay .rights-table__actions {
        text-align: left;
    }
}

/* Модалка: тип массового голосования */
.modal-overlay .bulk-vote-type-modal {
    max-width: 500px;
    width: 100%;
}

.modal-overlay .bulk-vote-type-modal__title {
    margin: 0 0 20px 0;
    color: var(--ds-text);
    font-size: 1.35rem;
    font-weight: 700;
}

.modal-overlay .bulk-vote-type-modal__info {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
}

.modal-overlay .bulk-vote-type-modal__info-line {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--ds-text);
    font-size: 14px;
}

.modal-overlay .bulk-vote-type-modal__info-hint {
    margin: 0;
    color: var(--ds-text-muted);
    font-size: 14px;
}

.modal-overlay .bulk-vote-type-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-overlay .bulk-vote-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--ds-radius-btn);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--ds-border);
    background: var(--ds-surface-2);
    color: var(--ds-text);
    transition: var(--ds-transition);
    text-align: left;
    width: 100%;
}

.modal-overlay .bulk-vote-option:hover {
    border-color: rgba(59, 130, 246, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.modal-overlay .bulk-vote-option--yes {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.1);
}

.modal-overlay .bulk-vote-option--no {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
}

.modal-overlay .bulk-vote-option--abstain {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.08);
}

.modal-overlay .bulk-vote-option--clear {
    border-color: rgba(156, 163, 175, 0.4);
    background: rgba(107, 114, 128, 0.12);
}

.modal-overlay .bulk-vote-type-modal__footer {
    justify-content: flex-end;
}

/* Прогресс массового голосования */
.modal-overlay .bulk-vote-progress-modal__hint {
    margin: 0;
    color: var(--ds-text-muted);
    font-size: 14px;
}

.modal-overlay .bulk-vote-progress-track {
    width: 100%;
    height: 35px;
    background: var(--ds-surface-1);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--ds-border);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.modal-overlay .bulk-vote-progress-fill {
    height: 100%;
    transition: width 0.28s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.modal-overlay .bulk-vote-status-wrap {
    margin-bottom: 25px;
    min-height: 50px;
}

.modal-overlay .bulk-vote-status-msg {
    color: var(--ds-text-muted);
    font-size: 14px;
    padding: 12px 14px;
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-btn);
    text-align: center;
}

.modal-overlay .bulk-vote-status-msg--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    text-align: left;
}

.modal-overlay .bulk-vote-error-line {
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--ds-radius-sm);
    font-size: 12px;
    color: var(--ds-text);
}

/* Аналитика: прокрутка и анимации */
#analyticsContent .analytics-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
    border-radius: 12px;
}

#analyticsContent .animated-progress {
    transition: width 0.42s ease-out;
}

#analyticsContent .animated-dot,
#analyticsContent .animated-label {
    transition: left 0.42s ease-out;
}

@media (max-width: 768px) {
    #analyticsContent .analytics-toolbar {
        flex-direction: column;
        align-items: stretch !important;
    }

    #analyticsContent .analytics-table thead {
        display: none;
    }

    #analyticsContent .analytics-table,
    #analyticsContent .analytics-table tbody,
    #analyticsContent .analytics-table tr,
    #analyticsContent .analytics-table td {
        display: block;
        width: 100%;
    }

    #analyticsContent .analytics-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--ds-border);
        border-radius: var(--ds-radius-card);
        background: var(--ds-surface-1);
        overflow: hidden;
    }

    #analyticsContent .analytics-table td {
        border-bottom: 1px solid var(--ds-border);
        box-sizing: border-box;
    }

    #analyticsContent .analytics-table td:last-child {
        border-bottom: none;
    }

    #analyticsContent .analytics-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        color: var(--ds-text-muted);
        text-transform: uppercase;
        margin-bottom: 6px;
    }
}

/* Выгрузка драфта / персональных решений — тёмные карточки */
#mainApp .document-export-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    #mainApp .document-export-grid {
        grid-template-columns: 1fr;
    }
}

#mainApp .document-export-card {
    padding: 20px;
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-border);
    background: var(--ds-surface-1);
    box-shadow: var(--ds-shadow-card);
}

#mainApp .document-export-card--draft {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(165deg, rgba(59, 130, 246, 0.1) 0%, var(--ds-surface-1) 52%);
}

#mainApp .document-export-card--personal {
    border-color: rgba(251, 191, 36, 0.35);
    background: linear-gradient(165deg, rgba(251, 191, 36, 0.08) 0%, var(--ds-surface-1) 52%);
}

#mainApp .document-export-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--ds-radius-btn);
}

#mainApp .document-export-card__icon {
    font-size: 20px;
    line-height: 1;
}

#mainApp .document-export-card__btn--amber {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fff;
    transition: var(--ds-transition);
}

#mainApp .document-export-card__btn--amber:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
}

#mainApp .document-export-card__hint {
    margin: 12px 0 0 0;
    font-size: 12px;
    color: var(--ds-text-muted);
    text-align: center;
    line-height: 1.45;
}

/* —— Модуль выбора адреса (поверх окна «Создать собрание», position: fixed) —— */

#modalOverlay .modal .address-field-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

#modalOverlay .modal .address-field-row__input {
    flex: 1;
    min-width: 0;
}

#modalOverlay .modal .address-field-row__btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
}

#modalOverlay .modal .address-field-hint {
    display: block;
    margin-top: 8px;
    color: var(--oss-text-muted, var(--text-secondary));
    font-size: 12px;
    line-height: 1.45;
}

#modalOverlay .address-picker-module {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

#modalOverlay .address-picker-module:not([hidden]) {
    display: flex;
}

#modalOverlay .address-picker-module__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: inherit;
}

#modalOverlay .modal .address-picker-module__sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: min(72vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--oss-bg-elevated, var(--bg-primary));
    border: 1px solid var(--oss-border, var(--border-color));
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: ds-modal-in 0.2s ease;
}

#modalOverlay .modal .address-picker-module__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--oss-border, var(--border-color));
}

#modalOverlay .modal .address-picker-module__header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

#modalOverlay .modal .address-picker-module__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1px solid var(--oss-border, var(--border-color));
    background: rgba(19, 24, 37, 0.65);
    color: var(--oss-text-muted, #94a3b8);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: var(--ds-transition, 0.15s ease);
}

#modalOverlay .modal .address-picker-module__close:hover {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.15);
}

#modalOverlay .modal .address-picker-module__search-wrap {
    padding: 12px 16px 8px;
}

#modalOverlay .modal .address-picker-module__list {
    flex: 1;
    min-height: 120px;
    max-height: 42vh;
    overflow-y: auto;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
}

#modalOverlay .modal .address-picker-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--oss-border, rgba(255, 255, 255, 0.06));
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.12s ease;
}

#modalOverlay .modal .address-picker-item:last-child {
    border-bottom: none;
}

#modalOverlay .modal .address-picker-item:hover,
#modalOverlay .modal .address-picker-item:focus-visible {
    background: rgba(59, 130, 246, 0.12);
    outline: none;
}

#modalOverlay .modal .address-picker-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--oss-text-muted, var(--text-secondary));
    font-size: 14px;
}

#modalOverlay .modal .address-picker-module__footer {
    padding: 12px 16px 14px;
    border-top: 1px solid var(--oss-border, var(--border-color));
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 520px) {
    #modalOverlay .modal .address-picker-module__sheet {
        width: 100%;
        max-height: 78vh;
        align-self: flex-end;
        border-radius: 14px 14px 0 0;
    }
}
