.dashboard {
    display: flex;
    gap: 20px;
}

/* 
===========================
Фильтры 
===========================
*/
.filters-container {
    flex: 0 0 20%;
    padding: 15px;
    box-sizing: border-box;
    font-size: 1.1;
}

fieldset[disabled] {
    opacity: 0.6;
    pointer-events: none;
}
.auth-overlay-hint {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
}

/* -----------------------
    Шапка 
*/
.filters-header {
    display: flex;
    justify-content: right;
    gap: 20px;
}

.filters-button img {
    height: 2em;
    width: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.filters-button:hover img {
    opacity: 0.8;
}



/* -----------------------
    Слайдеры 
*/
.slider-container { width: 320px; margin-bottom: 30px; }
.slider-title { font-weight: bold; margin-bottom: 6px; }
.range-slider { position: relative; height: 30px; }
input[type=range] {
position: absolute; pointer-events: none;
-webkit-appearance: none; width: 100%; background: transparent; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
input[type=range]::-webkit-slider-thumb {
pointer-events: all; position: relative; z-index: 2;
-webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%;
background: white; border: 1px solid #999; cursor: pointer;
margin-top: 0px; /* ← ниже чем центр */
}
input[type=range]::-moz-range-thumb {
height: 16px; width: 16px; border-radius: 50%;
background: white; border: 1px solid #999; cursor: pointer;
transform: translateY(2px);
}
.slider-track { position: absolute; height: 4px; background: #b3b3b3; top: 6px; border-radius: 2px; width: 100%; z-index: 1; }
.slider-range { position: absolute; height: 4px; background: #2f55d4; top: 6px; border-radius: 2px; z-index: 1; }
.value-boxes { display: flex; justify-content: space-between; margin-top: 12px;}
.value-box { width: 47%; display: flex; align-items: center; border: 1px solid #6c7484; border-radius: 4px; padding: 4px 6px; background: white; box-sizing: border-box; }
.value-box span { margin-right: 6px; color: #333; white-space: nowrap; }
.value-box input { flex: 1; border: none; outline: none; text-align: center;}
.value-box input::-webkit-inner-spin-button,
.value-box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.value-box input[type=number] { -moz-appearance: textfield; }
.value-box input {
    max-width: 80px;
    min-width: 60px;
}
.plus-indicator {
    margin-left: 1px;
    font-size: inherit;
    color: inherit;
}

/* -----------------------
    Сортировка 
*/
.sort-container {
    width: 320px;
    margin-bottom: 30px; /* одинаково с categories-container */
    font-family: 'Inter', sans-serif;
}

.slider-title {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Стили select похожие на select-btn */
#sort-field {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    appearance: none; /* убираем дефолтную стрелку браузера */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-size: 1.01rem;
}

#sort-field:hover {
    background: #f9f9f9;
    border-color: #777;
}

#sort-field:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

#sort-field option {
    padding: 8px;
}


/* Блокируем опцию и делаем её визуально полупрозрачной */
.premium-option {
    color: #999; /* серее */
    background-color: #f9f9f9;
    pointer-events: none; /* защита от клика (для некоторых браузеров на option) */
}

/* При наведении на premium-option у select сам по себе не показывает tooltip.
   Поэтому дадим общий стиль для подсказки через data-tooltip обработчик. */
select option.premium-option[data-tooltip] {
    position: relative;
}


/* -----------------------
    Категории 
*/
.categories-container {
    width: 320px;
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
}

.slider-title {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.multi-select {
    position: relative;
}

.select-btn {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-size: 1.01rem;
}

.select-btn:hover {
    background: #f9f9f9;
    border-color: #777;
}

.arrow {
    transition: transform 0.3s ease;
}

.select-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 8px;
    display: none;
    z-index: 10;
}

.multi-select.active .select-dropdown {
    display: block;
}

.multi-select.active .arrow {
    transform: rotate(180deg);
}

.category {
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 0;
}

.category:last-child {
    border-bottom: none;
}

.category-title {
    font-weight: 600;
    margin-bottom: 4px;
}

label {
    display: block;
    padding: 4px 0;
    cursor: pointer;
}

input[type="checkbox"] {
    margin-right: 8px;
}

/* -----------------------
    Поиск 
*/
.search-container {
    width: 100%;
    margin-bottom: 30px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    box-sizing: border-box; /* важно для контроля ширины */
}

.slider-title {
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.filters-title-search {
    position: relative;
    width: 100%; /* подстраивается под родитель */
}

#search-title-query {
    width: 100%; /* всегда вписывается */
    padding: 10px 14px 10px 36px; /* место для иконки */
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    box-sizing: border-box; /* чтобы паддинги не выходили за контейнер */
    font-size: 1.02rem;
}

#search-title-query:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 6px rgba(74,144,226,0.4);
    background-color: #fff;
}

.filters-title-search::before {
    content: "\1F50D"; /* 🔍 */
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    pointer-events: none;
}
/* 
===========================
Таблица 
===========================
*/
.table-container {
    flex: 0 0 80%;
    background-color: #ffffff;
    padding: 15px;
    box-sizing: border-box;
    border-radius: 15px;
}

/* Контейнер для всех каналов */
.channels-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

/* Одна карточка */
.channel-row {
    display: flex; /* заменили grid — проще контролировать проценты */
    justify-content: space-between;
    align-items: stretch;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 14px 20px;
    transition: box-shadow 0.2s ease;
    gap: 20px;
    min-height: 120px;
}


.channel-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Левая часть карточки */
.channel-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 50%;
    box-sizing: border-box;
    min-width: 0;
}

.channel-logo img {
    width: 64px;
    height: 64px;
    border-radius: 50%;  /* круглое фото */
    object-fit: cover;   /* чтобы не растягивалось */
    display: block;
}

/* Текстовая часть */
.channel-text {
    flex: 1;
    font-size: 1.1rem;
}

.channel-title {
    font-weight: 600;
    margin: 0 0 4px;
}

.channel-about {
    color: #666;
    margin: 0 0 8px;
    /* Ограничиваем текст 2 строками с многоточием */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    /* Принудительный перенос длинных слов */
    word-wrap: break-word;
    word-break: break-word;
}

.channel-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}

.category-tag {
    background-color: #f4f4f4;
    padding: 3px 7px;
    border-radius: 4px;
    color: #555;
}

/* Правая часть карточки - статы */
.channel-stats {
    display: flex;
    align-items: center;
    justify-content: space-between; /* распределяем равномерно по всей ширине */
    width: 50%;
    min-width: 300px; /* чтобы не сжималось слишком сильно */
    box-sizing: border-box;
    text-align: center;
}

.stat-value {
    font-size: 2rem;       /* покрупнее */
    font-weight: 700;      /* жирный текст */
    color: #222;           /* тёмный цвет */
    display: block;
}

.stat-label {
    color: #777;
}

/* ссылка на телеграм */
.stat-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.stat-link img:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.stat {
    flex: 1; /* равная ширина для всех */
}

.stat-link {
    flex: 0 0 auto;
}

.lock-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.7;
}

.stat-link {
    display: flex;
    align-items: center;
}

.telegram-icon {
    width: 24px;
    height: 24px;
}

.stat-link--disabled {
    opacity: 0.5;
    cursor: default;
}

.stat-link--disabled .telegram-icon--disabled {
    filter: grayscale(100%);
    pointer-events: none;
}

/* 
===========================
Общее 
===========================
*/
/* Универсальный класс tooltip */
.tooltip {
    position: relative; /* для позиционирования подсказки */
    display: inline-block; /* размер по содержимому */
    cursor: pointer; /* курсор руки при наведении */
}

/* Стили самой подсказки */
.tooltip::after {
    content: attr(data-tooltip); /* взять текст из data-tooltip */
    position: absolute;
    bottom: 125%; /* размещаем над элементом */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 0.85rem;
    z-index: 1000;
    text-align: center;

    max-width: 320px;
    min-width: 300px;
    white-space: normal;
    display: inline-block;
    word-break: break-word;
}

/* Маленький треугольник снизу */
.tooltip::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Появление при наведении */
.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}


/* 
===========================
Неавторизованная зона
===========================
*/
.locked {
  position: relative;
  pointer-events: none;
  user-select: none;
  filter: blur(1px);
  opacity: 0.8;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(180,180,180,0.6);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.locked-overlay p {
  color: #333;
  margin-bottom: 10px;
}

.locked-overlay .btn {
  background: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.auth-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 6px;
    padding: 9px 18px;
    border-radius: 999px;

    background: #2AABEE; /* цвет Telegram */
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 3px 10px rgba(42, 171, 238, 0.35);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

/* 
===========================
Баннер
===========================
*/
.auth-banner {
    width: 100%;
    min-height: 200px;
    padding: 20px 18px;
    box-sizing: border-box;
    border-radius: 10px;

    background: #f5f5f5;           /* светло‑серый фон */
    border: 1px solid #e0e0e0;     /* тонкая серая рамка */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #222;
    gap: 10px;
}

.auth-banner-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.9;                  /* чуть приглушим иконку */
    filter: none;                  /* без яркой тени */
}

.auth-banner-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.auth-banner-text {
    margin: 0;
    max-width: 280px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #555;
}

/* Кнопка спокойная, серо‑голубая, без «кислоты» */
.auth-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 6px;
    padding: 8px 16px;
    border-radius: 999px;

    background: #2AABEE; /* цвет Telegram */
    color: #ffffff;             /* тёмный текст */
    border: 1px solid #cbd2d9;    /* лёгкая обводка */

    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;

    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}


.auth-banner-btn:hover {
    background: #229fd8;
    box-shadow: 0 4px 14px rgba(42, 171, 238, 0.45);
    transform: translateY(-1px);
}

.auth-banner-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(42, 171, 238, 0.35);
}

/* На узких экранах немного компактнее */
@media (max-width: 768px) {
    .auth-banner {
        padding: 16px 12px;
        min-height: 180px;
    }
    .auth-banner-text {
        max-width: 100%;
    }
}

/* 
===========================
Баннер подписки
===========================
*/
.subscription-banner {
    width: 100%;
    min-height: 180px;
    padding: 20px 20px;
    box-sizing: border-box;
    border-radius: 10px;

    background: #eef0f4;               /* чуть темнее и «плотнее», чем auth-banner */
    border: 1px solid #cfd4df;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);  /* лёгкая, но заметная тень */

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #222;

    margin-bottom: 26px;               /* расстояние до элементов под баннером */
}

.subscription-banner-content {
    max-width: 380px;
}

.subscription-banner-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
}

.subscription-banner-text {
    margin: 0 0 14px;
    font-size: 0.93rem;
    line-height: 1.5;
    color: #555;
}

.subscription-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 18px;
    border-radius: 999px;

    background: #e0e4ec;
    color: #1f2933;
    border: 1px solid #c1c7d5;

    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;

    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.subscription-banner-btn:hover {
    background: #d5dae5;
    border-color: #b5bccd;
    color: #111827;
}

.subscription-banner-btn:active {
    background: #c8cfdd;
}

/* 
===========================
Модальное окно подписки
===========================
*/
.subscription-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;              /* показываем через класс .open */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.subscription-modal-overlay.open {
    display: flex;
}

.subscription-modal {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 26px;          /* чуть больше внутренний отступ */
    width: 100%;
    max-width: 780px;            /* модалка шире */
    box-sizing: border-box;
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
    position: relative;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.subscription-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #777;
}

.subscription-modal-close:hover {
    color: #444;
}

.subscription-modal-title {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.subscription-modal-subtitle {
    margin: 0 0 14px;
    font-size: 0.92rem;
    color: #4b5563;
}

.subscription-plans {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.subscription-plan {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 12px 14px 14px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
}



.subscription-plan-top {
    min-height: 64px;      /* подбери под свой шрифт, 60–70px обычно достаточно */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.subscription-plan-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.subscription-plan-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #111827;
}


.subscription-plan-price {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
}


.subscription-plan-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1d4ed8;
    background: #e5edff;
    padding: 2px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}


.subscription-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.86rem;
    color: #4b5563;
    flex: 1 1 auto;   /* описание занимает остаток высоты */
}


.subscription-plan-features li {
    margin-bottom: 3px;
}


.subscription-plan--recommended {
    border-color: #d0e2ff;
    background: #f3f6ff;
    position: relative;
}


/* кнопка внутри карточки */
.subscription-plan .subscription-modal-pay-btn {
    align-self: stretch;
    margin-top: 8px;
    text-align: center;
    justify-content: center;
}

/* Кнопка оплаты в модалке */
.subscription-modal-pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;
    border-radius: 999px;

    background: #2AABEE;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;

    border: none;
    box-shadow: 0 3px 10px rgba(42, 171, 238, 0.35);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}


.subscription-modal-pay-btn:hover {
    background: #229fd8;
    box-shadow: 0 4px 14px rgba(42, 171, 238, 0.45);
    transform: translateY(-1px);
}


.subscription-modal-pay-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(42, 171, 238, 0.35);
}


/* Адаптив */
@media (max-width: 640px) {
    .subscription-plans {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .subscription-plan {
        width: 100%;
    }
}


/* 
===============================
Стили для кнопки "Загрузить ещё" 
*/
.load-more-container {
    text-align: center;
    padding: 30px 0;
}

.load-more-btn {
    background: #0088cc;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.load-more-btn:hover {
    background: #006699;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.load-more-btn.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* --- Шапка и кнопка тура --- */
.intro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.help-btn {
    /* Стили для круглой кнопки "?" */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ccc;
    color: #666;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;

    /* Тултип будет работать через класс .tooltip, стили которого у тебя уже есть */
}

.help-btn:hover {
    border-color: #2AABEE;
    color: #2AABEE;
    transform: scale(1.1);
}

/* --- Баннер в фильтрах --- */
.auth-overlay-hint {
    background: #f0f7ff; /* Светло-голубой фон */
    border: 1px solid #dbeafe;
    padding: 24px 16px;  /* Увеличенные отступы (Задача 1) */
    border-radius: 12px;
    margin-bottom: 35px; /* Больше воздуха снизу */
    margin-top: 10px;
    text-align: center;

    display: flex;
    flex-direction: column;
    gap: 15px; /* Отступ между текстом и кнопкой */
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.auth-overlay-text {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.auth-overlay-btn {
    align-self: center;
    background: #2AABEE;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(42, 171, 238, 0.3);
}

.auth-overlay-btn:hover {
    background: #229fd8;
    transform: translateY(-1px);
}

/* --- Баннер авторизации внизу списка --- */
.bottom-auth-banner {
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
    color: #555;
}

.bottom-auth-banner h3 {
    margin: 0 0 10px;
    color: #333;
}

.bottom-auth-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: #2AABEE;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
}

/* --- Встроенные тарифы (вместо текстовой ошибки) --- */
.limit-exceeded-block {
    text-align: center;
    padding: 20px 0;
    background: #fff;
    border-radius: 12px;
    /* Убираем рамку, чтобы выглядело органично в контенте */
}

.limit-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #111;
}

.limit-subtitle {
    color: #666;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Переиспользуем .subscription-plans, но добавим специфику для inline отображения */
.limit-plans-container {
    max-width: 800px; /* Ограничим ширину, чтобы не растягивало на весь экран */
    margin: 0 auto;
}

.limit-plans-container .subscription-plan {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.limit-plans-container .subscription-plan--recommended {
    background: #f0f7ff;
    border-color: #bfdbfe;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.1);
}

/* 
===========================
Попапы подсказок 
===========================
*/
/* Увеличиваем ширину и читаемость подсказок */
.driver-popover {
    max-width: 400px !important; /* Делаем окно шире */
    padding: 20px !important;     /* Больше воздуха внутри */
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
}

.driver-popover-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.driver-popover-description {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    color: #333 !important;
}

/* Улучшаем кнопки навигации */
.driver-popover-footer button {
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
}

/* ===========================
   MOBILE: убрать горизонтальный скролл
   =========================== */

/* на всякий случай, чтобы ничего не "выпирало" из-за длинных слов/картинок */
.catalog-content,
.dashboard,
.filters-container,
.table-container,
.channel-row {
  max-width: 100%;
}

@media (max-width: 768px) {
  /* 1) Общая раскладка: фильтры сверху, список снизу */
  .dashboard {
    flex-direction: column;
    gap: 12px;
  }

  .filters-container,
  .table-container {
    flex: 0 0 auto;
    width: 100%;
    padding: 12px;
  }

  /* 2) Убираем фиксированные ширины у элементов фильтров */
  .slider-container,
  .sort-container,
  .categories-container {
    width: 100%;
    max-width: 100%;
  }

  /* чтобы внутренности не раздували контейнер */
  .value-box input {
    max-width: 100%;
    min-width: 0;
  }

  /* 3) Карточка канала: в колонку */
  .channel-row {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .channel-info {
    width: 100%;
  }

  .channel-stats {
    width: 100%;
    min-width: 0;              /* ВАЖНО: убираем min-width:300px */
    flex-wrap: wrap;           /* статы переносятся */
    gap: 10px;
    justify-content: flex-start;
    text-align: left;
  }

  .stat {
    flex: 1 1 45%;             /* по 2 в ряд (примерно) */
    min-width: 140px;          /* можно подобрать */
  }

  .stat-value {
    font-size: 1.4rem;         /* меньше, чтобы помещалось */
  }

  .stat-link {
    flex: 0 0 auto;
    margin-left: auto;         /* иконку вправо */
  }

  /* 4) Тултипы на мобилке часто мешают и могут вызывать "вылезание" */
  .tooltip::after,
  .tooltip::before {
    display: none;
  }

  /* 5) Dropdown категорий: не шире контейнера */
  .select-dropdown {
    max-width: 100%;
  }
}

/* ещё более узкие телефоны */
@media (max-width: 420px) {
  .stat {
    flex: 1 1 100%;            /* по одному в ряд */
    min-width: 0;
  }

  .channel-logo img {
    width: 52px;
    height: 52px;
  }
}

/* 
========================================================
==== ОКНО ОЖИДАНИЯ ПЛАТЕЖА
*/
body.payment-wait-active #subscription-modal-overlay {
  display: none !important;
}

/* по умолчанию скрыта */
#payment-wait-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
}

/* показ */
#payment-wait-modal.open {
  display: block;
}

/* окно */
#payment-wait-modal .modal-window {
  max-width: 420px;
  margin: 15vh auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
}