/* admin-moderation.css - Стили для панели модерации (КОМПАКТНЫЙ РЕЖИМ) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Компактный header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header h1 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-badge.pending {
    background: #ff9800;
    color: white;
    font-weight: 600;
}

/* Компактная навигация */
.nav-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 16px;
    overflow-x: auto;
}

.nav-tab {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-tab:hover {
    color: #667eea;
    background: #f5f5f5;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.container {
    padding: 12px 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Компактные секции */
.main-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.section-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 16px;
}

.section-tabs {
    display: flex;
    gap: 4px;
}

.section-tab {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-tab:hover {
    background: #e8e8e8;
}

.section-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.section-tab .count {
    background: rgba(0,0,0,0.1);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
}

.section-tab.active .count {
    background: rgba(255,255,255,0.25);
}

.section-content {
    padding: 12px;
}

/* Компактные фильтры */
.filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fafafa;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.date-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fafafa;
    cursor: pointer;
}

/* Компактные карточки */
.items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.moderation-item {
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all 0.15s;
    border: 1px solid transparent;
    cursor: pointer;
}

.moderation-item:hover {
    background: #f0f0f5;
    border-color: #667eea;
}

.moderation-item.selected {
    background: #e8eaf6;
    border-color: #667eea;
}

.moderation-item:focus-within {
    border-color: #667eea;
    background: #f0f0f5;
}

.item-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: #e8e8e8;
    flex-shrink: 0;
}

.item-image-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.item-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.badge-category {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-price {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-date {
    background: #fff3e0;
    color: #ef6c00;
}

.item-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #888;
    flex-wrap: wrap;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.item-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

.item-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.item-user .avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

/* Компактные кнопки */
.item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-icon {
    padding: 6px 8px;
    min-width: 28px;
    min-height: 28px;
}

.btn-approve {
    background: #4caf50;
    color: white;
}

.btn-approve:hover {
    background: #43a047;
    transform: scale(1.05);
}

.btn-reject {
    background: #f44336;
    color: white;
}

.btn-reject:hover {
    background: #e53935;
    transform: scale(1.05);
}

.btn-unapprove {
    background: #ff9800;
    color: white;
}

.btn-unapprove:hover {
    background: #f57c00;
}

.btn-view {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-view:hover {
    background: #bbdefb;
}

/* Чекбокс для выбора */
.item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Группировка по пользователю */
.user-group {
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.user-group-header {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    padding: 10px 14px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-details h4 {
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
}

.user-details p {
    font-size: 11px;
    color: #888;
}

.user-stats {
    text-align: right;
}

.user-stats .count {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.user-stats .label {
    font-size: 10px;
    color: #999;
}

.group-items {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Панель пакетных операций */
.batch-actions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: none;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.batch-actions.visible {
    display: flex;
}

.batch-info {
    font-size: 13px;
}

.batch-buttons {
    display: flex;
    gap: 8px;
}

.batch-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.batch-btn-approve {
    background: #4caf50;
    color: white;
}

.batch-btn-reject {
    background: #f44336;
    color: white;
}

.batch-btn-clear {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Кнопка выбора всех */
.select-all-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.select-all-wrapper input {
    accent-color: #667eea;
}

/* Пустое состояние */
.empty-state {
    padding: 40px 16px;
    text-align: center;
    color: #888;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #666;
}

/* Модальное окно */
.rejection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.rejection-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.modal-content textarea {
    width: 100%;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    resize: vertical;
    font-family: inherit;
    font-size: 13px;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #667eea;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Toast уведомления */
.toast {
    position: fixed;
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    z-index: 1000;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196f3;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px 16px;
    color: #888;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .moderation-item {
        flex-wrap: wrap;
    }
    
    .item-image, .item-image-placeholder {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e8e8e8;
    }
    
    .batch-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.moderation-item {
    animation: fadeIn 0.2s ease-out;
}

/* Изменения в объявлении */
.item-changes {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 5px;
    padding: 6px 10px;
    margin: 4px 0;
}

.changes-header {
    font-weight: 600;
    font-size: 10px;
    color: #f57c00;
    margin-bottom: 3px;
}

.changes-list {
    margin: 0;
    padding-left: 14px;
    font-size: 11px;
    color: #666;
}

.changes-list li {
    margin-bottom: 2px;
}

/* Режим сверхкомпактности */
.compact-mode .item-desc {
    display: none;
}

.compact-mode .item-user {
    display: none;
}

.compact-mode .item-meta {
    display: none;
}

.compact-mode .moderation-item {
    padding: 8px 10px;
}

/* Кнопка переключения режима */
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.mode-toggle:hover {
    background: #e8e8e8;
}

.mode-toggle.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}
