/* Основные стили панели управления WP */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #6c757d;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 250px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    max-width: 400px;
    width: 100%;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box .logo h1 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

.login-box .logo p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 25px 20px;
    background: #1a252f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 18px;
    margin: 0 0 12px 0;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.user-info {
    font-size: 13px;
    color: #95a5a6;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #667eea;
    transform: scaleY(0);
    transition: transform 0.3s;
}

.sidebar-menu li.active a::before {
    transform: scaleY(1);
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.08);
    padding-left: 25px;
}

.sidebar-menu li.active a {
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid #667eea;
}

.sidebar-menu .menu-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    margin-right: 12px;
    opacity: 0.8;
    transition: all 0.3s;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-menu li.active .menu-icon {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(102, 126, 234, 0.6));
}

.sidebar-menu li a:hover .menu-icon {
    opacity: 1;
    transform: scale(1.1);
}

.sidebar-menu .menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 10px 20px;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin: 0;
    flex: 1 1 auto;
    min-width: 200px;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.page-header .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .page-header-actions {
        width: 100%;
    }
    
    .page-header .btn .btn-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 24px;
        width: 100%;
    }
    
    .page-header-actions {
        width: 100%;
    }
    
    .page-header .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .page-header .btn .btn-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .page-header .btn {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .page-header .btn .btn-text {
        display: inline;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    font-size: 20px;
    color: #2c3e50;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin-right: 20px;
    color: #667eea;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-outline-info {
    background: transparent;
    color: var(--info);
    border: 2px solid var(--info);
}

.btn-outline-info:hover {
    background: var(--info);
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

@media (max-width: 1600px) {
    .table {
        table-layout: fixed;
    }
    
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        width: 18%;
        max-width: 180px;
    }
    
    .table thead th:nth-child(2),
    .table tbody td:nth-child(2) {
        width: 32%;
    }
    
    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        width: 12%;
    }
    
    .table thead th:nth-child(4),
    .table tbody td:nth-child(4) {
        width: 12%;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        width: 26%;
    }
}

@media (max-width: 1200px) {
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        width: 22%;
    }
    
    .table thead th:nth-child(2),
    .table tbody td:nth-child(2) {
        width: 35%;
    }
    
    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        width: 15%;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        width: 28%;
    }
}

@media (max-width: 992px) {
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        width: 25%;
    }
    
    .table thead th:nth-child(2),
    .table tbody td:nth-child(2) {
        width: 40%;
    }
    
    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        width: 15%;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        width: 20%;
    }
}

.table thead th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody td .btn {
    margin-right: 6px !important;
    margin-bottom: 4px !important;
    white-space: nowrap;
    overflow: visible;
}

.table tbody td .btn:last-child {
    margin-right: 0 !important;
}

.table tbody td form {
    display: inline-block !important;
    margin: 0 !important;
    vertical-align: top;
}

/* Убеждаемся, что кнопки не обрезаются */
.table tbody td:last-child {
    overflow: visible !important;
    white-space: normal !important;
}

.table tbody td {
    vertical-align: middle;
}

/* Обработка длинных названий и URL */
.table tbody td:nth-child(1) {
    /* Название сайта - с переносом и обрезкой */
    max-width: 200px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.table tbody td:nth-child(2) {
    /* URL - с переносом */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

/* Адаптивность для таблиц */
@media (max-width: 1600px) {
    .table thead th:nth-child(5),
    .table tbody td:nth-child(5) {
        /* Скрываем "Последняя проверка" на средних экранах */
        display: none;
    }
}

@media (max-width: 1400px) {
    .table tbody td:nth-child(1) {
        /* Название - ограничиваем ширину */
        max-width: 150px;
        font-size: 13px;
    }
    
    .table tbody td:nth-child(2) {
        /* URL - с переносом */
        max-width: 220px;
        white-space: normal;
        word-wrap: break-word;
        font-size: 13px;
    }
    
    .table tbody td:last-child {
        /* Колонка действий - компактные кнопки */
        white-space: normal;
        min-width: 200px;
        width: auto;
    }
    
    .table tbody td:last-child .btn,
    .table tbody td:last-child form {
        display: inline-block !important;
        width: auto !important;
        margin-right: 4px !important;
        margin-bottom: 4px !important;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .table tbody td:last-child .btn svg {
        width: 12px !important;
        height: 12px !important;
        margin-right: 3px !important;
    }
}

@media (max-width: 1200px) {
    .table thead th:nth-child(4),
    .table tbody td:nth-child(4) {
        /* Скрываем "Постов" на узких экранах */
        display: none;
    }
    
    .table tbody td:nth-child(1) {
        max-width: 130px;
        font-size: 12px;
    }
    
    .table tbody td:nth-child(2) {
        max-width: 200px;
        font-size: 12px;
    }
    
    .table tbody td:last-child {
        /* Колонка действий - кнопки вертикально на узких экранах */
        white-space: normal;
        min-width: 140px;
        width: 140px;
    }
    
    .table tbody td:last-child .btn,
    .table tbody td:last-child form {
        display: block !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 5px !important;
        text-align: center;
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .table tbody td:last-child .btn:last-child,
    .table tbody td:last-child form:last-child {
        margin-bottom: 0 !important;
    }
    
    .table tbody td:last-child .btn svg {
        width: 12px !important;
        height: 12px !important;
        margin-right: 3px !important;
    }
}

@media (max-width: 992px) {
    /* Скрываем название на средних экранах, чтобы освободить место */
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        display: none;
    }
    
    .table tbody td:nth-child(2) {
        max-width: none;
        width: 40% !important;
        font-size: 12px;
    }
    
    .table tbody td:last-child {
        min-width: 160px;
        width: 35% !important;
    }
    
    .table tbody td:last-child .btn,
    .table tbody td:last-child form {
        display: block !important;
        width: 100% !important;
        padding: 5px 6px;
        font-size: 11px;
    }
    
    .table tbody td:last-child .btn svg {
        width: 12px !important;
        height: 12px !important;
        margin-right: 3px !important;
    }
}

@media (max-width: 768px) {
    /* Скрываем колонку "Название" на малых экранах */
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) {
        display: none;
    }
    
    /* Перераспределяем ширину оставшихся колонок */
    .table thead th:nth-child(2),
    .table tbody td:nth-child(2) {
        width: 35% !important;
        max-width: none;
    }
    
    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        width: 15% !important;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        width: 50% !important;
        min-width: 180px;
    }
    
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 500px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px;
        font-size: 13px;
    }
    
    .table tbody td:last-child {
        min-width: 180px;
        width: 50% !important;
    }
    
        .table tbody td:last-child .btn,
    .table tbody td:last-child form {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* Стили для страницы воркеров - группировка кнопок действий */
.actions-cell {
    min-width: 200px;
    white-space: nowrap;
}

.actions-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.actions-group .btn,
.actions-group .action-form {
    flex-shrink: 0;
    margin: 0 !important;
}

.actions-group .btn {
    padding: 6px 10px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actions-group .btn-warning {
    background-color: #ff9800;
    border-color: #ff9800;
    color: white;
}

.actions-group .btn-warning:hover {
    background-color: #f57c00;
    border-color: #f57c00;
    color: white;
}

.actions-group .action-form {
    display: inline-block;
    margin: 0;
    vertical-align: top;
}

/* Адаптивность для страницы воркеров */
@media (max-width: 1400px) {
    .actions-group {
        gap: 3px;
    }
    
    .actions-group .btn {
        padding: 5px 8px;
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .actions-group .btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 1200px) {
    .actions-cell {
        min-width: 160px;
    }
    
    .actions-group {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .actions-group .btn,
    .actions-group .action-form {
        flex: 0 0 calc(50% - 2px);
        max-width: calc(50% - 2px);
    }
    
    .actions-group .btn {
        padding: 6px 8px;
        min-width: auto;
        width: 100%;
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .actions-cell {
        min-width: 140px;
        width: 35% !important;
    }
    
    .actions-group {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }
    
    .actions-group .btn,
    .actions-group .action-form {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }
    
    .actions-group .btn {
        padding: 7px 10px;
        min-width: auto;
        height: auto;
        font-size: 12px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .actions-cell {
        min-width: 150px;
        width: 50% !important;
    }
    
    .actions-group {
        gap: 5px;
    }
    
    .actions-group .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-icon-svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #667eea;
    opacity: 0.5;
}

.empty-state h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Grid layouts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-6 {
    flex: 0 0 50%;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
    }
}

/* Sites grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.site-card {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.site-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Actions grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.action-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    color: #667eea;
    transition: all 0.3s;
}

.action-btn:hover .action-icon {
    color: #5568d3;
    transform: scale(1.1);
}

/* Checkbox cards */
.checkbox-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-card:hover {
    border-color: var(--primary);
}

.checkbox-card input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
}

/* Progress */
.bulk-progress {
    margin-top: 30px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.result-item {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.result-item.success {
    background: #d4edda;
}

.result-item.error {
    background: #f8d7da;
}

/* Logs info bar */
.logs-info-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    text-align: center;
}

.info-item strong {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 20px 0;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.pagination-arrow {
    padding: 8px 15px !important;
    font-weight: 500;
}

.pagination-arrow:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.pagination-dots {
    padding: 8px 5px;
    color: #999;
    font-weight: bold;
}

.pagination-info {
    margin-left: 15px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

/* Footer */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content,
    .main-footer {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* CKEditor 5 */
.ck-editor__editable {
    min-height: 400px;
}

.ck.ck-editor__main>.ck-editor__editable {
    border: 2px solid #e0e0e0;
    border-radius: 0 0 5px 5px;
}

.ck.ck-editor__top .ck-sticky-panel .ck-toolbar {
    border: 2px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 5px 5px 0 0;
    background: #f8f9fa;
}

.ck.ck-editor {
    margin-bottom: 10px;
}

.form-group .text-muted {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

/* Workers Grid - адаптивность */
.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
}

@media (max-width: 1200px) {
    .workers-grid {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    }
}

@media (max-width: 768px) {
    .workers-grid {
        grid-template-columns: 1fr;
    }
    
    .worker-card > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Tabs Navigation */
.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #ddd;
}

.nav-tabs .nav-item {
    margin-right: 5px;
}

.nav-tabs .nav-link {
    display: block;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
    color: #2196F3;
    background: #f5f5f5;
}

.nav-tabs .nav-link.active {
    color: #2196F3;
    font-weight: bold;
    border-bottom-color: #2196F3;
    background: transparent;
}

/* Utilities */
.mt-4 { margin-top: 40px; }
.text-muted { color: #666; }
.text-center { text-align: center; }

/* Адаптивность для таблицы проектов */
.projects-table {
    table-layout: fixed;
    width: 100%;
}

.projects-table thead th:nth-child(1),
.projects-table tbody td:nth-child(1) {
    width: 5%;
}

.projects-table thead th:nth-child(2),
.projects-table tbody td:nth-child(2) {
    width: 18%;
}

.projects-table thead th:nth-child(3),
.projects-table tbody td:nth-child(3) {
    width: 12%;
}

.projects-table thead th:nth-child(4),
.projects-table tbody td:nth-child(4) {
    width: 10%;
}

.projects-table thead th:nth-child(5),
.projects-table tbody td:nth-child(5) {
    width: 20%;
}

.projects-table thead th:nth-child(6),
.projects-table tbody td:nth-child(6) {
    width: 15%;
}

.projects-table thead th:last-child,
.projects-table tbody td:last-child {
    width: 20%;
}

.projects-table tbody td:nth-child(2) {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.projects-table tbody td:nth-child(5) {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    font-size: 12px;
}

.projects-table tbody td:last-child {
    overflow: visible !important;
    white-space: normal !important;
}

@media (max-width: 1400px) {
    .projects-table thead th:nth-child(6),
    .projects-table tbody td:nth-child(6) {
        display: none;
    }
    
    .projects-table thead th:nth-child(5),
    .projects-table tbody td:nth-child(5) {
        width: 25%;
    }
    
    .projects-table thead th:last-child,
    .projects-table tbody td:last-child {
        width: 25%;
    }
}

@media (max-width: 1200px) {
    .projects-table thead th:nth-child(1),
    .projects-table tbody td:nth-child(1) {
        width: 6%;
    }
    
    .projects-table thead th:nth-child(2),
    .projects-table tbody td:nth-child(2) {
        width: 20%;
    }
    
    .projects-table thead th:nth-child(3),
    .projects-table tbody td:nth-child(3) {
        width: 14%;
    }
    
    .projects-table thead th:nth-child(4),
    .projects-table tbody td:nth-child(4) {
        width: 12%;
    }
    
    .projects-table thead th:nth-child(5),
    .projects-table tbody td:nth-child(5) {
        width: 28%;
    }
    
    .projects-table thead th:last-child,
    .projects-table tbody td:last-child {
        width: 20%;
        min-width: 180px;
    }
    
    .projects-table .actions-group {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .projects-table .actions-group .btn {
        padding: 5px 8px;
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .projects-table thead th:nth-child(3),
    .projects-table tbody td:nth-child(3) {
        display: none;
    }
    
    .projects-table thead th:nth-child(2),
    .projects-table tbody td:nth-child(2) {
        width: 22%;
    }
    
    .projects-table thead th:nth-child(4),
    .projects-table tbody td:nth-child(4) {
        width: 12%;
    }
    
    .projects-table thead th:nth-child(5),
    .projects-table tbody td:nth-child(5) {
        width: 30%;
    }
    
    .projects-table thead th:last-child,
    .projects-table tbody td:last-child {
        width: 36%;
        min-width: 160px;
    }
    
    .projects-table .actions-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .projects-table .actions-group .btn,
    .projects-table .actions-group .action-form {
        width: 100%;
    }
    
    .projects-table .actions-group .btn {
        padding: 6px 10px;
        font-size: 12px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .projects-table {
        min-width: 500px;
    }
    
    .projects-table thead th:nth-child(1),
    .projects-table tbody td:nth-child(1) {
        width: 8%;
    }
    
    .projects-table thead th:nth-child(2),
    .projects-table tbody td:nth-child(2) {
        width: 25%;
    }
    
    .projects-table thead th:nth-child(4),
    .projects-table tbody td:nth-child(4) {
        width: 15%;
    }
    
    .projects-table thead th:nth-child(5),
    .projects-table tbody td:nth-child(5) {
        width: 25%;
        font-size: 11px;
    }
    
    .projects-table thead th:last-child,
    .projects-table tbody td:last-child {
        width: 27%;
        min-width: 150px;
    }
    
    .projects-table tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .projects-table .actions-group .btn {
        padding: 7px 10px;
        font-size: 11px;
    }
}

/* Адаптивные стили для таблицы текстов */
.texts-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.texts-table thead th {
    white-space: nowrap;
    padding: 12px 8px;
}

.texts-table tbody td {
    padding: 12px 8px;
    vertical-align: middle;
    word-wrap: break-word;
}

/* Уменьшаем ширину колонок ID и Проект */
.texts-table .col-id {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
}

.texts-table .col-project {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.texts-table .col-title {
    min-width: 200px;
}

.texts-table .col-actions {
    min-width: 200px;
    white-space: nowrap;
}

.texts-table .actions-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.texts-table .actions-group .btn {
    font-size: 12px;
    padding: 5px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.texts-table .actions-group .btn svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.texts-table .actions-group form {
    display: inline;
    margin: 0;
    flex-shrink: 0;
}

/* Адаптивность для маленьких экранов */
@media (max-width: 1200px) {
    .texts-table .col-title {
        min-width: 150px;
    }
    
    .texts-table .col-actions {
        min-width: 180px;
    }
}

@media (max-width: 992px) {
    .texts-table .col-language {
        display: none;
    }
    
    .texts-table .col-title {
        min-width: 120px;
    }
    
    .texts-table .col-actions {
        min-width: 160px;
    }
    
    .texts-table .col-actions .btn {
        font-size: 11px;
        padding: 4px 6px;
    }
}

@media (max-width: 768px) {
    .texts-table .col-created {
        display: none;
    }
    
    .texts-table .col-title {
        min-width: 100px;
        font-size: 13px;
    }
    
    .texts-table .col-actions {
        min-width: 140px;
    }
    
    .texts-table .actions-group {
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
    }
    
    .texts-table .actions-group .btn {
        width: 100%;
        font-size: 11px;
        padding: 6px 8px;
        text-align: center;
    }
    
    .texts-table .actions-group form {
        width: 100%;
    }
    
    .texts-table .actions-group form .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .texts-table .col-id {
        display: none;
    }
    
    .texts-table .col-title {
        min-width: 80px;
        font-size: 12px;
    }
    
    .texts-table .col-actions {
        min-width: 120px;
    }
}

/* Стили для страницы массовой публикации */
.step-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.step-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-title {
    flex: 1;
}

.sites-mode-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.mode-option {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
}

.mode-option:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mode-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mode-text {
    flex: 1;
}

.mode-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
}

.mode-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.mode-count {
    font-size: 14px;
}

.mode-option input[type="radio"]:checked + .mode-content .mode-title {
    color: #667eea;
    font-weight: 700;
}

.sites-checkboxes {
    margin-top: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.checkbox-card strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.checkbox-card small {
    display: block;
    font-size: 12px;
    color: #666;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Page description */
.page-description {
    color: #666;
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 0;
}

