/**
 * Редизайн БИЗ.Дельники — целевая визуальная концепция
 * Тёмная шапка, жёлтый акцент, светлый контент, тёмный подвал.
 * Подключается после style.css и vc-style.css.
 */

/* --- Токены редизайна --- */
:root {
    --header-bg: #1a1a1a;
    --header-bg-gradient: linear-gradient(90deg, #1a1a1a 0%, #252525 70%, #2d2a22 100%);
    --header-text: rgba(255, 255, 255, 0.95);
    --header-text-muted: rgba(255, 255, 255, 0.7);
    --header-border: rgba(255, 255, 255, 0.08);
    --footer-bg: #1a1a1a;
    --footer-text: rgba(255, 255, 255, 0.85);
    --footer-text-muted: rgba(255, 255, 255, 0.6);
    --footer-link-hover: var(--accent);
    --redesign-accent: #FFD700;
    --redesign-accent-hover: #FFC700;
    --redesign-content-bg: #f0f0f0;
}

/* --- Шапка: тёмная панель --- */
.site-header {
    background: var(--header-bg-gradient);
    border-bottom: 1px solid var(--header-border);
    padding: var(--space-3) 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.site-header .header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo center right";
    align-items: center;
    gap: var(--space-6);
    flex-wrap: nowrap;
}

.site-header .logo-section {
    grid-area: logo;
}

.site-header .header-end {
    grid-area: right;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.site-header .logo {
    color: var(--header-text);
}

.site-header .logo:hover {
    color: var(--redesign-accent);
}

.site-header .logo-text {
    background: none;
    -webkit-text-fill-color: var(--header-text);
    color: var(--header-text);
}

.site-header .logo:hover .logo-text {
    color: var(--redesign-accent);
    -webkit-text-fill-color: var(--redesign-accent);
}

.site-header .tagline {
    color: var(--header-text-muted);
    font-size: 0.7rem;
}

/* Центральная зона: поиск — по умолчанию иконка, по клику полноэкранное поле */
.site-header .header-center {
    grid-area: center;
    justify-self: center;
}

.site-header .header-search-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопка поиска = один круг с иконкой по центру (иконка на кнопке, а не рядом) */
.site-header .header-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--header-text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

/* Иконка строго внутри кнопки (переопределяем position: absolute из style.css) */
.site-header .header-search-toggle .header-search-icon {
    position: static;
    display: block;
    width: 20px;
    height: 20px;
    margin: 0;
    left: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
    pointer-events: none;
    color: inherit;
    opacity: 0.9;
}

.site-header .header-search-toggle:hover .header-search-icon {
    opacity: 1;
}

.site-header .header-search-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--header-text);
}

.site-header .header-search-wrap {
    position: relative;
    width: 100%;
}

.site-header .header-search-wrap[hidden] {
    display: none !important;
}

/* Полноширинный поиск (оверлей) при открытии */
.site-header .header-search-wrap--overlay:not([hidden]) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--header-bg-gradient);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.site-header .header-search-wrap--overlay .header-search--fullwidth {
    flex: 1;
    max-width: 100%;
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--header-border);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: var(--header-text);
    font-size: 1rem;
}

.site-header .header-search-wrap--overlay .header-search--fullwidth::placeholder {
    color: var(--header-text-muted);
}

.site-header .header-search-wrap--overlay .header-search--fullwidth:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 255, 255, 0.18);
}

.site-header .header-search-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--header-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.site-header .header-search-close:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Правая зона: навигация + кнопка Опубликовать */
.site-header .header-right {
    grid-area: right;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.site-header .main-nav .nav-link {
    color: var(--header-text-muted);
    font-weight: var(--font-medium);
}

.site-header .main-nav .nav-link:hover {
    color: var(--header-text);
}

.site-header .header-actions .btn-link,
.site-header .header-actions-mobile .btn-link {
    color: var(--header-text-muted);
}

.site-header .header-actions .btn-link:hover,
.site-header .header-actions-mobile .btn-link:hover {
    color: var(--header-text);
}

.site-header .messages-link {
    color: var(--header-text-muted);
}

/* Кнопка «Опубликовать» в шапке */
.site-header .btn-publish-header {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--redesign-accent);
    color: #1a1a1a;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
}

.site-header .btn-publish-header:hover {
    background: var(--redesign-accent-hover);
    color: #1a1a1a;
    transform: translateY(-1px);
}

/* Бургер и мобильное меню в редизайне */
.site-header .burger-menu-btn span {
    background: var(--header-text);
}

.site-header .main-nav {
    background: transparent;
    border-left: none;
}

/* Пункты меню в шапке (десктоп): видимый текст, без «пустых» рамок */
.site-header .desktop-nav-inline .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--font-medium);
    border: none;
    background: transparent;
    padding: var(--space-2) var(--space-3);
}

.site-header .desktop-nav-inline .nav-link::before {
    display: none;
}

.site-header .desktop-nav-inline .nav-link:hover {
    color: var(--redesign-accent);
    box-shadow: none;
    transform: none;
}

.site-header .main-nav .nav-link {
    color: var(--header-text-muted);
}

.site-header .main-nav .nav-link:hover {
    color: var(--redesign-accent);
}

.site-header .mobile-menu-close {
    color: var(--header-text);
}

/* Unread badge в шапке на тёмном фоне */
.site-header .unread-badge-header {
    background: #dc2626;
    color: #fff;
}

/* --- Top nav bar (под шапкой): в стиле редизайна --- */
.top-nav-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.top-nav-link.active {
    background: var(--redesign-accent);
    color: #1a1a1a;
}

.top-nav-link.top-nav-write {
    background: rgba(255, 215, 0, 0.15);
    color: var(--text-primary);
}

.top-nav-link.top-nav-write:hover {
    background: var(--redesign-accent);
    color: #1a1a1a;
}

/* --- Шапка в одну строку: компактный индикатор напряжённости --- */
.site-header .tension-indicator {
    margin-left: 0;
    flex-shrink: 0;
}

.site-header .tension-indicator-btn {
    padding: var(--space-1) var(--space-3);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--header-border);
    color: var(--header-text-muted);
}

.site-header .tension-indicator-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: var(--header-text);
}

.site-header .tension-indicator-scale {
    width: 48px;
    height: 6px;
}

.site-header .tension-indicator-value {
    font-size: 0.75rem;
    min-width: 28px;
}

/* Бейджи сообщений/уведомлений в шапке всегда видны */
.site-header .unread-badge-header {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border-radius: var(--radius-full);
}

.site-header .messages-link {
    position: relative;
}

/* Шапка в одну строку: минимализм */
.site-header--oneline {
    padding: var(--space-2) 0;
}

.site-header--oneline .header-content--oneline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-4);
    min-height: 48px;
}

.site-header--oneline .logo-section {
    flex-shrink: 0;
}

.site-header--oneline .tagline--hidden-oneline {
    display: none;
}

.site-header--oneline .header-center {
    flex: 1;
    min-width: 0;
    max-width: 360px;
    margin: 0 var(--space-2);
}

.site-header--oneline .header-end--oneline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.site-header--oneline .header-right--oneline {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: nowrap;
}

/* Иконки в шапке (сообщения, офис) */
.header-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--header-text-muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.header-icon-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--header-text);
}

.header-icon {
    font-size: 1.25rem;
}

.header-icon-link--messages .unread-badge-header {
    top: 2px;
    right: 2px;
}

/* Уведомления в шапке (колокольчик + выпадающий список в стиле ВК) */
.header-notifications-wrap {
    position: relative;
}

.header-icon-link--notifications {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.header-icon-link--notifications .header-notifications-icon {
    display: block;
}

.header-notifications-badge {
    top: 2px;
    right: 2px;
}

.header-notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    width: min(380px, calc(100vw - 2rem));
    max-height: 70vh;
    background: var(--card-bg, #fff);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header-notifications-dropdown[hidden] {
    display: none !important;
}

.header-notifications-dropdown-inner {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.header-notifications-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color, #eee);
    flex-shrink: 0;
}

.header-notifications-title {
    margin: 0;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text, #1a1a1a);
}

.header-notifications-list {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 80px;
}

.header-notifications-loading {
    padding: var(--space-4);
    text-align: center;
    color: var(--muted, #666);
    font-size: var(--text-sm);
}

.header-notifications-items {
    padding: 0;
}

.header-notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text, #1a1a1a);
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background 0.15s;
}

.header-notification-item:last-of-type {
    border-bottom: none;
}

.header-notification-item:hover {
    background: var(--hover-bg, #f5f5f5);
}

.header-notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.header-notification-content {
    flex: 1;
    min-width: 0;
}

.header-notification-text {
    font-size: var(--text-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-notification-time {
    font-size: var(--text-xs);
    color: var(--muted, #666);
    margin-top: 2px;
}

.header-notification-empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--muted, #666);
    font-size: var(--text-sm);
}

.header-notifications-show-all {
    display: block;
    padding: var(--space-3) var(--space-4);
    text-align: center;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--primary, #2563eb);
    text-decoration: none;
    border-top: 1px solid var(--border-color, #eee);
    background: var(--hover-bg, #fafafa);
    transition: background 0.15s;
}

.header-notifications-show-all:hover {
    background: var(--border-color, #eee);
    color: var(--primary-hover, #1d4ed8);
}

/* Выпадающее меню пользователя (аватар + имя) */
.header-user-dropdown {
    position: relative;
}

.header-user-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    color: var(--header-text);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: background 0.2s;
}

.header-user-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    display: block;
}

.header-user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-chevron {
    font-size: 0.6rem;
    opacity: 0.8;
}

.header-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-1);
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-1);
    z-index: 1000;
}

.header-user-menu[hidden] {
    display: none !important;
}

.header-user-menu-item {
    display: block;
    padding: var(--space-2) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.header-user-menu-item:hover {
    background: var(--bg-secondary);
}

.site-header--oneline .btn-publish-header {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.site-header--oneline .btn-link--login {
    color: var(--header-text-muted);
    font-weight: var(--font-medium);
}

.site-header--oneline .btn-link--login:hover {
    color: var(--redesign-accent);
}

/* Адаптив: на узких экранах скрываем имя, оставляем аватар */
@media (max-width: 900px) {
    .header-user-name { display: none; }
    .site-header--oneline .header-center { max-width: 200px; }
}

/* Кнопка «Войти» в шапке — только на мобильной для неавторизованных */
.header-mobile-login-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--redesign-accent);
    transition: background 0.2s, color 0.2s;
}
.header-mobile-login-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: var(--redesign-accent-hover);
}
.header-mobile-login-btn svg {
    display: block;
}

/* На десктопе кнопка входа в шапке не показываем никогда */
@media (min-width: 769px) {
    .header-mobile-login-btn { display: none !important; }
}

/* Мобильная шапка: только логотип, кнопка входа (для гостей) и бургер */
@media (max-width: 768px) {
    .site-header--oneline .header-center { display: none !important; }
    .site-header--oneline .header-right--oneline { display: none !important; }
    .site-header--oneline .header-content--oneline { flex-wrap: nowrap; justify-content: space-between; gap: var(--space-2); align-items: center; }
    .site-header--oneline .logo-section { min-width: 0; }
    .site-header--oneline .header-end--oneline { gap: 14px; align-items: center; }
    .header-mobile-login-btn { display: flex !important; }
}

/* Десктоп: в шапке показываем только ссылки; мобильный drawer скрыт */
.desktop-nav-inline {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}
.mobile-drawer-only {
    display: none;
}

/* Мобильное выпадающее меню в стиле приложения (одним пальцем) */
@media (max-width: 768px) {
    .desktop-nav-inline { display: none !important; }
    .mobile-drawer-only { display: flex !important; flex-direction: column; flex: 1; min-height: 0; }
}

/* Drawer и нижняя панель — единая тёмная тема (как шапка) */
.main-nav--app-drawer {
    padding: 0 !important;
    background: var(--header-bg) !important;
    border-left: 1px solid var(--header-border);
}

.main-nav--app-drawer .mobile-drawer-header {
    background: var(--header-bg);
    border-bottom-color: var(--header-border);
}

.main-nav--app-drawer .mobile-drawer-title {
    color: var(--header-text);
}

.main-nav--app-drawer .mobile-menu-close {
    margin: 0 !important;
    align-self: center;
    width: 48px;
    height: 48px;
    font-size: 28px;
    color: var(--header-text-muted);
}

.main-nav--app-drawer .mobile-menu-close:hover {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.1);
}

.main-nav--app-drawer .mobile-drawer-body {
    background: var(--header-bg);
}

.main-nav--app-drawer .mobile-drawer-section {
    border-bottom-color: var(--header-border);
}

.main-nav--app-drawer .mobile-drawer-section-title {
    color: var(--header-text-muted);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.mobile-drawer-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3);
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer-section {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border);
}

.mobile-drawer-section:last-child {
    border-bottom: none;
}

.mobile-drawer-section-title {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
    padding: 0 var(--space-2);
}

.mobile-drawer-section .nav-links-wrapper,
.mobile-drawer-section .header-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: none;
    margin: 0;
}

.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    transition: background 0.15s;
}

.mobile-drawer-link:hover,
.mobile-drawer-link:focus {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mobile-drawer-link:active {
    background: var(--bg-tertiary);
}

.main-nav--app-drawer .mobile-drawer-link {
    color: var(--header-text);
}

.main-nav--app-drawer .mobile-drawer-link:hover,
.main-nav--app-drawer .mobile-drawer-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--header-text);
}

.main-nav--app-drawer .mobile-drawer-link:active {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-drawer-link-icon {
    font-size: 1.25rem;
}

.mobile-drawer-link--with-icon {
    position: relative;
}

.mobile-drawer-badge {
    margin-left: auto;
}

.mobile-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.mobile-drawer-btn:active {
    transform: scale(0.98);
}

.mobile-drawer-btn--publish {
    background: var(--redesign-accent);
    color: #1a1a1a;
    margin-bottom: var(--space-2);
}

.mobile-drawer-btn--publish:hover {
    background: var(--redesign-accent-hover);
    color: #1a1a1a;
}

.mobile-drawer-btn--login {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.mobile-drawer-btn--login:hover {
    background: var(--bg-tertiary);
    border-color: var(--redesign-accent);
    color: var(--redesign-accent);
}

.main-nav--app-drawer .mobile-drawer-profile {
    background: rgba(255, 255, 255, 0.08);
}

.main-nav--app-drawer .mobile-drawer-name {
    color: var(--header-text);
}

.main-nav--app-drawer .mobile-drawer-section .tension-indicator-btn {
    color: var(--header-text-muted);
}

.main-nav--app-drawer .mobile-drawer-section .tension-indicator-btn:hover {
    color: var(--header-text);
}

.mobile-drawer-profile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.mobile-drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.mobile-drawer-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.mobile-drawer-section .tension-indicator {
    padding: var(--space-2) var(--space-4);
}

.mobile-drawer-section .tension-indicator-btn {
    width: 100%;
    justify-content: flex-start;
}

/* --- Левое меню в стиле ВК (без лишнего top — контент вровень с центром и правой колонкой) --- */
.left-nav-vk {
    position: sticky;
    /* top: 72px; вровень с отступом контента от шапки */
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2);
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}

.left-nav-vk__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.left-nav-vk__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}

.left-nav-vk__item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.left-nav-vk__item.active {
    background: rgba(255, 215, 0, 0.15);
    color: var(--text-primary);
}

.left-nav-vk__item.active .left-nav-vk__icon {
    opacity: 1;
}

.left-nav-vk__icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.left-nav-vk__label {
    flex: 1;
    min-width: 0;
}

.left-nav-vk__badge {
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: var(--font-bold);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    line-height: 18px;
    text-align: center;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* Фильтр тем: слайдер между «Что нового?» и лентой */
.theme-filter-slider {
    margin: var(--space-4) 0;
    overflow: hidden;
}

.theme-filter-slider__track {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-2) 0;
    margin: 0 calc(-1 * var(--space-4, 1rem));
    padding-left: var(--space-4, 1rem);
    padding-right: var(--space-4, 1rem);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.theme-filter-slider__track::-webkit-scrollbar {
    height: 6px;
}

.theme-filter-slider__track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.theme-filter-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
    border: 1px solid transparent;
}

.theme-filter-pill:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-filter-pill.active {
    background: var(--redesign-accent);
    color: #1a1a1a;
    border-color: transparent;
}

/* --- Контент: светлый серый фон --- */
body {
    background: var(--redesign-content-bg);
}

.main-content.vc-style {
    background: transparent;
}

/* Десктоп: блок с тремя колонками — ровно по высоте экрана (минус шапка), колонки скроллятся независимо; подвал внизу страницы, виден только при прокрутке */
:root {
    --header-height: 56px;
}
@media (min-width: 769px) {
    body.vc-fixed-columns .main-content.vc-style {
        height: calc(100vh - var(--header-height));
        min-height: 0;
        overflow: hidden;
    }
    body.vc-fixed-columns .main-content.vc-style .vc-container {
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.vc-fixed-columns .vc-layout {
        flex: 1;
        min-height: 0;
        height: 100%;
        grid-template-rows: 1fr;
        align-items: stretch;
    }
    body.vc-fixed-columns .vc-sidebar-left,
    body.vc-fixed-columns .vc-center,
    body.vc-fixed-columns .vc-sidebar-right {
        position: relative;
        top: auto;
        max-height: none;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* Скрыть вертикальные скроллбары в трёх колонках и в левом меню (горизонтальные не трогаем) */
.vc-sidebar-left,
.vc-center,
.vc-sidebar-right,
.left-nav-vk {
    scrollbar-width: none;
}
.vc-sidebar-left::-webkit-scrollbar,
.vc-center::-webkit-scrollbar,
.vc-sidebar-right::-webkit-scrollbar,
.left-nav-vk::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Единый отступ контента от шапки для всех трёх колонок — только у контейнера */
.vc-container {
    padding-top: var(--space-4);
}
.vc-sidebar-left,
.vc-center,
.vc-sidebar-right {
    padding-top: 0;
}

/* Карточки сайдбаров и ленты — чуть более выраженные тени */
.vc-style .sidebar-section {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.vc-style .feed-card,
.vc-style .article-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

/* Кнопки «Подписаться» в стиле референса */
.theme-subscribe-btn,
.hashtag-subscribe-btn {
    background: #1a1a1a;
    color: var(--redesign-accent);
    border-radius: var(--radius-md);
}

.theme-subscribe-btn:hover,
.hashtag-subscribe-btn:hover,
.theme-subscribe-btn.subscribed,
.hashtag-subscribe-btn.subscribed {
    background: var(--redesign-accent);
    color: #1a1a1a;
}

/* Активная тема/хештег в сайдбаре: жёлтый фон, тёмный текст (контраст по ТЗ) */
.theme-link.active {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
}

.hashtag-link.active {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
}

/* --- Подвал: тёмный --- */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: var(--space-16);
    padding: var(--space-12) 0 var(--space-8);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.site-footer .footer-content {
    margin-bottom: var(--space-8);
}

.site-footer .footer-section h4 {
    color: var(--footer-text);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-4);
}

.site-footer .footer-section p,
.site-footer .footer-links a {
    color: var(--footer-text-muted);
    font-size: var(--text-sm);
}

.site-footer .footer-links a:hover {
    color: var(--footer-link-hover);
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-6);
    color: var(--footer-text-muted);
    font-size: var(--text-sm);
}

/* --- Этап 2: Блок «Что нового?» над лентой --- */
.feed-new-post.redesign-new-post {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.feed-new-post.redesign-new-post .feed-new-post-avatar {
    flex-shrink: 0;
    display: block;
}

.feed-new-post.redesign-new-post .feed-new-post-avatar .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.feed-new-post.redesign-new-post .feed-new-post-body {
    flex: 1;
    min-width: 0;
}

.feed-new-post.redesign-new-post .feed-new-post-placeholder {
    display: block;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: var(--text-base);
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    margin-bottom: var(--space-3);
}

.feed-new-post.redesign-new-post .feed-new-post-placeholder:hover {
    background: var(--bg-tertiary);
    border-color: rgba(255, 215, 0, 0.4);
    color: var(--text-secondary);
}

.feed-new-post.redesign-new-post .feed-new-post-actions {
    display: flex;
    justify-content: flex-end;
}

.feed-new-post.redesign-new-post .btn-publish-feed {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-5);
    background: var(--redesign-accent);
    color: #1a1a1a;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.feed-new-post.redesign-new-post .btn-publish-feed:hover {
    background: var(--redesign-accent-hover);
    color: #1a1a1a;
    transform: translateY(-1px);
}

/* --- Карточки ленты: скругления, тени, метрики --- */
.vc-style .feed-item {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.vc-style .feed-item:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 215, 0, 0.35);
}

.vc-style .feed-item .feed-image img,
.vc-style .feed-item .feed-image-news img {
    border-radius: 0;
}

.vc-style .feed-item .feed-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border);
}

.vc-style .feed-item .feed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
}

.vc-style .feed-item .feed-stat {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.vc-style .feed-item .feed-read-more {
    font-weight: var(--font-medium);
    color: var(--redesign-accent);
}

.vc-style .feed-item .feed-read-more:hover {
    color: var(--redesign-accent-hover);
}

/* Правый сайдбар: заголовки и кнопка в стиле редизайна */
.vc-style .vc-sidebar-right .sidebar-title {
    color: var(--text-primary);
    font-weight: var(--font-bold);
}

.vc-style .vc-sidebar-right .btn-primary {
    background: var(--redesign-accent);
    color: #1a1a1a;
    border: none;
}

.vc-style .vc-sidebar-right .btn-primary:hover {
    background: var(--redesign-accent-hover);
    color: #1a1a1a;
}

.vc-style .vc-sidebar-right .sidebar-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}

.vc-style .sidebar-articles-list,
.vc-style .sidebar-comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vc-style .sidebar-article-item,
.vc-style .sidebar-comment-item {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.15s;
}

.vc-style .sidebar-article-item:last-child,
.vc-style .sidebar-comment-item:last-child {
    border-bottom: none;
}

.vc-style .sidebar-article-item:hover,
.vc-style .sidebar-comment-item:hover {
    color: var(--redesign-accent);
}

.vc-style .sidebar-article-title,
.vc-style .sidebar-comment-text {
    display: block;
    font-size: 0.875rem;
    line-height: 1.35;
}

.vc-style .sidebar-article-meta,
.vc-style .sidebar-comment-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.vc-style .sidebar-comment-author {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.vc-style .sidebar-empty {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.sidebar-link-small {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--redesign-accent);
    text-decoration: none;
}

.sidebar-link-small:hover {
    text-decoration: underline;
}

/* ========== Этап 3 — Компоненты и состояния ========== */

/* Единая система кнопок */
.btn-primary {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
    border: none !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-primary:hover {
    background: var(--redesign-accent-hover) !important;
    color: #1a1a1a !important;
    box-shadow: var(--shadow-md) !important;
}

.btn-primary::before {
    display: none;
}

.btn-secondary {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--border) !important;
}

.btn-secondary:hover {
    border-color: var(--redesign-accent) !important;
    color: var(--redesign-accent) !important;
}

.btn-tertiary {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
}

.btn-tertiary:hover {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.btn-destructive,
.btn-danger {
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
}

.btn-destructive:hover,
.btn-danger:hover {
    background: #b91c1c !important;
    color: #fff !important;
}

/* Статусы: бейджи */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.status-published,
.status-success {
    background: rgba(22, 163, 74, 0.15);
    color: #15803d;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.status-draft {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-archived,
.status-rejected {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

/* Empty state */
.no-articles {
    padding: var(--space-16) var(--space-8) !important;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border);
}

.no-articles h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.no-articles a {
    color: var(--redesign-accent);
    font-weight: var(--font-semibold);
}

.no-articles a:hover {
    color: var(--redesign-accent-hover);
}

.tag-selector-empty,
.tag-selector-loading {
    color: var(--text-muted);
    font-size: var(--text-sm);
    padding: var(--space-3);
}

/* Toast — в стиле редизайна */
.toast-container {
    z-index: 10000;
}

.toast {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.toast-success {
    border-left: 4px solid #16a34a !important;
}

.toast-error {
    border-left: 4px solid #dc2626 !important;
}

.toast-warning {
    border-left: 4px solid #d97706 !important;
}

.toast-info {
    border-left: 4px solid var(--redesign-accent) !important;
}

/* Модалки (напряжённость, поделиться и т.д.) */
.tension-modal-content,
[class*="modal-content"] {
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-2xl) !important;
}

.tension-btn {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
    border: none !important;
}

.tension-btn:hover {
    background: var(--redesign-accent-hover) !important;
}

/* ========== Этап 4 — Мобильная нижняя навигация (компактная, с safe-area) ========== */
.mobile-bottom-nav {
    background: var(--header-bg) !important;
    border-top: 1px solid var(--header-border) !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12) !important;
}

.mobile-bottom-nav__item {
    color: var(--header-text-muted) !important;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:focus {
    color: var(--header-text) !important;
}

.mobile-bottom-nav__item.active {
    color: var(--redesign-accent) !important;
}

.mobile-bottom-nav__item.active .mobile-bottom-nav__icon {
    color: var(--redesign-accent);
}

.mobile-bottom-nav__icon {
    color: inherit;
}

.mobile-bottom-nav__icon svg {
    stroke: currentColor;
}

.mobile-bottom-nav__label {
    font-size: 10px;
}

.mobile-bottom-nav__badge {
    background: #dc2626 !important;
    color: #fff !important;
}

/* Кнопка «Меню» в нижней панели (открывает drawer) */
.mobile-bottom-nav__item--menu {
    border: none;
    font-family: inherit;
}

.mobile-bottom-nav__item--menu.active {
    color: var(--redesign-accent) !important;
}

.mobile-bottom-nav__item--menu.active .mobile-bottom-nav__icon {
    color: var(--redesign-accent);
}

/* ========== Этап 5 — Офис и админка ========== */

/* Офис (dashboard): карточки и навигация */
.dashboard-stat-card {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border);
}

.dashboard-stat-card:hover {
    border-color: rgba(255, 215, 0, 0.35);
}

.dashboard-stat-number {
    color: var(--text-primary);
}

.dashboard-section {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
}

.dashboard-section-header {
    border-bottom-color: var(--border) !important;
}

.dashboard-nav {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
}

.dashboard-nav-item {
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dashboard-nav-item:hover {
    background: var(--bg-secondary);
}

.dashboard-nav-item.active {
    background: rgba(255, 215, 0, 0.15) !important;
    color: var(--text-primary) !important;
    font-weight: var(--font-semibold);
    border-left: 3px solid var(--redesign-accent);
}

.dashboard-table-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dashboard-table {
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    border-color: var(--border);
}

.main-content .container {
    max-width: 1400px;
}

/* Админка: единый тон с редизайном */
body.admin-page {
    background: var(--redesign-content-bg) !important;
}

.admin-page .admin-topbar {
    background: var(--header-bg-gradient) !important;
    border-bottom: 1px solid var(--header-border);
    color: var(--header-text);
}

.admin-page .admin-site-link:hover,
.admin-page .admin-topbar-link:hover {
    color: var(--redesign-accent);
}

.admin-page .admin-search-input:focus {
    border-color: rgba(255, 215, 0, 0.5);
}

.admin-page .admin-sidebar {
    background: var(--header-bg) !important;
}

.admin-page .nav-item.active {
    border-left-color: var(--redesign-accent) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--redesign-accent) !important;
}

.admin-page .nav-item:hover {
    color: var(--header-text);
}

.admin-page .admin-content {
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md) !important;
    background: var(--bg-card) !important;
}

.admin-page .admin-header {
    border-bottom-color: var(--border) !important;
}

/* Таблицы и карточки в админке */
.admin-page .admin-table-wrapper,
.admin-page .dashboard-table-wrapper {
    border-radius: var(--radius-lg);
}

.admin-page .btn-primary {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
}

.admin-page .btn-primary:hover {
    background: var(--redesign-accent-hover) !important;
}

/* ========== Доработки — единый стиль под новый дизайн ========== */

/* Формы: фокус — жёлтая рамка и тень */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--redesign-accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2) !important;
}

.form-input,
.form-textarea,
.form-select {
    border-radius: var(--radius-lg);
}

/* Ссылки в контенте и карточках — акцент при наведении */
.main-content a:not(.btn):not(.nav-link):not(.btn-link):not(.btn-primary):not(.btn-secondary):hover,
.vc-center a:not(.btn):not(.feed-read-more):hover,
.article-full a:not(.btn):hover {
    color: var(--redesign-accent-hover);
}

/* Бейдж категории в ленте */
.feed-category {
    background: rgba(255, 215, 0, 0.2) !important;
    color: #1a1a1a;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-md);
}

.feed-category-news {
    background: rgba(255, 215, 0, 0.25) !important;
    color: #1a1a1a;
}

/* Кнопка «Показать ещё» и аналогичные */
.show-more-btn,
.load-more-btn,
[class*="pagination"] .active,
button[type="submit"].btn-primary {
    border-radius: var(--radius-lg);
}

/* Лента: кнопка лайка в стиле редизайна (скругление, контур) */
.btn-like {
    border-radius: var(--radius-full);
}

.btn-like.liked {
    background: var(--redesign-accent) !important;
    color: #1a1a1a;
}

.btn-like.liked:hover {
    background: var(--redesign-accent-hover) !important;
}

/* Страницы без top-nav: единый отступ main */
.main-content:not(.vc-style) {
    padding-top: var(--space-6);
}

.main-content.vc-style .vc-container {
    padding-top: var(--space-4);
}

/* Карточки на страницах логина, регистрации, контакта (форма в узком блоке) */
.main-content .container .form-group {
    margin-bottom: var(--space-4);
}

.main-content .container .form-group:first-of-type {
    margin-top: 0;
}

/* Алерты на формах (ошибка / успех) */
.main-content [style*="background: #e74c3c"],
.main-content [style*="background:#e74c3c"] {
    border-radius: var(--radius-lg);
}

.main-content [style*="background: #27ae60"],
.main-content [style*="background:#27ae60"] {
    border-radius: var(--radius-lg);
}

/* Модалка «Поделиться» */
.share-modal-content,
[class*="share-modal"] {
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-2xl) !important;
}

.share-copy-btn,
.share-social-btn {
    border-radius: var(--radius-lg);
}

.share-copy-btn:hover,
.share-social-btn:focus {
    border-color: var(--redesign-accent);
}

/* Хештеги в облаке: активный — тёмный текст на жёлтом */
.hashtags-cloud .hashtag-link {
    border-radius: var(--radius-md);
}

/* Рейтинг, автор, категория: карточки и заголовки */
.rating-page .sidebar-section,
.author-page .sidebar-section,
.category-page .vc-sidebar-left .sidebar-section {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

/* Сообщения: список и чат в едином стиле */
.messages-page .messages-list,
.messages-page .message-thread {
    border-radius: var(--radius-lg);
}

/* Нетворкинг/маркет: карточки и фильтры */
.market-listing-card,
.networking-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.filter-pill.active {
    background: var(--redesign-accent) !important;
    color: #1a1a1a !important;
    border-color: transparent !important;
}

/* Единый контейнер и отступы */
.container {
    max-width: 1400px;
}

/* --- Мобильная адаптация шапки --- */
@media (max-width: 1024px) {
    .site-header .header-content {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo right"
            "center center";
        gap: var(--space-4);
    }

    .site-header .header-end {
        grid-area: right;
    }

    .site-header .header-center {
        max-width: none;
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .site-header .header-content {
        grid-template-columns: 1fr auto;
        grid-template-areas: "logo right";
    }

    .site-header .header-center {
        display: none;
    }

    .site-header .header-right .btn-publish-header {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .site-header .tagline {
        display: none;
    }

    .feed-new-post.redesign-new-post {
        padding: var(--space-3);
    }

    .feed-new-post.redesign-new-post .feed-new-post-avatar .author-avatar {
        width: 40px;
        height: 40px;
    }

    /* Левое меню ВК на мобильных скрыто — все пункты в drawer и bottom nav */
    .vc-sidebar-left {
        display: none !important;
    }
    /* Двухколоночный layout (нетворкинг и др.) на мобильных — одна колонка на всю ширину */
    .vc-layout--two-col {
        grid-template-columns: 1fr !important;
    }
}

/* Двухколоночный layout (нетворкинг, профиль) — только на десктопе; на мобильных уже задано 1fr выше */
@media (min-width: 769px) {
    .vc-layout--two-col {
        grid-template-columns: 270px 1fr !important;
    }
}

/* ========== Страница сообщений в стиле ВК ========== */
.messages-page .messages-layout {
    border-radius: var(--radius-xl);
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

.messages-page .conversations-sidebar {
    background: var(--bg-card);
    border-right-color: var(--border);
}

.messages-page .conversation-item.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--text-primary);
    border-color: var(--redesign-accent);
}

.messages-page .conversation-item.active .conversation-preview,
.messages-page .conversation-item.active .conversation-time {
    color: var(--text-secondary);
}

.messages-page .conversation-unread,
.messages-page .conversations-header .unread-badge {
    background: #dc2626;
    color: #fff;
}

.messages-page .message-item.sent .message-text {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.35) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.messages-page .message-send-btn {
    background: var(--redesign-accent);
    color: #1a1a1a;
}

.messages-page .message-send-btn:hover {
    background: var(--redesign-accent-hover);
    color: #1a1a1a;
}

.messages-page .message-input:focus {
    border-color: var(--redesign-accent);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.messages-page .messages-header {
    border-bottom-color: var(--border);
    background: var(--bg-card);
}

/* Подсветка слов из поиска (переход по ссылке из выдачи) */
.search-highlight {
    background-color: #fef08a;
    padding: 0 0.1em;
    border-radius: 2px;
}

/* Мобильные: контент и bottom nav строго на всю ширину (убираем белую полосу) */
@media (max-width: 768px) {
    .container.vc-container,
    .vc-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .mobile-bottom-nav {
        left: 0 !important;
        right: 0 !important;
        width: 105vw !important;
        max-width: 105vw !important;
    }
}
