body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 20px;
    background-color: #f0f4ff;
}

.container {
    max-width: calc(100% - 40px);
    margin: 20px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.campaign-count {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

/* Контейнер таблицы */
.table-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
}

/* Основные стили таблицы */
.campaigns-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 14px;
}

/* Заголовки таблицы */
.campaigns-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    position: relative;
    min-width: 50px;
}

.campaigns-table th.center {
    text-align: center;
}

/* Сортируемые заголовки */
.campaigns-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.campaigns-table th.sortable:hover {
    background: #e9ecef;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.campaigns-table th.center .header-content {
    justify-content: center;
}

.sort-indicator {
    font-size: 12px;
    color: #6c757d;
    margin-left: 5px;
    opacity: 0.7;
}

.sortable .sort-indicator {
    opacity: 1;
}

/* Изменение размера столбцов */
.column-resizer {
    position: absolute;
    top: 0;
    right: -2px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
    transition: all 0.2s ease;
}

.column-resizer:hover {
    background: #007bff;
    width: 3px;
    right: -1px;
}

/* Ячейки таблицы */
.campaigns-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.campaigns-table td.center {
    text-align: center;
}

.campaigns-table td.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Строки таблицы */
.campaigns-table tbody tr {
    transition: background-color 0.2s;
}

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

.campaign-row.selected {
    background: #e7f3ff;
}

/* Фиксированные столбцы */
.campaigns-table .select-column {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center;
}

.campaigns-table .expand-column {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    text-align: center;
}

.campaigns-table .actions-column {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

/* Столбец названий - гибкий */
.campaigns-table .campaign-name {
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: initial;
    min-width: 200px;
    font-weight: 500;
}

.campaigns-table .campaign-description,
.campaigns-table .campaign-tags-cell {
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: initial;
}

/* Элементы кампаний */
.campaign-id {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.campaign-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    margin: 1px 2px 1px 0;
}

/* Собственные теги группы - зеленый цвет */
.campaign-tag.group-own {
    background-color: #28a745 !important;
    color: white !important;
    font-weight: 600 !important;
}

/* Теги из кампаний группы - голубой цвет */
.campaign-tag.group-campaign {
    background-color: #17a2b8 !important;
    color: white !important;
    font-weight: 500 !important;
}

/* Чекбоксы */
.select-column input[type="checkbox"],
.campaign-checkbox,
.group-checkbox,
.account-checkbox {
    transform: scale(1.2);
    cursor: pointer;
    margin: 0;
}

/* Группы */
.group-row {
    background: #f8f9fa !important;
    font-weight: bold;
}

.group-row:hover {
    background: #e9ecef !important;
}

.campaign-subrow {
    background: #fdfdfd;
}

.campaign-subrow:hover {
    background: #f5f5f5;
}

.group-toggle {
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    display: block;
    text-align: center;
}

.group-count {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 5px;
}

/* Бейджи аккаунтов */
.account-badge {
    background: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.account-badge-multiple {
    background: #d1ecf1;
    color: #0c5460;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.group-accounts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

/* Статусы */
.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}



.status-active { 
    background: #4CAF50; 
    color: white; 
}

.status-paused { 
    background: #FF9800; 
    color: white; 
}

.status-rejected { 
    background: #F44336; 
    color: white; 
}

.status-blocked { 
    background: #9C27B0; 
    color: white; 
}

.status-archived { 
    background: #6c757d; 
    color: white; 
}

.status-draft {
    background-color: #6c757d;
    color: white;
}

.status-moderation {
    background-color: #17a2b8;
    color: white;
}

.status-funds {
    background-color: #fd7e14;
    color: white;
}

.status-no-funds {
    background: #2196F3;
    color: white;
}

.status-stopped {
    background-color: #ffc107;
    color: #212529;
}

.status-ended {
    background-color: #495057;
    color: white;
}

.status-converting {
    background-color: #20c997;
    color: white;
}

/* Действия */
.action-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0 2px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.campaign-actions,
.group-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}



/* Фильтры и контролы */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Информация о периоде */
.period-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.loading-indicator {
    color: #007bff;
    font-size: 12px;
}

/* Кнопки */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-refresh {
    background: #28a745;
    color: white;
}

.btn-refresh:hover {
    background: #218838;
}

.btn-refresh:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

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

.btn-dark {
    background: #343a40;
    color: white;
}

/* Старые стили панели массовых действий удалены - см. строку 1969 */

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #333;
    background: #e9ecef;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Настройки столбцов */
.column-settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.column-order-list {
    max-height: 400px;
    overflow-y: auto;
}

.column-setting-item.draggable {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 2px 0;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: white;
    cursor: move;
    transition: all 0.2s;
}

.column-setting-item.draggable:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.drag-handle {
    color: #999;
    margin-right: 10px;
    font-size: 12px;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.column-setting-item.draggable label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.reset-columns-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.reset-columns-btn:hover {
    background: #c82333;
}

/* Прогресс-бар */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.progress-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    text-align: center;
    animation: progressAppear 0.3s ease-out;
}

@keyframes progressAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.progress-text {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Индикатор сортировки */
.sort-info {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    padding: 2px 6px;
    background: #e3f2fd;
    border-radius: 3px;
    border: 1px solid #bbdefb;
}

.reset-sort-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    margin-left: 5px;
    padding: 0 3px;
    border-radius: 2px;
    line-height: 1;
}

.reset-sort-btn:hover {
    background: #fff;
    color: #333;
}

/* Скролл-бар */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .campaigns-table {
        min-width: 900px;
    }
    
    .campaigns-table th,
    .campaigns-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
}/* Пан
ель управления над таблицей */
.control-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.control-row {
    display: flex;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-group label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.period-select,
.status-select,
.date-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 140px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.period-select:focus,
.status-select:focus,
.date-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.date-input:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.apply-btn {
    padding: 8px 20px;
    font-weight: 600;
    min-width: 100px;
}

.apply-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-size: 14px;
}

.period-display {
    color: #495057;
}

.loading-indicator {
    color: #007bff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Зафиксированная панель массовых действий */
.fixed-bulk-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    padding: 15px 20px;
    min-height: 70px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bulk-actions-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.fixed-bulk-actions .bulk-info {
    font-weight: 600;
    color: white;
    font-size: 16px;
}

.fixed-bulk-actions .selected-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

.fixed-bulk-actions .bulk-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fixed-bulk-actions .btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    transition: all 0.2s;
}

.fixed-bulk-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fixed-bulk-actions .btn-success {
    background: #28a745;
    border-color: #28a745;
}

.fixed-bulk-actions .btn-warning {
    background: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.fixed-bulk-actions .btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
}

.fixed-bulk-actions .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.fixed-bulk-actions .btn-dark {
    background: #343a40;
    border-color: #343a40;
}

.fixed-bulk-actions .btn-outline-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.fixed-bulk-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.fixed-bulk-actions .btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.fixed-bulk-actions .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Адаптивность для панели управления */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .control-group {
        width: 100%;
    }
    
    .period-select,
    .status-select,
    .date-input {
        min-width: 100%;
    }
    
    .bulk-actions-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .fixed-bulk-actions .bulk-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Отступ снизу для контента чтобы не перекрывался панелью действий */
body {
    padding-bottom: 80px;
}

/* Стили для таблицы аккаунтов */
.accounts-table-container {
    margin-top: 20px;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    /* Отступы для скроллбара чтобы не перекрывал контент */
    padding-right: 12px;
    padding-bottom: 12px;
}

.accounts-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
}

.accounts-table th {
    background: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.accounts-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.accounts-table .select-column {
    width: 60px;
    text-align: center;
}

.accounts-table .account-column {
    width: 200px;
}

.accounts-table .description-column {
    width: 300px;
}

.accounts-table .info-column {
    width: 250px;
}

.accounts-table .actions-column {
    width: 120px;
    text-align: center;
}

.account-row {
    transition: background-color 0.2s ease;
}

.account-row:hover {
    background-color: #f8f9fa;
}

.account-row.selected {
    background-color: #f0f8ff;
}

.account-name {
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.account-name:hover {
    text-decoration: underline;
}

.account-description {
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-text {
    flex: 1;
    color: #495057;
}

.no-description {
    flex: 1;
    color: #6c757d;
    font-style: italic;
}

.edit-description-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.edit-description-btn:hover {
    opacity: 1;
    background-color: #f8f9fa;
}

.account-info {
    color: #6c757d;
    font-size: 14px;
}

.single-account-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.single-account-btn:hover {
    background: #0056b3;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .accounts-table-container {
        overflow-x: auto;
    }
    
    .accounts-table {
        min-width: 600px;
    }
    
    .accounts-table th,
    .accounts-table td {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Подсказка статуса */
.status-tooltip {
    margin-left: 4px;
    cursor: help;
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.status-tooltip:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Продвинутая подсказка */
.status-tooltip-container {
    position: relative;
    display: inline-block;
}

.status-tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    font-size: 12px;
    line-height: 1.4;
}

.status-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.status-tooltip-container:hover .status-tooltip-text {
    visibility: visible;
}

/* Улучшенные стили для статусов */
.status {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
}/* Стили 
для описания аккаунтов в списке */
.account-description {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.description-text {
    color: #495057;
    font-size: 14px;
}

.no-description {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.edit-description-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    font-size: 12px;
}

.edit-description-btn:hover {
    opacity: 1;
    background-color: #f8f9fa;
}

/* Стили для таблицы аккаунтов */
.account-name-label {
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.account-name-label:hover {
    text-decoration: underline;
}

.account-type {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.account-info-cell {
    color: #495057;
    font-size: 14px;
}

/* Адаптация существующих стилов для аккаунтов */
.campaign-row.selected {
    background-color: #e3f2fd;
}

.campaign-row:hover {
    background-color: #f8f9fa;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Улучшенные стили для описания в таблице */
.campaign-description .description-text {
    color: #495057;
}

.campaign-description .no-description {
    color: #6c757d;
    font-style: italic;
}

/* Стили для авторизации */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #333;
    margin-bottom: 8px;
    font-size: 24px;
}

.auth-header p {
    color: #666;
    margin: 0;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.auth-submit-btn {
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #0056b3;
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}



/* Стили для панели управления */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.user-info h1 {
    margin: 0 0 8px 0;
    color: #333;
}

.user-info p {
    margin: 0;
    color: #666;
}

/* Контейнер для кнопок действий */
.header-actions-container {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.header-dropdowns {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Кнопка настройки столбцов - в стиле dropdown кнопок */
.column-settings-btn {
    background: #eaecef;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #495057;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.column-settings-btn:hover {
    background: #dee2e6;
}

/* Стили для модального окна настройки столбцов */
.column-settings-content {
    padding: 10px 0;
}

.column-settings-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.column-list {
    max-height: 400px;
    overflow-y: auto;
}

.column-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    background: white;
    cursor: move;
    transition: all 0.2s ease;
    position: relative;
}

.column-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.column-item.dragging {
    opacity: 0.3;
    transform: scale(0.95);
    background: #f0f8ff;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.column-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    z-index: 1000;
}

.column-checkbox {
    margin-right: 12px;
}

.column-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.drag-handle {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M9 3h2v2H9V3zm4 0h2v2h-2V3zM9 7h2v2H9V7zm4 0h2v2h-2V7zm-4 4h2v2H9v-2zm4 0h2v2h-2v-2zm-4 4h2v2H9v-2zm4 0h2v2h-2v-2zm-4 4h2v2H9v-2zm4 0h2v2h-2v-2z"/></svg>') center/contain no-repeat;
    cursor: move;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.drag-handle:hover {
    opacity: 1;
}

.column-list.dragging {
    user-select: none;
}

.header-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 400;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-add-account {
    background: #ffcc00;
    color: #000;
}

.btn-add-account:hover {
    background: #e6b800;
}

.btn-add-manual {
    background: #252a38;
    color: #fff;
}

.btn-add-manual:hover {
    background: #1a1e2a;
}

.btn-update-stats,
.btn-update-statuses,
.btn-refresh-list {
    background: #e9ecef;
    color: #333;
}

.btn-update-stats:hover,
.btn-update-statuses:hover,
.btn-refresh-list:hover {
    background: #dee2e6;
}

.accounts-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .modal-content {
        margin: 20px;
        max-width: none;
    }
}/* 
Стили для иерархии аккаунтов */
.group-row {
    background-color: #f8f9fa;
    font-weight: 600;
}

.group-row:hover {
    background-color: #e9ecef;
}

.group-toggle {
    margin-right: 8px;
    font-size: 14px;
}

.group-count {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
}

.campaign-subrow {
    background-color: #ffffff;
}

.campaign-subrow:hover {
    background-color: #f8f9fa;
}

.campaign-id {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.campaign-tags {
    margin-top: 4px;
}

/* Стили для тегов в модальных окнах - не перекрывают основные стили */
.modal-content .campaign-tag:not(.group-own):not(.group-campaign) {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 2px;
}/* 
Дополнительные стили для модальных окон редактирования аккаунтов */
.account-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.account-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.account-id {
    margin: 0;
    color: #666;
    font-size: 12px;
}

/* Стили для тегов в модальных окнах аккаунтов */
#editClientTagsList .campaign-tag {
    background: #007bff;
    color: white;
    margin: 2px;
}

#editClientTagsList .tag-remove {
    color: rgba(255, 255, 255, 0.8);
}

#editClientTagsList .tag-remove:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Улучшенные стили для полей ввода в модальных окнах */
.modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.modal-body small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Анимация появления модальных окон */
.modal-overlay {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}/*
 Стили для чекбоксов в таблице аккаунтов */
.checkbox-column {
    width: 40px;
    text-align: center;
    padding: 8px !important;
}



/* Улучшенные стили для поля токена */
.token-textarea {
    resize: vertical !important;
    min-height: 80px !important;
    max-height: 200px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Улучшенные стили для тегов */
.tags-input-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.tags-input-wrapper input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box !important;
}

.tags-input-wrapper input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.tags-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

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

.tags-display {
    margin-top: 10px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    gap: 6px;
    max-width: 100%;
    word-break: break-word;
    box-sizing: border-box;
}

.tag-remove-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-remove-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Убираем старые стили тегов в модальных окнах */
#editClientTagsList .campaign-tag {
    display: none;
}

/* Пустое состояние для тегов */
.tags-display:empty::before {
    content: "Теги не добавлены";
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .checkbox-column {
        width: 30px;
    }
    
    .account-checkbox {
        transform: scale(1);
    }
    
    .tags-display {
        min-height: 30px;
        padding: 6px;
    }
    
    .tag-item {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Стили для панели массовых действий */
.bulk-actions-panel {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px);
    max-width: 1300px;
    background: rgba(37, 42, 56, 0.95);
    backdrop-filter: blur(10px);
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 1000;
    transition: bottom 0.3s ease;
}

.bulk-actions-panel.show {
    bottom: 20px;
}

.bulk-info {
    font-size: 13px;
    font-weight: 400;
    color: #fff;
}

.bulk-info #selected-count {
    color: #ffcc00;
    font-weight: 400;
}

.bulk-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 400;
    background: #e9ecef;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.bulk-btn:hover {
    background: #dee2e6;
}

.bulk-btn-cancel {
    background: #e9ecef;
    color: #333;
}

.bulk-btn-cancel:hover {
    background: #dee2e6;
}

.bulk-controls .btn {
    font-size: 12px;
    padding: 6px 12px;
}

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

/* Адаптивность для панели массовых действий */
@media (max-width: 768px) {
    .bulk-actions-panel {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .bulk-info {
        text-align: center;
    }
    
    .bulk-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
}/* 
Дополнительные стили для предотвращения выхода за границы модального окна */
.modal-body .form-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-body .form-group input,
.modal-body .form-group textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ограничиваем ширину подсказок тегов */
.tags-suggestions {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.suggestion-item {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Убираем горизонтальную прокрутку в модальных окнах */
.modal-content {
    overflow-x: hidden;
}

.modal-body {
    overflow-x: hidden;
    word-wrap: break-word;
}

/* Стили для системы буста */

/* Кнопка буста в действиях кампании */
.boost-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    margin-left: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.boost-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

/* Модальное окно буста */
.boost-modal {
    max-width: 600px;
    width: 90%;
}

.boost-modal .modal-header h3 {
    color: #667eea;
    margin: 0;
}

/* Информация о существующем бусте */
.existing-boost-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.existing-boost-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.boost-template {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.boost-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0;
}

.boost-status-badge.active {
    background: rgb(171, 210, 255);
    color: #0056b3;
}

.boost-status-badge.paused {
    background: rgb(255, 251, 171);
    color: #856404;
}

.boost-status-badge.error {
    background: rgb(255, 171, 171);
    color: #721c24;
}

.last-activity {
    color: #666;
    font-size: 13px;
    margin: 10px 0 0 0;
}

/* Форма настройки буста */
.boost-form .campaigns-info {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    color: #1565c0;
    font-weight: 600;
}

.boost-form .campaign-info h4 {
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
}

.boost-form .form-group {
    margin-bottom: 20px;
}

.boost-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.boost-form select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.boost-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Превью шаблона */
.template-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.template-preview h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
}

.template-details p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.template-details strong {
    color: #333;
}

/* Цветовые индикаторы для строк кампаний с бустом */
.campaign-row.boost-active {
    background-color: rgb(171, 210, 255) !important;
}

.campaign-row.boost-paused {
    background-color: rgb(255, 251, 171) !important;
}

.campaign-row.boost-error {
    background-color: rgb(255, 171, 171) !important;
}

.group-row.boost-active {
    background-color: rgba(171, 210, 255, 0.7) !important;
}

.group-row.boost-paused {
    background-color: rgba(255, 251, 171, 0.7) !important;
}

.group-row.boost-error {
    background-color: rgba(255, 171, 171, 0.7) !important;
}

/* Индикатор буста в названии кампании */
.boost-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.boost-indicator.active {
    background: #007bff;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}

.boost-indicator.paused {
    background: #ffc107;
    box-shadow: 0 0 4px rgba(255, 193, 7, 0.5);
}

.boost-indicator.error {
    background: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.5);
}

/* Индикатор буста в группах */
.group-name .campaign-name-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-name .boost-indicator {
    margin-right: 4px;
}

/* Индикатор буста в кампаниях внутри групп */
.campaign-subrow .campaign-name-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Анимация для кнопки буста */
@keyframes boostPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.boost-btn.active {
    animation: boostPulse 2s infinite;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .boost-modal {
        width: 95%;
        margin: 20px auto;
    }
    
    .boost-btn {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .existing-boost-info {
        padding: 15px;
    }
    
    .template-preview {
        padding: 12px;
    }
}/* 
Стили для информации о следующем действии буста */
.next-activity {
    color: #666;
    font-size: 13px;
    margin: 15px 0 0 0;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.next-activity strong {
    color: #1976d2;
}

.time-remaining {
    color: #1976d2;
    font-weight: 600;
    font-size: 12px;
}

.next-activity.overdue {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.overdue-text {
    color: #f57c00;
    font-weight: 600;
    font-size: 12px;
}

.last-activity {
    color: #666;
    font-size: 13px;
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.last-activity strong {
    color: #333;
}

/* Улучшенные стили для информации о бусте */
.existing-boost-info {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.existing-boost-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.boost-template {
    color: #666;
    margin: 5px 0 15px 0;
    font-size: 14px;
    font-style: italic;
}/* Стили дл
я навигации уже включены в navigation.php */

/* Дополнительные стили для контента с навигацией */
body {
    margin: 0;
    padding: 0;
}

.container {
    margin-top: 20px;
}

/* Адаптация существующих стилей для работы с навигацией */
.dashboard-header,
.campaigns-header {
    margin-bottom: 30px;
}

.dashboard-header .header-actions {
    display: flex;
    gap: 10px;
}

.campaigns-header {
    text-align: center;
    padding: 20px 0;
}

.campaigns-header h1 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.campaigns-header p {
    margin: 0;
    color: #666;
}
/* =
==== WORKSPACE STYLES ===== */

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

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.workspace-header h1 {
    margin: 0;
    color: #2c3e50;
}

.workspace-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.workspace-stats span {
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    font-weight: 500;
}

/* Вкладки */
.workspace-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.tab-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Содержимое вкладок */
.workspace-content {
    min-height: 500px;
    position: relative;
}

/* Индикатор загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Контейнер уведомлений - фиксированный сверху */
#message-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    gap: 10px;
}

/* Уведомления */
.notification-toast {
    pointer-events: auto;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 500px;
    text-align: center;
}

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

.notification-toast.notification-hide {
    transform: translateY(-100px);
    opacity: 0;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 30px;
    font-size: 16px;
}

/* ===== ВКЛАДКА АККАУНТОВ ===== */

.accounts-tab {
    animation: fadeIn 0.3s ease;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.tab-header h3 {
    margin: 0;
    color: #495057;
}

.tab-actions {
    display: flex;
    gap: 10px;
}

/* Таблица аккаунтов в workspace */
.accounts-table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 100px; /* Отступ для панели массовых действий */
}

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

.accounts-table th {
    background: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

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

.account-row:hover {
    background-color: #f8f9fa;
}

.campaign-subrow {
    background: white;
}

.campaign-subrow:hover {
    background: #f0f0f0;
}

.group-toggle {
    color: #007bff;
    font-size: 16px;
}

.group-count {
    color: #666;
    font-size: 12px;
    margin-left: 8px;
}

.checkbox-column {
    width: 40px;
    text-align: center;
}

.center {
    text-align: center;
}

.campaign-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* ===== ВКЛАДКА КАМПАНИЙ ===== */

.campaigns-tab {
    animation: fadeIn 0.3s ease;
}

.campaigns-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.campaigns-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.campaigns-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.campaign-row:hover {
    background: #f8f9fa;
}

.campaign-name strong {
    color: #2c3e50;
    font-size: 14px;
}

.campaign-id {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.paused {
    background: #fff3cd;
    color: #856404;
}

.status-badge.blocked {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.archived {
    background: #e2e3e5;
    color: #383d41;
}

.campaign-actions {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .workspace-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .workspace-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .campaigns-table-container {
        overflow-x: auto;
    }
    
    .campaigns-table {
        min-width: 800px;
    }
}/* ===== CA
MPAIGNS TAB STYLES ===== */

/* Панель управления */
.control-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.control-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.control-group select,
.control-group input[type="date"] {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* Настройки столбцов */
.column-settings {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.column-settings h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.column-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.column-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Группы кампаний */
.group-row {
    background: #f8f9fa;
    font-weight: 600;
}

.group-row:hover {
    background: #e9ecef;
}

.group-name {
    color: #495057;
}

.group-count {
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
}

.group-toggle {
    color: #007bff;
    font-size: 16px;
    cursor: pointer;
}

.group-toggle:hover {
    color: #0056b3;
}

/* Строки кампаний */
.campaign-subrow {
    background: #fafafa;
}

.campaign-subrow:hover {
    background: #f0f0f0;
}

.campaign-name-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.campaign-id {
    color: #6c757d;
    font-size: 12px;
    font-weight: normal;
    margin-top: 2px;
}

/* Статусы кампаний */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.paused {
    background: #fff3cd;
    color: #856404;
}

.status-badge.blocked {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.archived {
    background: #e2e3e5;
    color: #383d41;
}

.status-badge.moderation {
    background: #cce7ff;
    color: #004085;
}

.status-badge.rejected {
    background: #f5c6cb;
    color: #721c24;
}

.status-badge.unknown {
    background: #e9ecef;
    color: #6c757d;
}

.status-badge.banned {
    background: #dc3545;
    color: white;
}

.status-banned {
    padding: 4px 8px;
    background-color: #dc3545;
    color: white;
}

/* Колонки таблицы */
.select-column {
    width: 40px;
    text-align: center;
}

.expand-column {
    width: 30px;
    text-align: center;
}

.campaign-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* Адаптивность для campaigns tab */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .control-group {
        flex-wrap: wrap;
    }
    
    .column-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .campaigns-table-container {
        overflow-x: auto;
    }
    
    .campaigns-table {
        min-width: 1000px;
    }
}

/* ===== WORKSPACE V2 STYLES ===== */

/* Скрываем содержимое неактивных вкладок */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Стили для таблицы аккаунтов в workspace */
.accounts-table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 100px; /* Отступ для панели массовых действий */
}

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

.accounts-table th {
    background: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

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

.account-row:hover {
    background-color: #f8f9fa;
}

/* Панель массовых действий для аккаунтов */
#accounts-bulk-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

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

#accounts-bulk-actions .bulk-info {
    font-weight: 600;
}

#accounts-bulk-actions .bulk-controls {
    display: flex;
    gap: 10px;
}

#accounts-bulk-actions .btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
}
/* ФИ
НАЛЬНЫЕ ПРАВИЛА ДЛЯ ТЕГОВ - МАКСИМАЛЬНЫЙ ПРИОРИТЕТ */
.campaign-tag.group-own {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
}

.campaign-tag.group-campaign {
    background-color: #007bff !important;
    color: white !important;
    border: none !important;
}

.campaign-tag:not(.group-own):not(.group-campaign) {
    background-color: #6c757d !important;
    color: white !important;
    border: none !important;
}
/*
 Модальное окно результатов проверки банов */
.ban-results-modal {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.ban-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    min-width: 100px;
    background: white;
    border: 2px solid #e9ecef;
}

.stat-item.active {
    border-color: #28a745;
    background: #d4edda;
}

.stat-item.banned {
    border-color: #dc3545;
    background: #f8d7da;
}

.stat-item.error {
    border-color: #ffc107;
    background: #fff3cd;
}

.stat-item.no-campaigns {
    border-color: #6c757d;
    background: #e2e3e5;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.ban-results-list {
    max-height: 400px;
    overflow-y: auto;
}

.ban-result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
}

.ban-result-item.active {
    background: #d4edda;
    border-left-color: #28a745;
}

.ban-result-item.banned {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.ban-result-item.error {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.ban-result-item.no_campaigns {
    background: #e2e3e5;
    border-left-color: #6c757d;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.campaigns-count {
    font-size: 12px;
    color: #6c757d;
}

.ban-result-item .status-badge {
    align-self: flex-start;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.ban-result-item .status-badge.active {
    background: #28a745;
    color: white;
}

.ban-result-item .status-badge.banned {
    background: #dc3545;
    color: white;
}

.ban-result-item .status-badge.error {
    background: #ffc107;
    color: #212529;
}

.ban-result-item .status-badge.no_campaigns {
    background: #6c757d;
    color: white;
}

.result-message {
    font-size: 14px;
    color: #495057;
}

.error-code {
    font-size: 12px;
    color: #dc3545;
    font-family: monospace;
}

/* Кнопка проверки банов */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-warning:disabled {
    background-color: #ffc107;
    border-color: #ffc107;
    opacity: 0.6;
    cursor: not-allowed;
}/* 
Отступ снизу для контейнера когда активна панель массовых действий */
.table-container.with-bulk-actions {
    margin-bottom: 100px;
}

/* Отступ для всего контейнера страницы */
.container.with-bulk-actions {
    padding-bottom: 100px;
}

/* Плавный переход при появлении/исчезновении панели */
.table-container,
.container {
    transition: margin-bottom 0.3s ease-out, padding-bottom 0.3s ease-out;
}

/* Дополнительный отступ для мобильных устройств */
@media (max-width: 768px) {
    .table-container.with-bulk-actions {
        margin-bottom: 120px;
    }
    
    .container.with-bulk-actions {
        padding-bottom: 120px;
    }
}/* Статус
 для архивных кампаний забаненных аккаунтов */
.status-archived-banned {
    background: linear-gradient(135deg, #6c757d 0%, #dc3545 100%);
    color: white;
    font-weight: bold;
    position: relative;
}

.status-archived-banned::after {
    content: "🚫";
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.8;
}

/* ==
======================================
   ВАРИАНТ 3: Стили таблицы аккаунтов
   ======================================== */

/* Основная строка аккаунта с цветной полоской */
.accounts-table .main-account-row {
    cursor: pointer;
    border-left: 4px solid #007bff;
    transition: all 0.2s;
}

.accounts-table .main-account-row:hover {
    background-color: #f8f9fa;
}

/* Цветная полоска для аккаунта (цвет задается через style) */
.accounts-table .main-account-row[data-color] {
    border-left-color: var(--account-color);
}

/* Клиентские строки с белым фоном */
.accounts-table .client-account-row {
    background: white;
    border-left: 4px solid #e9ecef;
    display: none !important;
}

/* Цветная полоска для клиентских аккаунтов (наследуют цвет родителя) */
.accounts-table .client-account-row[data-color] {
    border-left-color: var(--account-color);
}

.accounts-table .client-account-row.show {
    display: table-row !important;
}

.accounts-table .client-account-row:hover {
    background-color: #f8f9fa;
}

/* Отступ для клиентских строк */
.accounts-table .client-account-row td:first-child {
    padding-left: 40px;
}

/* Разделение между столбцами */
.accounts-table td {
    border-right: 1px solid #f0f0f0;
}

.accounts-table td:last-child {
    border-right: none;
}

.accounts-table th {
    border-right: 1px solid #e0e0e0;
}

.accounts-table th:last-child {
    border-right: none;
}

/* Название аккаунта */
.account-name-cell {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

/* Бейдж типа аккаунта (main/acc) */
.account-type-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    margin-left: 6px;
    border-radius: 3px;
    background: #e9ecef;
    color: #495057;
    vertical-align: super;
    line-height: 1;
}

.account-date-info {
    color: #868e96;
    font-size: 11px;
    font-weight: 300;
    margin-top: 3px;
}

/* Логин аккаунта - выровнен со стандартными полями */
.account-login-cell {
    color: #212529;
    font-size: 13px;
}

/* Теги */
.account-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e7f3ff;
    color: #007bff;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 5px;
}

/* Кнопки действий */
.account-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.account-actions .btn {
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Чекбоксы */
.accounts-table .checkbox-column {
    width: 50px;
    text-align: center;
}

.accounts-table .checkbox-column input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}


/* Базовые стили для ячеек таблицы */
.accounts-table th,
.accounts-table td {
    overflow: hidden;
    vertical-align: top;
    word-wrap: break-word;
}

/* Для большинства колонок - запрет переноса */
/* Запрет переноса текста в таблице */
.accounts-table th,
.accounts-table td {
    white-space: nowrap;
}

/* Колонка описания - разрешаем перенос на 2 строки */
.accounts-table td.description-cell {
    white-space: normal;
    line-height: 1.3;
    height: 2.6em; /* Фиксированная высота для всех ячеек */
    max-height: 2.6em;
    overflow: hidden;
    position: relative;
    vertical-align: top;
    word-break: break-word;
    text-align: center;
}

.accounts-table td.description-cell .cell-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em;
    position: relative;
    word-break: break-word;
}

/* Градиентная маска для плавного исчезновения текста */
.accounts-table .clickable-cell .cell-content {
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.accounts-table .clickable-cell .cell-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.9) 60%, white);
    pointer-events: none;
    z-index: 1;
}

/* Для строк с hover эффектом */
.accounts-table tr:hover .clickable-cell .cell-content::after {
    background: linear-gradient(to right, rgba(248,249,250,0), rgba(248,249,250,0.9) 60%, #f8f9fa);
}

/* Кликабельные ячейки */
.accounts-table .clickable-cell {
    cursor: pointer;
    position: relative;
    padding-left: 12px;
    padding-right: 12px;
}

/* Для всех строк таблицы устанавливаем минимальную высоту */
.accounts-table tr {
    height: auto;
    min-height: 2.6em;
}

/* Выравниваем все ячейки по верху */
.accounts-table td {
    vertical-align: top;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Колонка названия - особое выравнивание */
.accounts-table td.account-name-cell {
    vertical-align: middle;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.4;
    white-space: normal;
}

/* Стили для логина под именем */
.accounts-table .account-login-info {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.2;
    font-weight: normal;
    display: block;
    width: 100%;
}

/* Стили для информации о дате в названии */
.accounts-table .account-date-info {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
    line-height: 1.2;
}

/* Бейджи типа аккаунта */
.accounts-table .account-type-badge {
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
    background: #e9ecef;
    color: #6c757d;
    font-weight: normal;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Колонки с центральным выравниванием - выравниваем по центру */
.accounts-table td.center {
    vertical-align: middle;
}

/* Колонка чекбоксов - выравниваем по центру */
.accounts-table td.checkbox-column {
    vertical-align: middle;
}

/* Размер чекбоксов - одинаковый для всех */
.accounts-table .checkbox-column input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    cursor: pointer;
    vertical-align: middle;
    display: inline-block;
    box-sizing: border-box;
    transform: scale(0.9);
    transform-origin: center;
}

/* Чекбокс в заголовке */
.accounts-table th.checkbox-column input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    cursor: pointer;
    vertical-align: middle;
    display: inline-block;
    box-sizing: border-box;
    transform: scale(0.9);
    transform-origin: center;
}

/* Колонка действий - автоматическая ширина */
.accounts-table th[data-column="actions"],
.accounts-table td:last-child {
    width: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    max-width: none !important;
    vertical-align: middle !important;
}

/* Специально для ячеек с кнопками действий */
.accounts-table td:has(.account-actions),
.accounts-table td .account-actions {
    vertical-align: middle !important;
}

/* Альтернативный способ для браузеров без поддержки :has() */
.accounts-table .main-account-row td:last-child,
.accounts-table .client-account-row td:last-child {
    vertical-align: middle !important;
}

/* Контейнер для кнопок действий */
.accounts-table .account-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: max-content;
    width: max-content;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Кнопки в колонке действий */
.accounts-table .account-actions .btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11px;
    padding: 3px 6px;
    min-width: auto;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Убираем ограничения ширины таблицы если нужно */
.accounts-table {
    table-layout: auto;
    width: 100%;
    min-width: max-content;
}

/* Контейнер таблицы должен позволять горизонтальную прокрутку */
.accounts-table-container {
    overflow-x: auto;
    width: 100%;
}

/* Принудительно устанавливаем автоматическую ширину для последней колонки */
.accounts-table colgroup col:last-child,
.accounts-table th:last-child,
.accounts-table td:last-child {
    width: auto !important;
    min-width: max-content !important;
}

/* Выравнивание заголовков по центру по вертикали */
.accounts-table th {
    vertical-align: middle !important;
    text-align: center !important;
    height: 40px;
    line-height: 1.2;
}

/* Специальное выравнивание для колонки чекбоксов */
.accounts-table th.checkbox-column {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Обеспечиваем одинаковую высоту для всех строк */
.accounts-table tbody tr {
    height: 2.8em; /* Немного больше чем высота описания для отступов */
}

/* Для строк с многострочным содержимым */
.accounts-table tbody tr:has(.description-cell) {
    height: auto;
    min-height: 2.8em;
}

/* Альтернативный способ для браузеров без поддержки :has() */
.accounts-table .main-account-row,
.accounts-table .client-account-row {
    height: auto;
    min-height: 2.8em;
}

/* Колонка названия - особая обработка */
.accounts-table td.account-name-cell {
    white-space: normal;
    line-height: 1.3;
    max-height: 2.6em; /* Строго 2 строки */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Максимум 2 строки */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Убираем лишние отступы в содержимом ячеек */
.accounts-table td.account-name-cell * {
    margin: 0;
    padding: 0;
}

/* Компактное отображение бейджей */
.accounts-table td.account-name-cell .account-type-badge {
    display: inline-block;
    vertical-align: baseline;
    margin-left: 4px;
}

/* Ресайзер для колонок таблицы аккаунтов */
.accounts-table th {
    position: relative;
}

.accounts-table .column-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize !important;
    background: transparent;
    z-index: 15;
    user-select: none;
}

.accounts-table .column-resizer:hover {
    background: rgba(0, 123, 255, 0.3);
    width: 4px;
    right: -2px;
    cursor: col-resize !important;
}

.accounts-table .column-resizer:active {
    background: #007bff;
    cursor: col-resize !important;
}

/* Предотвращаем конфликты курсора в заголовках */
.accounts-table th:hover {
    cursor: default;
}

.accounts-table th * {
    pointer-events: none;
}

.accounts-table th .column-resizer {
    pointer-events: auto;
}

/* Чекбокс в заголовке должен быть кликабельным */
.accounts-table th.checkbox-column input[type="checkbox"] {
    pointer-events: auto;
}

/* Универсальные стили для всех чекбоксов в таблице */
.accounts-table input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    vertical-align: middle;
    display: inline-block;
    box-sizing: border-box;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: checkbox;
    transform: scale(0.8);
    transform-origin: center;
    min-width: 14px !important;
    max-width: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
}

/* Принудительное переопределение всех возможных стилей чекбоксов */
.accounts-table input[type="checkbox"],
.accounts-table .checkbox-column input,
.accounts-table .account-checkbox,
.accounts-table .client-checkbox,
.accounts-table #select-all {
    width: 14px !important;
    height: 14px !important;
    transform: scale(0.8) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Состояние изменения размера колонки */
body.column-resizing {
    cursor: col-resize !important;
    user-select: none !important;
}

body.column-resizing * {
    cursor: col-resize !important;
    pointer-events: none !important;
}

body.column-resizing .column-resizer {
    pointer-events: auto !important;
}

/* Название может переноситься */
.account-name-cell {
    white-space: normal;
}

/* Узкие колонки для CTR, CPC, лидов, продаж, CPL и CPA */
.accounts-table th.narrow-column,
.accounts-table td.narrow-column {
    text-align: center !important;
    padding: 8px 4px !important;
}

/* Колонки с выравниванием по центру */
.accounts-table th.center,
.accounts-table td.center {
    text-align: center !important;
}
