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

:root {
    /* Базовые цвета темы */
    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f4ff;
    --color-border-subtle: #e1e5f0;
    --color-border-strong: #c9d2e3;
    --color-primary: #2563eb;
    --color-primary-soft: rgba(37, 99, 235, 0.1);
    --color-primary-strong: #1d4ed8;
    --color-primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --color-accent: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-muted: #6b7280;
    --color-text: #111827;
    --color-text-soft: #6b7280;

    /* Тени и радиусы */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.08);

    /* Размеры */
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: radial-gradient(circle at top left, #eff6ff 0, #f9fafb 40%, #f3f4f6 100%);
}

/* =========
   APP SHELL
   ========= */

.app-layout {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(circle at 100% 0, rgba(16, 185, 129, 0.12), transparent 55%);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 24px 40px;
}

.app-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.02);
}

.app-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 24px;
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: right;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #eff6ff 0, #f9fafb 45%, #f3f4f6 100%);
}

/* =========
   SIDEBAR
   ========= */

.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 4px 0 30px rgba(15, 23, 42, 0.45);
    z-index: 30;
}

.sidebar-header {
    margin-bottom: 24px;
    padding: 4px 4px 12px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sidebar-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: radial-gradient(circle at 0 0, #22c55e 0, #15803d 40%, #0f766e 75%, #1d4ed8 100%);
    color: #f9fafb;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.sidebar-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: 0.04em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    padding-right: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease;
}

.sidebar-link-icon {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-link-text {
    flex: 1;
    text-align: left;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.4);
    transform: translateX(1px);
}

.sidebar-link.is-active {
    background: radial-gradient(circle at 0 0, #22c55e 0, #15803d 40%, #2563eb 100%);
    border-color: transparent;
    color: #f9fafb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.55);
}

.sidebar-link-secondary {
    opacity: 0.9;
    font-size: 0.86rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-logout {
    text-align: left;
}

.sidebar-collapse-toggle {
    border: none;
    background: rgba(15, 23, 42, 0.75);
    color: #9ca3af;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.sidebar-collapse-toggle:hover {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
}

.sidebar-collapsed .sidebar-collapse-toggle i {
    transform: rotate(180deg);
}

/* Свернутый сайдбар (иконки без текста) */
.sidebar-collapsed .sidebar {
    width: 72px;
}

.sidebar-collapsed .sidebar-logo-text {
    display: none;
}

.sidebar-collapsed .sidebar-link-text {
    display: none;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
}

.sidebar-collapsed .sidebar-footer {
    align-items: center;
}

/* Мобильный режим: сайдбар как оверлей */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }
}

/* Единый отступ между заголовком и контентом */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-main {
    max-width: 60%;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-soft);
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-main {
        max-width: 100%;
    }
}

/* Базовые отступы и разделение блоков на всех страницах */
.main-content > h1 {
    margin-bottom: 0.25rem;
}

.main-content > h1 + p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-text-soft);
}

.main-content > .stats-grid,
.main-content > .dashboard-sections,
.main-content > .catalog-view,
.main-content > .schedules-header,
.main-content > .filters-panel,
.main-content > .schedules-table-container,
.main-content > .profile-section,
.main-content > .integrations-grid,
.main-content > .video-container,
.main-content > .form-card,
.main-content > .info-card,
.main-content > .empty-state {
    margin-bottom: 1.5rem;
}

.dashboard-sections section,
.info-card,
.form-card,
.profile-section,
.integration-card,
.stats-section,
.video-publications {
    margin-bottom: 1.5rem;
}

.data-table,
.schedules-table {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

section + section {
    margin-top: 1.5rem;
}

/* =========
   TOPBAR
   ========= */

.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(16px);
    background: linear-gradient(
        to right,
        rgba(248, 250, 252, 0.92),
        rgba(248, 250, 252, 0.96)
    );
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-page-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.sidebar-toggle {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #f9fafb;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    padding: 0 6px;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.sidebar-toggle-bar {
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}

.sidebar-toggle:active {
    transform: scale(0.96);
}

.icon-inline {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.icon-inline svg {
    vertical-align: middle;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Старый navbar больше не используется, но оставляем минимум на случай переиспользования */
.navbar {
    display: none;
}

/* Глобальный поиск */
.global-search {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.search-container {
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background: white;
    color: #333;
    border-color: #3498db;
    width: 350px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input:focus::placeholder {
    color: #999;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    min-width: 100%;
    width: max-content;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-results.active {
    display: block;
}

.search-results.empty {
    display: block;
}

.search-results.empty::after {
    content: 'Ничего не найдено';
    display: block;
    padding: 1rem;
    text-align: center;
    color: #999;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item.highlighted {
    background-color: #e3f2fd;
}

.search-result-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.search-result-description {
    font-size: 0.8rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-type {
    font-size: 0.75rem;
    color: #95a5a6;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .global-search {
        margin-right: 0;
        margin-left: 0.5rem;
    }

    .search-container {
        width: 200px;
    }

    .search-input:focus {
        width: 250px;
    }
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-box form .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Регистрация: раскрывающиеся контакты */
.reg-contacts-details {
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.reg-contacts-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
    list-style: none;
}

.reg-contacts-summary::-webkit-details-marker { display: none; }

.reg-contacts-summary i {
    color: #3b82f6;
}

.reg-contacts-summary small {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.78rem;
    margin-left: auto;
}

.reg-contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
}

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

.reg-contacts-grid .form-group { margin-bottom: 0.25rem; }
.reg-contacts-grid .form-group label { font-size: 0.82rem; margin-bottom: 0.25rem; }
.reg-contacts-grid .form-group label i { margin-right: 0.25rem; }

/* Профиль: сетка контактов */
.profile-contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-hint {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

.stats-source-hint {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

/* Таблица статистики — всё умещается: прокрутка по горизонтали, перенос текста */
.stats-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.stats-table {
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
    font-size: 0.875rem;
}

.stats-table th,
.stats-table td {
    padding: 0.5rem 0.4rem;
    vertical-align: top;
}

/* Заголовки таблицы — перенос строк, чтобы не обрезались */
.stats-table th {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.stats-table .stats-col-name {
    max-width: 180px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.stats-table .stats-col-desc {
    max-width: 200px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Ячейки с текстом — перенос строк, ограничение высоты с прокруткой при длинном тексте */
.stats-table .stats-cell-clamp {
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.stats-table .stats-cell-clamp-name {
    max-height: 3.5em;
    overflow-y: auto;
}
.stats-table .stats-cell-clamp-desc {
    max-height: 5em;
    overflow-y: auto;
}

.stats-table .stats-col-channel {
    max-width: 140px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.stats-table .stats-col-platform {
    width: 80px;
    white-space: nowrap;
}

.stats-table .stats-col-date {
    width: 100px;
    white-space: nowrap;
}

.stats-table .stats-col-num {
    width: 70px;
    text-align: right;
    white-space: nowrap;
}

.stats-table .stats-col-link {
    width: 70px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.stats-table th.sortable {
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.stats-table th.sortable:hover {
    background: #e2e6ea;
}

.stats-table th.sort-active {
    background: #d4e6f9;
    color: #1a5276;
}

.stats-table th .sort-arrow {
    font-size: 0.7rem;
    color: #3498db;
    font-weight: bold;
}

table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
}

table tr:hover {
    background: #f8f9fa;
}

.dashboard-sections {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-sections section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

footer {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    color: #666;
    border-top: 1px solid #ddd;
}

.auth-link {
    margin-top: 1rem;
    text-align: center;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* OAuth кнопки */
.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: #999;
    font-size: 0.85rem;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.oauth-divider span {
    padding: 0 0.75rem;
    white-space: nowrap;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
    line-height: 1.4;
}

.btn-oauth:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.btn-oauth:active {
    transform: translateY(0);
}

.btn-oauth-google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.btn-oauth-google:hover {
    background: #f8f9fa;
    border-color: #c6c8cb;
}

.btn-oauth-vk {
    background: #0077ff;
    color: #fff;
    border-color: #0077ff;
}

.btn-oauth-vk:hover {
    background: #0066dd;
    border-color: #0066dd;
}

.oauth-icon {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Пагинация */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.pagination-btn:hover {
    background: #f0f4ff;
    border-color: #3498db;
    color: #3498db;
}

.pagination-current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    font-weight: 600;
}

.pagination-dots {
    padding: 0 0.25rem;
    color: #999;
}

/* Профиль */
.profile-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.profile-table {
    width: 100%;
    max-width: 600px;
}

.profile-table th {
    text-align: left;
    padding: 0.75rem;
    width: 150px;
}

.profile-form {
    max-width: 500px;
}

/* Интеграции */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.integration-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.integration-status {
    margin-top: 1rem;
}

.integration-status.connected {
    color: #27ae60;
}

.integration-status.disconnected {
    color: #e74c3c;
}

.telegram-form {
    margin-top: 1rem;
}

/* Статистика */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.export-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.export-section .btn {
    margin-right: 1rem;
}

.status-success {
    color: #27ae60;
    font-weight: 600;
}

.status-error {
    color: #e74c3c;
    font-weight: 600;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-success:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Видео просмотр */
.video-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.video-player {
    margin-bottom: 2rem;
    text-align: center;
}

.video-player video {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-info {
    margin-top: 2rem;
}

.video-meta {
    margin-bottom: 1.5rem;
}

.video-meta p {
    margin-bottom: 0.5rem;
}

.video-tags {
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    background: #ecf0f1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.video-details {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.video-details p {
    margin-bottom: 0.5rem;
}

.video-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Публикации */
.video-publications {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.video-publications h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publication-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.publication-platform {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.publication-date {
    font-size: 0.875rem;
    color: #666;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-xs .icon-inline {
    margin-right: 0;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

/* Унифицированные стили для таблиц */
.data-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Унифицированные стили для карточек */
.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.info-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
}

.info-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-card-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-card-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.info-card-value {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Унифицированные стили для кнопок действий */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .btn,
.action-buttons .btn-xs,
.action-buttons .btn-sm {
    margin: 0;
}

/* Унифицированные стили для пустых состояний */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px dashed #e0e0e0;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Унифицированные стили для форм */
.form-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.form-card h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

/* Группа нескольких инпутов в одном поле формы (варианты описаний и т.п.) */
.variant-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Унифицированные стили для статусов */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-published {
    background: #e8f5e9;
    color: #388e3c;
}

.status-failed {
    background: #ffebee;
    color: #d32f2f;
}

.status-paused {
    background: #fff9e6;
    color: #f57c00;
}

.status-new {
    background: #f5f5f5;
    color: #666;
}

.status-queued {
    background: #fff3e0;
    color: #f57c00;
}

.status-error {
    background: #ffebee;
    color: #d32f2f;
}

.status-connected {
    background: #e8f5e9;
    color: #388e3c;
}

.status-disconnected {
    background: #ffebee;
    color: #d32f2f;
}

/* Унифицированные стили для платформ */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.platform-youtube {
    background: #ff0000;
    color: white;
}

.platform-telegram {
    background: #0088cc;
    color: white;
}

.platform-tiktok {
    background: #000000;
    color: white;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.platform-pinterest {
    background: #bd081c;
    color: white;
}

.platform-both {
    background: linear-gradient(135deg, #ff0000 0%, #0088cc 100%);
    color: white;
}

.btn-info {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-info:hover {
    background-color: #2980b9;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    font-weight: 500;
}

.badge-success {
    background-color: #27ae60;
    color: white;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-secondary {
    background-color: #95a5a6;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-error {
    background-color: #e74c3c;
    color: white;
}

.badge-debug {
    background-color: #95a5a6;
    color: white;
}

/* Группы контента - улучшенный UI */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.group-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #e0e0e0;
}

.group-card:hover::before {
    opacity: 1;
}

.group-card-active {
    border-left: 4px solid #27ae60;
}

.group-card-paused {
    border-left: 4px solid #f39c12;
    opacity: 0.9;
}

.group-card-completed {
    border-left: 4px solid #17a2b8;
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.group-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-status-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.group-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.group-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.group-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.info-label {
    font-weight: 500;
    color: #555;
    font-size: 0.875rem;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.info-value-success {
    color: #27ae60;
}

.info-value-muted {
    color: #95a5a6;
}

.info-value-warning {
    color: #f59e0b;
}

.group-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
    margin-bottom: 0.375rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.stat-success .stat-value {
    color: #27ae60;
}

.stat-warning .stat-value {
    color: #f39c12;
}

.stat-danger .stat-value {
    color: #e74c3c;
}

.group-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    justify-content: center;
}

.action-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-group-primary {
    justify-content: flex-start;
}

.action-group-secondary {
    justify-content: flex-start;
}

.action-group-danger {
    justify-content: flex-start;
    margin-top: 0.25rem;
}

/* Компактные кнопки-иконки для групп */
.actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-manage-subscription {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3498db;
    background: #e8f4fd;
    border: 1px solid #bee5f7;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-manage-subscription:hover {
    background: #d0eafb;
    border-color: #a3d5f0;
    color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.15);
}

.btn-action-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.btn-action-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-action-icon:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-action:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-text {
    line-height: 1;
}

.btn-action-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-action-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-action-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-action-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.btn-action-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-action-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-action-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-action-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn-action-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-action-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

.btn-action-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-action-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Стили для компактных кнопок-иконок */
.btn-action-icon.btn-action-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-action-icon.btn-action-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-action-icon.btn-action-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-action-icon.btn-action-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.btn-action-icon.btn-action-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-action-icon.btn-action-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-action-icon.btn-action-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-action-icon.btn-action-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn-action-icon.btn-action-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-action-icon.btn-action-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

.btn-action-icon.btn-action-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-action-icon.btn-action-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Хлебные крошки */
.breadcrumbs {
    margin: 1rem 0 1.5rem 0;
    padding: 0.75rem 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
}

.breadcrumb-item:not(:last-child)::after {
    content: '';
}

.breadcrumb-item a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #2c3e50;
    font-weight: 500;
}

.breadcrumb-item.active span {
    color: inherit;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #95a5a6;
    font-size: 0.875rem;
}

/* Адаптивность */
/* Каталог видео */
.catalog-view {
    margin-top: 1.5rem;
}

.catalog-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.catalog-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.catalog-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.catalog-folder {
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.catalog-folder:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    gap: 0.75rem;
}

.folder-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.folder-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.folder-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.folder-count {
    color: #666;
    font-size: 0.875rem;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.folder-toggle {
    color: #95a5a6;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.folder-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.folder-actions .btn-action-icon {
    width: 32px;
    height: 32px;
}

.catalog-folder.expanded .folder-toggle {
    transform: rotate(0deg);
}

.catalog-folder:not(.expanded) .folder-toggle {
    transform: rotate(-90deg);
}

.folder-content {
    display: none;
    padding: 0.5rem;
    background: white;
}

.catalog-folder.expanded .folder-content {
    display: block;
}

.catalog-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.catalog-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.video-checkbox-wrap {
    flex-shrink: 0;
    margin-right: 0.25rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.video-checkbox-wrap input {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.videos-bulk-toolbar {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.videos-bulk-toolbar form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.videos-bulk-count {
    font-weight: 500;
    color: #333;
}

.table-sort-bar {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.table-sort-label {
    margin-right: 0.35rem;
}

.videos-table .col-checkbox {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
}

.videos-table .col-actions {
    white-space: nowrap;
}

.videos-table .item-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.videos-table .item-actions .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    position: relative;
    width: 40px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.video-icon-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    flex-wrap: wrap;
}

.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-uploaded {
    background: #e3f2fd;
    color: #1976d2;
}

.status-processing {
    background: #fff3e0;
    color: #f57c00;
}

.status-ready {
    background: #e8f5e9;
    color: #388e3c;
}

.status-error {
    background: #ffebee;
    color: #d32f2f;
}

.groups-badge {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.group-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.item-actions .btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.item-actions .btn-action:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Расписания - улучшенный UI */
.schedules-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.schedules-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.schedules-stats .stat-item {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    min-width: 80px;
    flex: 1 1 0;
}

.schedules-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.schedules-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedules-stats .stat-pending .stat-value {
    color: #f39c12;
}

.schedules-stats .stat-published .stat-value {
    color: #27ae60;
}

.schedules-stats .stat-failed .stat-value {
    color: #e74c3c;
}

/* Фильтры */
.filters-panel {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.filters-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
}

.filter-group select,
.filter-group input[type="date"],
.filter-group input[type="text"],
.filter-group input[type="search"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 140px;
    line-height: 1.4;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus,
.filter-group input[type="text"]:focus,
.filter-group input[type="search"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Группа с кнопками действий в фильтре */
.filter-group-actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .filters-form {
        align-items: stretch;
    }

    .filter-group,
    .filter-group-actions {
        width: 100%;
    }

    .filter-group-actions {
        justify-content: flex-start;
    }

    .filter-group select,
    .filter-group input[type="date"],
    .filter-group input[type="text"],
    .filter-group input[type="search"] {
        width: 100%;
    }
}

/* Таблица расписаний */
.schedules-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.schedules-table {
    width: 100%;
    border-collapse: collapse;
}

.schedules-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.schedules-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.schedules-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.schedules-table tbody tr {
    transition: background-color 0.2s ease;
}

.schedules-table tbody tr:hover {
    background-color: #f8f9fa;
}

.schedule-row[data-status="paused"] {
    opacity: 0.7;
    background-color: #fff9e6;
}

.schedule-row[data-status="failed"] {
    background-color: #ffebee;
}

.schedule-row[data-status="published"] {
    background-color: #e8f5e9;
}

.video-info, .group-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-link, .group-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.video-link:hover, .group-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.platform-youtube {
    background: #ff0000;
    color: white;
}

.platform-telegram {
    background: #0088cc;
    color: white;
}

.platform-tiktok {
    background: #000000;
    color: white;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.platform-pinterest {
    background: #bd081c;
    color: white;
}

.platform-both {
    background: linear-gradient(135deg, #ff0000 0%, #0088cc 100%);
    color: white;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-main {
    font-weight: 500;
    color: #2c3e50;
}

.date-time {
    font-size: 0.8rem;
    color: #666;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-published {
    background: #e8f5e9;
    color: #388e3c;
}

.status-failed {
    background: #ffebee;
    color: #d32f2f;
}

.status-paused {
    background: #fff9e6;
    color: #f57c00;
}

.schedule-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.btn-pause {
    background: #f39c12;
    color: white;
}

.btn-pause:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.btn-play {
    background: #27ae60;
    color: white;
}

.btn-play:hover {
    background: #229954;
    transform: scale(1.1);
}

.btn-copy {
    background: #95a5a6;
    color: white;
}

.btn-copy:hover {
    background: #7f8c8d;
    transform: scale(1.1);
}

.btn-edit {
    background: #17a2b8;
    color: white;
}

.btn-edit:hover {
    background: #138496;
    transform: scale(1.1);
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.btn-action-publish {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-action-publish:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: scale(1.1);
}

/* Массовые действия */
.bulk-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    padding: 1rem 2rem;
    z-index: 1000;
    border-top: 2px solid #3498db;
}

.bulk-actions-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bulk-count {
    font-weight: 500;
    color: #2c3e50;
}

.bulk-buttons {
    display: flex;
    gap: 0.75rem;
}

/* Toast уведомления */
.toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

.text-muted {
    color: #95a5a6;
}

/* Управление точками времени */
.time-point-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.time-point-item:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.time-point-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 120px;
}

.time-point-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-remove-time {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-remove-time:hover {
    background: #c0392b;
    transform: scale(1.1);
}

#time-points-container,
#fixed-time-points-container {
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .schedules-header {
        flex-direction: column;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .schedules-table {
        font-size: 0.875rem;
    }

    .schedules-table th,
    .schedules-table td {
        padding: 0.75rem 0.5rem;
    }

    .schedule-actions {
        flex-direction: column;
    }

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

    .bulk-buttons {
        width: 100%;
        flex-direction: column;
    }

    .time-point-item {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-remove-time {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .group-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .stat-item {
        padding: 0.875rem 0.375rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.6875rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .btn-action {
        padding: 0.75rem;
        min-width: 44px;
        justify-content: center;
    }
    
    .action-group {
        justify-content: center;
    }

    .breadcrumb-list {
        font-size: 0.8rem;
    }

    .breadcrumb-separator {
        margin: 0 0.25rem;
    }

    .catalog-item {
        flex-wrap: wrap;
    }

    .item-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .folder-header {
        flex-wrap: wrap;
    }

    .folder-count {
        order: 3;
        width: 100%;
        margin-top: 0.25rem;
    }

    .folder-actions {
        order: 2;
        margin-left: auto !important;
    }
}

/* =========
   LANGUAGE SWITCHER (sidebar footer)
   ========= */

.lang-switcher {
    padding: 4px 0;
    margin-bottom: 4px;
    width: 100%;
}

/* Language switcher on auth pages (login/register) */
.auth-lang-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

.auth-lang-switcher .lang-select {
    width: auto;
    min-height: 36px;
    padding: 6px 28px 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M3 4.5 L6 7.5 L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-lang-switcher .lang-select:hover {
    border-color: rgba(148, 163, 184, 0.6);
    background-color: rgba(51, 65, 85, 1);
}

.auth-lang-switcher .lang-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.auth-lang-switcher .lang-select option {
    background: #1e293b;
    color: #e5e7eb;
}

.lang-select {
    width: 100%;
    min-height: 36px;
    padding: 6px 10px 6px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M3 4.5 L6 7.5 L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lang-select:hover {
    border-color: rgba(148, 163, 184, 0.6);
    background-color: rgba(51, 65, 85, 0.95);
}

.lang-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.lang-select option {
    background: #1e293b;
    color: #e5e7eb;
}

/* Collapsed sidebar: compact switcher, show only code (narrow width) */
.sidebar-collapsed .lang-switcher {
    padding: 4px 0;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-collapsed .lang-select {
    width: 48px;
    min-width: 48px;
    padding: 6px 22px 6px 8px;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-collapsed .lang-select option {
    font-size: 0.875rem;
}

/* ===== Content Mode Card Selector ===== */
.cm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.5rem;
}
.cm-card {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 0 !important;
    min-height: 72px;
}
.cm-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cm-card--active {
    border-color: var(--cm-active-color, #3b82f6);
    background: var(--cm-active-bg, #eff6ff);
    box-shadow: 0 0 0 3px var(--cm-active-ring, rgba(59,130,246,0.15));
}
.cm-card--active:hover {
    transform: none;
}
.cm-card__radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    border: 0 !important;
}
.cm-card__icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f5f9;
    transition: background 0.2s;
}
.cm-card--active .cm-card__icon {
    background: var(--cm-active-icon-bg, rgba(59,130,246,0.12));
}
.cm-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.cm-card__title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.3;
}
.cm-card--active .cm-card__title {
    color: var(--cm-active-color, #3b82f6);
}
.cm-card__desc {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cm-card__check {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: all 0.2s;
    background: #fff;
    flex-shrink: 0;
}
.cm-card--active .cm-card__check {
    border-color: var(--cm-active-color, #3b82f6);
    background: var(--cm-active-color, #3b82f6);
    color: #fff;
}
@media (max-width: 640px) {
    .cm-grid { grid-template-columns: 1fr; }
    .cm-card { padding: 0.7rem 0.85rem; min-height: 60px; }
    .cm-card__icon { width: 36px; height: 36px; font-size: 1.35rem; }
}

/* ===== Status Warning Banners ===== */
.status-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    animation: statusWarnSlide 0.3s ease;
}
@keyframes statusWarnSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.status-warning--pause {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-left: 4px solid #f59e0b;
}
.status-warning--archive {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
}
.status-warning__icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.status-warning__body strong {
    display: block;
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 0.2rem;
}
.status-warning--archive .status-warning__body strong {
    color: #991b1b;
}
.status-warning__body p {
    margin: 0;
    font-size: 0.82rem;
    color: #a16207;
    line-height: 1.4;
}
.status-warning--archive .status-warning__body p {
    color: #b91c1c;
}

/* ===== Danger Zone (Profile) ===== */
.danger-zone {
    border-left: 4px solid #ef4444 !important;
}
.danger-zone__title {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}
.danger-zone__title svg { vertical-align: -3px; margin-right: 6px; }
.danger-zone__subtitle {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0 0 1.25rem;
}
.dz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}
.dz-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dz-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.dz-card__header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.dz-card__icon {
    font-size: 1.35rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.dz-card__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dz-card__label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
}
.dz-card__count {
    font-size: 0.75rem;
    color: #9ca3af;
}
.dz-card__btn {
    width: 100%;
    padding: 0.4rem;
    background: #fff;
    color: #dc2626;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.dz-card__btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}
.dz-card__empty {
    font-size: 0.78rem;
    color: #d1d5db;
    text-align: center;
    padding: 0.3rem;
}
.dz-nuclear {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.9rem 1.1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.dz-nuclear__info strong {
    color: #374151;
    font-size: 0.9rem;
}
.dz-nuclear__info p {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #9ca3af;
}
.dz-nuclear__btn {
    padding: 0.5rem 1.25rem;
    background: #fff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.dz-nuclear__btn:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
@media (max-width: 768px) {
    .dz-grid { grid-template-columns: repeat(2, 1fr); }
    .dz-nuclear { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .dz-grid { grid-template-columns: 1fr; }
}

/* ===== Content Groups Toolbar (Tabs + Search + Sort) ===== */
.cg-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.cg-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.cg-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.cg-tab:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #374151;
}
.cg-tab--active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}
.cg-tab--active:hover {
    background: #334155;
    border-color: #334155;
    color: #fff;
}
.cg-tab__count {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    background: rgba(0,0,0,0.06);
    color: inherit;
    min-width: 18px;
    text-align: center;
}
.cg-tab--active .cg-tab__count {
    background: rgba(255,255,255,0.2);
}
.cg-tab__count--red {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
.cg-tab--active .cg-tab__count--red {
    background: rgba(239,68,68,0.3) !important;
    color: #fecaca !important;
}
.cg-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cg-search {
    padding: 0.4rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.82rem;
    width: 200px;
    transition: border-color 0.15s;
}
.cg-search:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148,163,184,0.15);
}
.cg-sort {
    padding: 0.4rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
    color: #374151;
    cursor: pointer;
}
.cg-empty-filter {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}
/* Platform filter buttons row */
.cg-platforms {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.cg-plat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.cg-plat i {
    font-size: 0.85rem;
    transition: opacity 0.15s;
}
.cg-plat:hover {
    border-color: var(--plat-color, #d1d5db);
    background: #f9fafb;
    color: #374151;
}
.cg-plat--active {
    background: var(--plat-color, #1e293b);
    border-color: var(--plat-color, #1e293b);
    color: #fff;
}
.cg-plat--active i {
    color: #fff !important;
}
.cg-plat--active:hover {
    opacity: 0.9;
    color: #fff;
}
.cg-plat__count {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.05rem 0.35rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.06);
    min-width: 16px;
    text-align: center;
}
.cg-plat--active .cg-plat__count {
    background: rgba(255,255,255,0.25);
}
@media (max-width: 768px) {
    .cg-toolbar { flex-direction: column; align-items: stretch; }
    .cg-tabs { overflow-x: auto; padding-bottom: 0.25rem; flex-wrap: nowrap; }
    .cg-controls { justify-content: stretch; }
    .cg-search { flex: 1; width: auto; }
    .cg-platforms { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; }
}
