/**
 * AI Enrichment Page Styles - Enhanced UX v3.0
 * GPT-5.2 Integration - Modern Mood Design System
 * Cores e estilos alinhados com o design system
 */

/* ============================================
   Container Principal - SPA Integration
   ============================================ */
.ai-enrichment-page {
    padding: 0;
    min-height: 100%;
    background: var(--ai-bg, #ffffff);
}

/* Page Header - DS Aligned */
.ai-enrichment-page .page-header-shell {
    background: var(--mm-surface);
    color: var(--mm-text);
    padding: 1.5rem;
    border-radius: var(--mm-radius-lg, 12px);
    margin-bottom: 1.5rem;
    border: 1px solid var(--mm-border);
    border-left: 4px solid var(--mm-accent);
    box-shadow: var(--mm-shadow-sm);
}

.ai-enrichment-page .page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.ai-enrichment-page .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--mm-text);
}

.ai-enrichment-page .page-title i {
    font-size: 1.5rem;
}

.ai-enrichment-page .page-subtitle {
    color: var(--mm-text-secondary);
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

.ai-enrichment-page .page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* AI Status Badge - DS Aligned */
.ai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--mm-surface-subtle, #f8fafc);
    border: 1px solid var(--mm-border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mm-text-secondary);
}

.ai-status-badge i {
    font-size: 0.625rem;
}

.ai-status-badge.online i {
    color: var(--ai-success);
    animation: pulse 2s ease-in-out infinite;
}

.ai-status-badge.offline i {
    color: var(--ai-warning);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Toggle Group */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--mm-border);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-label input:checked + .toggle-slider {
    background: var(--mm-accent);
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.mode-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mm-text-secondary);
}

/* Tabs Premium */
.ai-enrichment-page .tabs-shell {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

/* ============================================
   CSS Variables - Padrão Modern Mood
   ============================================ */
:root {
    --ai-primary: var(--mm-accent);
    --ai-primary-hover: var(--mm-accent-hover);
    --ai-primary-light: rgba(236, 112, 20, 0.1);
    --ai-success: var(--mm-success);
    --ai-success-light: rgba(16, 185, 129, 0.1);
    --ai-warning: var(--mm-warning);
    --ai-warning-light: rgba(245, 158, 11, 0.1);
    --ai-danger: var(--mm-error);
    --ai-danger-light: rgba(239, 68, 68, 0.1);
    --ai-info: var(--mm-info);
    --ai-info-light: rgba(59, 130, 246, 0.1);
    --ai-purple: color-mix(in srgb, var(--mm-info) 55%, var(--mm-brand-statement));
    --ai-purple-light: rgba(139, 92, 246, 0.1);
    
    --ai-bg: var(--mm-surface);
    --ai-surface: var(--mm-surface-subtle);
    --ai-surface-hover: color-mix(in srgb, var(--mm-surface-subtle) 70%, var(--mm-surface-strong));
    --ai-border: var(--mm-border-subtle);
    --ai-text: var(--mm-text);
    --ai-text-secondary: var(--mm-text-secondary);
    --ai-text-muted: var(--mm-text-muted);
    --ai-bg-secondary: var(--ai-surface);
    --ai-bg-tertiary: color-mix(in srgb, var(--mm-surface-subtle) 80%, black);
    --ai-text-primary: var(--mm-text);
    --ai-text-tertiary: var(--mm-text-muted);
    --ai-purple-strong: color-mix(in srgb, var(--ai-purple) 78%, black);
    --ai-danger-strong: color-mix(in srgb, var(--ai-danger) 78%, black);
    --ai-warning-strong: color-mix(in srgb, var(--ai-warning) 80%, black);
    --ai-info-strong: color-mix(in srgb, var(--ai-info) 76%, black);
    --ai-success-strong: color-mix(in srgb, var(--ai-success) 76%, black);
    --ai-serp-border: color-mix(in srgb, var(--mm-border-subtle) 90%, white);
    --ai-serp-title: color-mix(in srgb, var(--mm-info) 75%, black);
    --ai-serp-text: color-mix(in srgb, var(--mm-text-secondary) 95%, black);
    
    --ai-radius-sm: 6px;
    --ai-radius-md: 10px;
    --ai-radius-lg: 16px;
    --ai-radius-xl: 24px;
    
    --ai-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --ai-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --ai-shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --ai-shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --ai-bg: color-mix(in srgb, var(--mm-surface-inverse) 80%, black);
    --ai-surface: color-mix(in srgb, var(--mm-surface-inverse) 72%, black);
    --ai-surface-hover: color-mix(in srgb, var(--mm-surface-inverse) 62%, black);
    --ai-border: color-mix(in srgb, var(--mm-surface-inverse) 58%, black);
    --ai-text: var(--mm-text-inverse);
    --ai-text-secondary: color-mix(in srgb, var(--mm-text-inverse) 70%, var(--mm-text-muted));
    --ai-text-muted: color-mix(in srgb, var(--mm-text-inverse) 45%, var(--mm-text-muted));
    --ai-bg-secondary: var(--ai-surface);
    --ai-bg-tertiary: color-mix(in srgb, var(--mm-surface-inverse) 86%, black);
    --ai-text-primary: var(--ai-text);
    --ai-text-tertiary: var(--ai-text-muted);
    
    --ai-shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --ai-shadow-md: 0 4px 12px rgba(0,0,0,0.25);
    --ai-shadow-lg: 0 12px 40px rgba(0,0,0,0.35);
}

/* ============================================
   Tab Navigation - Destaque e Visibilidade
   ============================================ */
.tab-nav-premium {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, var(--ai-surface) 0%, var(--ai-bg) 100%);
    border-bottom: 2px solid var(--ai-border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mm-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: none;
}

.tab-btn:hover {
    background: var(--mm-surface-subtle);
    border-color: var(--mm-accent);
    color: var(--mm-text);
}

.tab-btn.active {
    background: var(--mm-accent);
    border-color: var(--mm-accent);
    color: white;
    box-shadow: var(--mm-shadow-sm);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-badge {
    background: var(--ai-danger, #ef4444);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tab-content {
    display: none;
    padding: 0;
    animation: fadeIn 0.3s ease;
}

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

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

/* ============================================
   Stats Grid - Module Version (uses generic classes)
   ============================================ */
.ai-enrichment-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .ai-enrichment-page .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .ai-enrichment-page .stats-grid { grid-template-columns: 1fr; }
}

.ai-enrichment-page .stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ai-enrichment-page .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.ai-enrichment-page .stat-card:nth-child(1)::before { background: var(--ai-success); }
.ai-enrichment-page .stat-card:nth-child(2)::before { background: var(--ai-warning); }
.ai-enrichment-page .stat-card:nth-child(3)::before { background: var(--ai-primary); }
.ai-enrichment-page .stat-card:nth-child(4)::before { background: var(--ai-info); }

.ai-enrichment-page .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ai-shadow-lg, 0 12px 40px rgba(0,0,0,0.12));
}

.ai-enrichment-page .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--ai-radius-md, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.ai-enrichment-page .stat-icon-complete {
    background: var(--mm-success-bg, rgba(34, 197, 94, 0.12));
    color: var(--mm-success);
}

.ai-enrichment-page .stat-icon-attention {
    background: var(--mm-warning-bg, rgba(245, 158, 11, 0.12));
    color: var(--mm-warning);
}

.ai-enrichment-page .stat-icon-enriched {
    background: rgba(236, 112, 20, 0.12);
    color: var(--mm-accent);
}

.ai-enrichment-page .stat-icon-average {
    background: var(--mm-info-bg, rgba(59, 130, 246, 0.12));
    color: var(--mm-info);
}

.ai-enrichment-page .js-hidden {
    display: none;
}

.ai-enrichment-page .batch-load-products-btn {
    margin-top: 1.5rem;
}

.ai-enrichment-page .stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ai-enrichment-page .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ai-text, #1e293b);
    line-height: 1.2;
}

.ai-enrichment-page .stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ai-text-secondary, #64748b);
}

/* Card Header */
.ai-enrichment-page .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ai-border, #e2e8f0);
}

.ai-enrichment-page .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ai-text, #1e293b);
}

.ai-enrichment-page .card-header h3 i {
    color: var(--ai-primary, #EC7014);
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--ai-text-secondary, #64748b);
    font-size: 0.9rem;
}

/* Missing Fields Chart */
.ai-enrichment-page .missing-fields-chart {
    min-height: 200px;
}

/* Search Section */
.ai-enrichment-page .search-section {
    padding: 0;
}

.ai-enrichment-page .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.ai-enrichment-page .search-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--ai-text-secondary, #64748b);
    font-size: 1rem;
}

.ai-enrichment-page .search-input-wrapper .input-premium {
    flex: 1;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--ai-border, #e2e8f0);
    border-radius: var(--ai-radius-md, 10px);
    font-size: 0.95rem;
    background: var(--ai-bg, #fff);
    color: var(--ai-text, #1e293b);
    transition: all 0.3s ease;
}

.ai-enrichment-page .search-input-wrapper .input-premium:focus {
    outline: none;
    border-color: var(--ai-primary, #EC7014);
    box-shadow: 0 0 0 3px rgba(236, 112, 20, 0.15);
}

/* Button Premium */
.ai-enrichment-page .btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--ai-radius-md, 10px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.ai-enrichment-page .btn-premium-primary {
    background: linear-gradient(135deg, var(--ai-primary, #EC7014), var(--ai-primary-hover, #d96012));
    color: white;
    box-shadow: 0 4px 12px rgba(236, 112, 20, 0.25);
}

.ai-enrichment-page .btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 112, 20, 0.35);
}

.ai-enrichment-page .btn-premium-secondary {
    background: var(--ai-surface, #f8fafc);
    color: var(--ai-text, #1e293b);
    border: 2px solid var(--ai-border, #e2e8f0);
}

.ai-enrichment-page .btn-premium-secondary:hover {
    background: var(--ai-surface-hover, #f1f5f9);
    border-color: var(--ai-primary, #EC7014);
}

.ai-enrichment-page .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Icon Button */
.ai-enrichment-page .btn-icon-premium {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ai-text-secondary, #64748b);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-enrichment-page .btn-icon-premium:hover {
    background: var(--ai-surface-hover, #f1f5f9);
    color: var(--ai-text, #1e293b);
}

/* Product List */
.ai-enrichment-page .product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Selected Product Content */
.ai-enrichment-page .selected-product-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ai-enrichment-page .product-preview {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--ai-surface, #f8fafc);
    border-radius: var(--ai-radius-md, 10px);
}

.ai-enrichment-page .product-preview img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.ai-enrichment-page .product-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ai-text, #1e293b);
}

.ai-enrichment-page .product-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ai-text-secondary, #64748b);
}

.ai-enrichment-page .product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ============================================
   Stats Grid - Cards Maiores e Mais Visíveis
   ============================================ */
.stats-grid-ai {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .stats-grid-ai { grid-template-columns: repeat(2, 1fr); }
}

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

.stat-card-ai {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem;
    background: var(--ai-bg);
    border-radius: var(--ai-radius-lg);
    border: 2px solid var(--ai-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-ai::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.stat-card-ai:nth-child(1)::before { background: var(--ai-primary); }
.stat-card-ai:nth-child(2)::before { background: var(--ai-warning); }
.stat-card-ai:nth-child(3)::before { background: var(--ai-success); }
.stat-card-ai:nth-child(4)::before { background: var(--ai-info); }

.stat-card-ai:hover {
    transform: translateY(-4px);
    box-shadow: var(--ai-shadow-lg);
    border-color: var(--ai-primary);
}

.stat-icon-ai {
    width: 64px;
    height: 64px;
    border-radius: var(--ai-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: linear-gradient(135deg, var(--ai-primary-light), rgba(236, 112, 20, 0.2));
    color: var(--ai-primary);
}

.stat-icon-warning {
    background: linear-gradient(135deg, var(--ai-warning-light), rgba(245, 158, 11, 0.2));
    color: var(--ai-warning);
}

.stat-icon-success {
    background: linear-gradient(135deg, var(--ai-success-light), rgba(16, 185, 129, 0.2));
    color: var(--ai-success);
}

.stat-icon-info {
    background: linear-gradient(135deg, var(--ai-info-light), rgba(59, 130, 246, 0.2));
    color: var(--ai-info);
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ai-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ai-text-secondary);
}

/* ============================================
   Missing Fields Chart - Barras Maiores
   ============================================ */
.missing-fields-chart {
    min-height: 280px;
    padding: 1rem 0;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: 250px;
    color: var(--ai-text-secondary);
    font-size: 1rem;
}

.field-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
}

.field-bar-label {
    width: 160px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ai-text);
    flex-shrink: 0;
}

.field-bar-track {
    flex: 1;
    height: 36px;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    overflow: hidden;
    border: 1px solid var(--ai-border);
}

.field-bar-fill {
    height: 100%;
    border-radius: var(--ai-radius-md);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: fit-content;
}

.field-bar-fill.critical { 
    background: linear-gradient(135deg, var(--ai-danger), var(--ai-danger-strong)); 
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.field-bar-fill.warning { 
    background: linear-gradient(135deg, var(--ai-warning), var(--ai-warning-strong)); 
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.field-bar-fill.info { 
    background: linear-gradient(135deg, var(--ai-info), var(--ai-info-strong)); 
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================
   Quick Actions - Cards Interativos
   ============================================ */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.quick-action-card {
    padding: 2rem;
    background: var(--ai-bg);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-action-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--ai-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-card:hover {
    border-color: var(--ai-primary);
    transform: translateY(-6px);
    box-shadow: var(--ai-shadow-xl);
}

.quick-action-card:hover::after {
    opacity: 0.05;
}

.quick-action-card i {
    font-size: 2.5rem;
    color: var(--ai-primary);
    margin-bottom: 1rem;
    display: block;
}

.quick-action-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ai-text);
}

.quick-action-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
}

/* ============================================
   AI Status Badge
   ============================================ */
.ai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--ai-surface);
    color: var(--ai-text-secondary);
    border: 2px solid var(--ai-border);
}

.ai-status-badge i { font-size: 0.6rem; }

.ai-status-badge.online {
    background: var(--ai-success-light);
    color: var(--ai-success);
    border-color: rgba(16, 185, 129, 0.3);
}

.ai-status-badge.online i {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.badge-ai {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
}

/* ============================================
   Mode Toggle - Maior e Mais Visível
   ============================================ */
.mode-toggle-premium {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-lg);
    border: 2px solid var(--ai-border);
}

.toggle-switch-premium {
    position: relative;
    width: 56px;
    height: 30px;
}

.toggle-switch-premium input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-premium {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--ai-border);
    border-radius: 30px;
    transition: 0.3s;
}

.toggle-slider-premium:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.toggle-switch-premium input:checked + .toggle-slider-premium {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-primary-hover));
}

.toggle-switch-premium input:checked + .toggle-slider-premium:before {
    transform: translateX(26px);
}

#modeLabel {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ai-text);
}

/* ============================================
   Search Box - Destaque Total
   ============================================ */
.search-box-premium {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box-premium .search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-box-premium .search-input-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ai-text-muted);
    font-size: 1.1rem;
}

.search-box-premium .input-premium {
    padding-left: 3.25rem;
    width: 100%;
    height: 56px;
    font-size: 1.05rem;
    background: var(--ai-bg);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-lg);
    color: var(--ai-text);
    transition: all 0.3s ease;
}

.search-box-premium .input-premium:focus {
    outline: none;
    border-color: var(--ai-primary);
    box-shadow: 0 0 0 4px var(--ai-primary-light);
}

.search-box-premium .input-premium::placeholder {
    color: var(--ai-text-muted);
}

.input-lg {
    height: 56px;
    font-size: 1.05rem;
}

/* ============================================
   Product Selector Dropdown
   ============================================ */
.product-selector-dropdown {
    background: var(--ai-bg);
    border: 2px solid var(--ai-primary);
    border-radius: var(--ai-radius-xl);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--ai-shadow-xl);
}

.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--ai-primary-light);
    border-bottom: 2px solid var(--ai-border);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ai-text);
}

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

.product-list-premium .product-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--ai-border);
}

.product-list-premium .product-item:hover {
    background: var(--ai-primary-light);
}

.product-list-premium .product-item img {
    width: 70px;
    height: 70px;
    border-radius: var(--ai-radius-md);
    object-fit: cover;
    border: 2px solid var(--ai-border);
}

.product-list-premium .product-item-info {
    flex: 1;
}

.product-list-premium .product-item-info h4 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ai-text);
}

.product-list-premium .product-item-info span {
    font-size: 0.85rem;
    color: var(--ai-text-secondary);
}

.product-list-premium .product-item-score {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.score-high { background: linear-gradient(135deg, var(--ai-success), var(--ai-success-strong)); }
.score-medium { background: linear-gradient(135deg, var(--ai-warning), var(--ai-warning-strong)); }
.score-low { background: linear-gradient(135deg, var(--ai-danger), var(--ai-danger-strong)); }

/* ============================================
   Selected Product Card
   ============================================ */
.selected-product-card {
    background: var(--ai-bg);
    border: 3px solid var(--ai-primary);
    border-radius: var(--ai-radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px var(--ai-primary-light);
}

.product-preview-premium {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-preview-premium img {
    width: 130px;
    height: 130px;
    border-radius: var(--ai-radius-lg);
    object-fit: cover;
    border: 3px solid var(--ai-border);
    flex-shrink: 0;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ai-text);
}

.product-details p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--ai-text-secondary);
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-badges .badge-premium {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}

.product-actions .btn-premium {
    white-space: nowrap;
}

/* ============================================
   Current Values Grid - EDITÁVEL
   ============================================ */
.current-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    padding-top: 2rem;
    border-top: 2px solid var(--ai-border);
}

.current-value-item {
    padding: 1.25rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-lg);
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.current-value-item:hover {
    border-color: var(--ai-primary);
    transform: translateY(-2px);
    box-shadow: var(--ai-shadow-md);
}

.current-value-item.has-value {
    border-left: 4px solid var(--ai-success);
}

.current-value-item.missing {
    border-left: 4px solid var(--ai-danger);
    background: var(--ai-danger-light);
}

.current-value-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ai-text-secondary);
    margin-bottom: 0.6rem;
}

.current-value-item span {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ai-text);
    word-break: break-word;
    line-height: 1.4;
    max-height: 80px;
    overflow: hidden;
}

.current-value-item .edit-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    background: var(--ai-primary);
    color: white;
    border: none;
    border-radius: var(--ai-radius-md);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.current-value-item:hover .edit-btn {
    opacity: 1;
}

.current-value-item .edit-btn:hover {
    background: var(--ai-primary-hover);
    transform: scale(1.05);
}

/* ============================================
   Enrichment Grid - Resultados da IA
   ============================================ */
.enrichment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.enrichment-item {
    background: var(--ai-surface);
    border-radius: var(--ai-radius-lg);
    padding: 1.5rem;
    border: 2px solid var(--ai-border);
    transition: all 0.3s ease;
}

.enrichment-item:hover {
    border-color: var(--ai-primary);
    box-shadow: var(--ai-shadow-md);
}

.enrichment-item.full-width {
    grid-column: 1 / -1;
}

/* Legacy enrichment-item-header — superseded by DS version below (line ~3588) */
/* .enrichment-item-header — see DS-aligned section */

.confidence-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.confidence-high {
    background: var(--ai-success-light);
    color: var(--ai-success);
}

.confidence-medium {
    background: var(--ai-warning-light);
    color: var(--ai-warning);
}

.enrichment-values {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: stretch;
}

.enrichment-values.vertical {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.value-box {
    padding: 1rem;
    border-radius: var(--ai-radius-md);
    background: var(--ai-bg);
}

.value-box.current {
    border: 2px solid var(--ai-danger-light);
}

.value-box.suggested {
    border: 2px solid var(--ai-success);
    background: var(--ai-success-light);
}

.value-box small {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ai-text-muted);
    margin-bottom: 0.4rem;
}

.value-box span, .value-box div {
    font-size: 0.95rem;
    color: var(--ai-text);
    line-height: 1.4;
}

.value-arrow {
    color: var(--ai-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.apply-single-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--ai-primary);
    color: white;
    border: none;
    border-radius: var(--ai-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-single-btn:hover {
    background: var(--ai-primary-hover);
    transform: translateY(-2px);
}

/* ============================================
   Header Filters - MUITO MAIOR
   ============================================ */
.header-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.select-premium {
    height: 48px;
    min-width: 220px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--ai-bg);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    color: var(--ai-text);
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.select-premium:hover {
    border-color: var(--ai-primary);
}

.select-premium:focus {
    outline: none;
    border-color: var(--ai-primary);
    box-shadow: 0 0 0 4px var(--ai-primary-light);
}

/* ============================================
   Missing Products List - Itens Grandes
   ============================================ */
.missing-products-list {
    max-height: 650px;
    overflow-y: auto;
}

.missing-product-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 2px solid var(--ai-border);
    transition: all 0.2s;
}

.missing-product-item:hover {
    background: var(--ai-surface);
}

.missing-product-item img {
    width: 80px;
    height: 80px;
    border-radius: var(--ai-radius-md);
    object-fit: cover;
    border: 2px solid var(--ai-border);
    flex-shrink: 0;
}

.missing-product-info {
    flex: 1;
}

.missing-product-info h4 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ai-text);
}

.missing-product-info > span {
    display: block;
    font-size: 0.85rem;
    color: var(--ai-text-secondary);
    margin-bottom: 0.75rem;
}

.missing-product-info .issues {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.issue-tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--ai-radius-sm);
    font-weight: 600;
}

.issue-tag.high {
    background: var(--ai-danger-light);
    color: var(--ai-danger);
}

.issue-tag.medium {
    background: var(--ai-warning-light);
    color: var(--ai-warning);
}

.issue-tag.low {
    background: var(--ai-info-light);
    color: var(--ai-info);
}

.missing-product-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.missing-product-actions .btn-premium {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.missing-product-score {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

/* ============================================
   Batch Options - Formulário Grande
   ============================================ */
.batch-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.75rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-xl);
    border: 2px solid var(--ai-border);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-group > label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ai-text);
}

.option-group .select-premium {
    width: 100%;
}

.checkbox-label-premium {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--ai-text);
    font-size: 0.95rem;
}

.checkbox-label-premium input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--ai-primary);
}

.batch-actions {
    text-align: center;
    margin-bottom: 2rem;
}

.batch-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--mm-surface, #fff);
    border: 1px solid var(--mm-border, #e2e8f0);
    border-radius: var(--mm-radius-md, 12px);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-info span {
    font-size: 0.85rem;
    color: var(--mm-text, #1e293b);
    font-weight: 600;
}

.progress-bar-shell {
    width: 100%;
    height: 12px;
    background: var(--mm-border, #e2e8f0);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--mm-accent, #EC7014), color-mix(in srgb, var(--mm-accent, #EC7014) 80%, #fff));
    border-radius: 6px;
    transition: width 0.4s ease;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.progress-detail-text {
    font-size: 0.78rem;
    color: var(--mm-text-muted, #94a3b8);
}

.batch-cancel-btn {
    flex-shrink: 0;
}

.batch-results {
    max-height: 450px;
    overflow-y: auto;
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-lg);
}

.batch-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ai-border);
    font-size: 0.95rem;
}

.batch-result-item.success { 
    border-left: 4px solid var(--ai-success);
    background: var(--ai-success-light);
}
.batch-result-item.error { 
    border-left: 4px solid var(--ai-danger);
    background: var(--ai-danger-light);
}

/* ============================================
   Modal Styles - Maior e Mais Usável
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.modal-premium {
    background: var(--ai-bg);
    border-radius: var(--ai-radius-xl);
    box-shadow: var(--ai-shadow-xl);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-md {
    max-width: 600px;
    width: 100%;
}

.modal-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--ai-border);
    background: var(--ai-surface);
}

.modal-header-premium h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ai-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body-premium {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer-premium {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--ai-border);
    background: var(--ai-surface);
}

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

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ai-text);
}

.form-group .input-premium,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: var(--ai-bg);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    color: var(--ai-text);
    transition: all 0.2s;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.form-group .input-premium:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ai-primary);
    box-shadow: 0 0 0 4px var(--ai-primary-light);
}

.ai-suggestion-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--ai-primary-light);
    border: 2px solid rgba(236, 112, 20, 0.3);
    border-radius: var(--ai-radius-lg);
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ai-primary);
}

.suggestion-value {
    font-size: 0.95rem;
    color: var(--ai-text);
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--ai-bg);
    border-radius: var(--ai-radius-md);
    border: 1px solid var(--ai-border);
    line-height: 1.5;
}

/* ============================================
   Results Actions
   ============================================ */
.results-actions-premium {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 2px solid var(--ai-border);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ai-text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: var(--ai-primary);
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* ============================================
   Loading
   ============================================ */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.loading-content-premium {
    background: var(--ai-bg);
    padding: 3rem 4rem;
    border-radius: var(--ai-radius-xl);
    text-align: center;
    box-shadow: var(--ai-shadow-xl);
}

.loading-spinner-premium {
    width: 56px;
    height: 56px;
    border: 5px solid var(--ai-border);
    border-top-color: var(--ai-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loadingText {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ai-text);
    margin: 0;
}

/* ============================================
   Buttons - Mais Visíveis
   ============================================ */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--ai-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-premium-primary {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-primary-hover));
    color: white;
}

.btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 112, 20, 0.4);
}

.btn-premium-secondary {
    background: var(--ai-bg);
    color: var(--ai-text);
    border-color: var(--ai-border);
}

.btn-premium-secondary:hover {
    border-color: var(--ai-primary);
    color: var(--ai-primary);
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
}

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

.btn-icon-premium {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--ai-surface);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    color: var(--ai-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-premium:hover {
    background: var(--ai-primary-light);
    border-color: var(--ai-primary);
    color: var(--ai-primary);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .tab-nav-premium {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.85rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .tab-btn span:not(.tab-badge) {
        display: none;
    }
    
    .tab-content {
        padding: 1.25rem;
    }
    
    .stats-grid-ai {
        grid-template-columns: 1fr;
    }
    
    .product-preview-premium {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-preview-premium img {
        width: 100%;
        height: 200px;
    }
    
    .product-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .enrichment-grid {
        grid-template-columns: 1fr;
    }
    
    .enrichment-values {
        grid-template-columns: 1fr;
    }
    
    .value-arrow {
        transform: rotate(90deg);
        justify-content: center;
    }
    
    .results-actions-premium {
        flex-direction: column;
    }
    
    .header-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .select-premium {
        width: 100%;
    }
    
    .search-box-premium {
        flex-direction: column;
    }
    
    .current-values-grid {
        grid-template-columns: 1fr;
    }
    
    .missing-product-item {
        flex-wrap: wrap;
    }
    
    .missing-product-actions {
        width: 100%;
        margin-top: 1rem;
    }
    
    .batch-options {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ai-surface);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--ai-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ai-text-muted);
}

/* ============================================
   Missing Filters Section - FILTROS GRANDES
   ============================================ */
.missing-filters-section {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--ai-surface), var(--ai-bg));
    border-radius: var(--ai-radius-xl);
    border: 2px solid var(--ai-border);
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

@media (max-width: 900px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Filters Row Layout */
.filters-row {
    display: flex;
    gap: var(--mm-space-4, 1rem);
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters-row .filter-group {
    flex: 1;
    min-width: 140px;
}

.filters-row > .mm-btn {
    flex-shrink: 0;
    align-self: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--mm-space-2, 0.5rem);
    min-width: 0;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--mm-text-xs, 0.75rem);
    font-weight: 600;
    color: var(--mm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group label i {
    color: var(--mm-accent);
    font-size: 0.7rem;
}

.filter-actions {
    display: flex;
    flex-direction: column;
}

.filter-actions .btn-premium {
    width: 100%;
}

.results-count {
    padding: 0.5rem 1rem;
    background: var(--ai-primary-light);
    border-radius: var(--ai-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ai-primary);
}

/* ============================================
   Keywords Tags
   ============================================ */
.keywords-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keywords-tags .badge-premium {
    background: var(--ai-purple-light);
    color: var(--ai-purple);
    font-weight: 600;
}
/* Old batch CSS v1 removed — see "Batch Workflow Enhanced" section below */

/* ============================================
   Smart Suggest Modal - Análise com Similares
   ============================================ */
.modal-lg {
    max-width: 900px;
    width: 100%;
}

.smart-suggest-product {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-lg);
    margin-bottom: 1.5rem;
}

.smart-suggest-product img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--ai-radius-md);
    border: 2px solid var(--ai-border);
}

.smart-suggest-product-info {
    flex: 1;
}

.smart-suggest-product-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ai-text);
}

.smart-suggest-product-info .meta {
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
}

.smart-suggest-missing-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.missing-field-tag {
    padding: 0.35rem 0.75rem;
    background: var(--ai-danger-light);
    color: var(--ai-danger);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Similar Products Section */
.similar-products-section {
    margin-bottom: 1.5rem;
}

.similar-products-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ai-text-secondary);
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.similar-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--ai-surface);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    text-align: center;
}

.similar-product-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--ai-radius-sm);
    margin-bottom: 0.5rem;
}

.similar-product-card .title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ai-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-product-card .fields-complete {
    font-size: 0.7rem;
    color: var(--ai-success);
    margin-top: 0.25rem;
}

/* Smart Suggestions List */
.smart-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.smart-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--ai-bg);
    border: 2px solid var(--ai-border);
    border-radius: var(--ai-radius-lg);
    transition: all 0.2s ease;
}

.smart-suggestion-item:hover {
    border-color: var(--ai-primary);
}

.smart-suggestion-item.selected {
    border-color: var(--ai-success);
    background: var(--ai-success-light);
}

.smart-suggestion-checkbox {
    padding-top: 2px;
}

.smart-suggestion-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--ai-success);
    cursor: pointer;
}

.smart-suggestion-content {
    flex: 1;
}

.smart-suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.smart-field-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ai-primary);
    text-transform: uppercase;
}

.smart-confidence {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 700;
}

.smart-suggestion-value {
    font-size: 1rem;
    color: var(--ai-text);
    font-weight: 600;
    padding: 0.75rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    margin-bottom: 0.5rem;
}

.smart-suggestion-reason {
    font-size: 0.85rem;
    color: var(--ai-text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.smart-suggestion-reason i {
    color: var(--ai-info);
    margin-top: 2px;
}

.smart-suggestion-source {
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: var(--ai-info-light);
    border-radius: var(--ai-radius-sm);
    display: inline-block;
}

/* AI Suggest Button for Missing Products */
.btn-ai-suggest {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--ai-purple), var(--ai-purple-strong));
    color: white;
    border: none;
    border-radius: var(--ai-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ai-suggest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-ai-suggest i {
    font-size: 1rem;
}

/* Missing Product Item Enhanced */
.missing-product-item .missing-product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================
   Quick Edit Modal - Edição Completa de Campos
   ============================================ */
.quick-edit-product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-lg);
    margin-bottom: 1.5rem;
}

.quick-edit-product-header img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--ai-radius-md);
    border: 2px solid var(--ai-border);
}

.quick-edit-product-header .info {
    flex: 1;
}

.quick-edit-product-header .info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ai-text);
}

.quick-edit-product-header .info .meta {
    font-size: 0.85rem;
    color: var(--ai-text-secondary);
}

.quick-edit-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .quick-edit-fields-grid {
        grid-template-columns: 1fr;
    }
}

.quick-edit-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-edit-field-group.full-width {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .quick-edit-field-group.full-width {
        grid-column: span 1;
    }
}

.quick-edit-field-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ai-text);
}

.quick-edit-field-group label i {
    color: var(--ai-primary);
    width: 16px;
}

.quick-edit-field-group small {
    font-size: 0.75rem;
    color: var(--ai-text-muted);
}

.quick-edit-field-group .input-premium,
.quick-edit-field-group .select-premium {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.quick-edit-field-group textarea.input-premium {
    resize: vertical;
    min-height: 80px;
}

/* Field Tags */
.field-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: auto;
}

.field-tag.required {
    background: var(--ai-danger-light);
    color: var(--ai-danger);
}

.field-tag.seo {
    background: var(--ai-success-light);
    color: var(--ai-success);
}

.field-tag:not(.required):not(.seo) {
    background: var(--ai-info-light);
    color: var(--ai-info);
}

/* AI Suggestion Box in Quick Edit */
#quickEditModal .ai-suggestion-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--ai-purple-light);
    border: 2px solid var(--ai-purple);
    border-radius: var(--ai-radius-lg);
}

#quickEditModal .ai-suggestion-box .suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#quickEditModal .ai-suggestion-box .suggestion-header i {
    color: var(--ai-purple);
    font-size: 1.25rem;
}

#quickEditModal .ai-suggestion-box .suggestion-header span {
    flex: 1;
    font-weight: 600;
    color: var(--ai-purple);
}

/* ============================================
   SEO Health Banner - NEW v2.0
   ============================================ */
.seo-health-banner {
    border-radius: var(--mm-radius-lg, 12px);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--mm-text);
}

.seo-health-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.seo-health-score {
    flex-shrink: 0;
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-ring-bg {
    fill: none;
    stroke: color-mix(in srgb, var(--mm-text) 15%, transparent);
    stroke-width: 8;
}

.score-ring-fill {
    fill: none;
    stroke: var(--ai-success);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-out, stroke 0.3s;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--mm-text);
}

.score-label {
    display: block;
    font-size: 0.7rem;
    color: var(--mm-text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-health-metrics {
    display: flex;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.health-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--mm-surface-subtle, #f8fafc);
    border-radius: var(--mm-radius-md, 8px);
    min-width: 140px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.health-metric[data-status="good"] {
    border-left-color: var(--ai-success);
}

.health-metric[data-status="warning"] {
    border-left-color: var(--ai-warning);
}

.health-metric[data-status="critical"] {
    border-left-color: var(--ai-danger);
}

.health-metric i {
    font-size: 1.25rem;
    opacity: 0.7;
}

.health-metric .metric-info {
    display: flex;
    flex-direction: column;
}

.health-metric .metric-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.health-metric .metric-label {
    font-size: 0.7rem;
    color: var(--mm-text-secondary);
}

.seo-quick-actions {
    flex-shrink: 0;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--ai-danger);
    color: white;
    border: none;
    border-radius: var(--ai-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.quick-action-btn .action-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Version Badge */
.version-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* SEO Fields Overview */
.seo-fields-overview {
    padding: 0.5rem;
}

.seo-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seo-checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.seo-checklist-item:hover {
    background: var(--ai-surface-hover);
}

.seo-checklist-item.complete {
    border-left-color: var(--ai-success);
}

.seo-checklist-item.critical {
    border-left-color: var(--ai-danger);
}

.seo-checklist-item.warning {
    border-left-color: var(--ai-warning);
}

.seo-checklist-item .checklist-icon {
    width: 24px;
    text-align: center;
}

.seo-checklist-item.complete .checklist-icon i {
    color: var(--ai-success);
}

.seo-checklist-item.critical .checklist-icon i {
    color: var(--ai-danger);
}

.seo-checklist-item.warning .checklist-icon i {
    color: var(--ai-warning);
}

.seo-checklist-item .checklist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.seo-checklist-item .checklist-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ai-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-checklist-item .checklist-label i {
    color: var(--ai-text-muted);
    width: 16px;
}

.seo-checklist-item .checklist-count {
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
}

/* Priority Recommendations */
.priority-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    border-left: 3px solid transparent;
}

.recommendation-item.critical {
    background: var(--ai-danger-light);
    border-left-color: var(--ai-danger);
}

.recommendation-item.warning {
    background: var(--ai-warning-light);
    border-left-color: var(--ai-warning);
}

.recommendation-item.info {
    background: var(--ai-info-light);
    border-left-color: var(--ai-info);
}

.recommendation-item > i {
    font-size: 1.25rem;
    width: 32px;
    text-align: center;
}

.recommendation-item.critical > i {
    color: var(--ai-danger);
}

.recommendation-item.warning > i {
    color: var(--ai-warning);
}

.recommendation-item.info > i {
    color: var(--ai-info);
}

.recommendation-item .recommendation-content {
    flex: 1;
}

.recommendation-item .recommendation-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--ai-text);
}

.recommendation-item .recommendation-content p {
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
    margin: 0;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--ai-text-secondary);
}

.legend-item i {
    font-size: 0.5rem;
}

.legend-item.critical i {
    color: var(--ai-danger);
}

.legend-item.warning i {
    color: var(--ai-warning);
}

.legend-item.info i {
    color: var(--ai-info);
}

/* Enhanced Stats Card */
.stat-card.stat-interactive {
    cursor: pointer;
    transition: all 0.2s;
}

.stat-card.stat-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--ai-shadow-lg);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--ai-text-muted);
}

.stat-trend.positive {
    color: var(--ai-success);
}

.stat-trend.negative {
    color: var(--ai-danger);
}

/* Field Bar Enhanced */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
}

.field-bar {
    display: grid;
    grid-template-columns: 150px 1fr 50px;
    align-items: center;
    gap: 1rem;
}

.field-bar-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ai-text);
}

.field-bar-label i {
    color: var(--ai-text-muted);
    width: 16px;
    text-align: center;
}

.field-bar-track {
    height: 24px;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-sm);
    overflow: hidden;
}

.field-bar-fill {
    height: 100%;
    border-radius: var(--ai-radius-sm);
    transition: width 0.5s ease-out;
}

.field-bar-fill.critical {
    background: linear-gradient(90deg, var(--ai-danger), color-mix(in srgb, var(--ai-danger) 72%, white));
}

.field-bar-fill.warning {
    background: linear-gradient(90deg, var(--ai-warning), color-mix(in srgb, var(--ai-warning) 72%, white));
}

.field-bar-fill.info {
    background: linear-gradient(90deg, var(--ai-info), color-mix(in srgb, var(--ai-info) 70%, white));
}

.field-bar-value {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.field-bar-value.critical {
    color: var(--ai-danger);
}

.field-bar-value.warning {
    color: var(--ai-warning);
}

.field-bar-value.info {
    color: var(--ai-info);
}

/* ============================================
   SEO Audit Results
   ============================================ */
.audit-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.audit-summary span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
}

.audit-summary span.critical {
    color: var(--ai-danger);
}

.audit-summary span.warning {
    color: var(--ai-warning);
}

.audit-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.audit-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.audit-product-item:hover {
    background: var(--ai-surface-hover);
}

.audit-product-item.good {
    border-left-color: var(--ai-success);
}

.audit-product-item.warning {
    border-left-color: var(--ai-warning);
}

.audit-product-item.critical {
    border-left-color: var(--ai-danger);
}

.audit-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--ai-radius-sm);
}

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

.audit-product-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--ai-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-sku {
    font-size: 0.8rem;
    color: var(--ai-text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.audit-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.issue-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--ai-danger-light);
    color: var(--ai-danger);
    border-radius: 4px;
    font-weight: 500;
}

.issue-tag.more {
    background: var(--ai-surface-hover);
    color: var(--ai-text-muted);
}

.mini-score-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.mini-score-ring.good {
    background: var(--ai-success-light);
    color: var(--ai-success);
    border: 2px solid var(--ai-success);
}

.mini-score-ring.warning {
    background: var(--ai-warning-light);
    color: var(--ai-warning);
    border: 2px solid var(--ai-warning);
}

.mini-score-ring.critical {
    background: var(--ai-danger-light);
    color: var(--ai-danger);
    border: 2px solid var(--ai-danger);
}

.audit-product-actions {
    flex-shrink: 0;
}

/* ============================================
   Product Preview Enhanced
   ============================================ */
.product-preview-enhanced {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ai-border);
    margin-bottom: 1.5rem;
}

.product-image-container {
    position: relative;
    flex-shrink: 0;
}

.product-image-container img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--ai-radius-md);
    border: 2px solid var(--ai-border);
}

.image-seo-status {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--ai-danger);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.image-seo-status.has-alt {
    background: var(--ai-success);
}

.product-details-enhanced {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-details-enhanced h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--ai-text);
}

.product-details-enhanced p {
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
    margin: 0;
}

/* Product SEO Score Card */
.product-seo-score {
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    padding: 1rem;
    margin-top: auto;
}

.seo-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.seo-score-header span:first-child {
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
    font-weight: 500;
}

.seo-score-value {
    font-size: 1.25rem;
    font-weight: 800;
}

.seo-score-value.good {
    color: var(--ai-success);
}

.seo-score-value.warning {
    color: var(--ai-warning);
}

.seo-score-value.critical {
    color: var(--ai-danger);
}

.seo-score-bar {
    height: 8px;
    background: var(--ai-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.seo-score-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.seo-score-fill.good {
    background: linear-gradient(90deg, var(--ai-success), color-mix(in srgb, var(--ai-success) 72%, white));
}

.seo-score-fill.warning {
    background: linear-gradient(90deg, var(--ai-warning), color-mix(in srgb, var(--ai-warning) 72%, white));
}

.seo-score-fill.critical {
    background: linear-gradient(90deg, var(--ai-danger), color-mix(in srgb, var(--ai-danger) 72%, white));
}

.seo-score-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.breakdown-item.passed {
    background: var(--ai-success-light);
    color: var(--ai-success);
}

.breakdown-item.failed {
    background: var(--ai-danger-light);
    color: var(--ai-danger);
}

/* ============================================
   SEO Fields Grid
   ============================================ */
.seo-fields-grid {
    margin-bottom: 1.5rem;
}

.seo-fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.seo-fields-header h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ai-text);
}

.seo-fields-header h4 i {
    color: var(--ai-primary);
}

.fields-complete {
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
    padding: 0.25rem 0.75rem;
    background: var(--ai-surface);
    border-radius: 20px;
}

.seo-fields-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .seo-fields-list {
        grid-template-columns: 1fr;
    }
}

.seo-field-item {
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.seo-field-item:hover {
    background: var(--ai-surface-hover);
}

.seo-field-item.complete {
    border-left-color: var(--ai-success);
}

.seo-field-item.warning {
    border-left-color: var(--ai-warning);
}

.seo-field-item.missing {
    border-left-color: var(--ai-danger);
}

.seo-field-item .field-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.seo-field-item .field-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--ai-primary-light);
}

.seo-field-item .field-icon i {
    font-size: 0.85rem;
    color: var(--ai-primary);
}

.seo-field-item .field-label {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ai-text);
}

.seo-field-item .field-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
}

.seo-field-item.complete .field-status {
    color: var(--ai-success);
}

.seo-field-item.warning .field-status {
    color: var(--ai-warning);
}

.seo-field-item.missing .field-status {
    color: var(--ai-danger);
}

.seo-field-item .field-value {
    font-size: 0.85rem;
    color: var(--ai-text-secondary);
    line-height: 1.4;
}

.seo-field-item .field-value em {
    color: var(--ai-text-muted);
    font-style: italic;
}

.seo-field-item .critical-tag {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
    background: var(--ai-danger-light);
    color: var(--ai-danger);
    border-radius: 4px;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ============================================
   SERP Preview
   ============================================ */
.serp-preview-content {
    padding: 1.5rem;
}

.serp-preview-desktop {
    background: white;
    border: 1px solid var(--ai-serp-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: arial, sans-serif;
}

.serp-item cite {
    display: block;
    font-size: 14px;
    color: var(--ai-text);
    margin-bottom: 4px;
    font-style: normal;
}

.serp-item h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--ai-serp-title);
    margin: 0 0 4px 0;
    line-height: 1.3;
    cursor: pointer;
}

.serp-item h3:hover {
    text-decoration: underline;
}

.serp-item p {
    font-size: 14px;
    color: var(--ai-serp-text);
    line-height: 1.58;
    margin: 0;
}

.serp-analysis {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.serp-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    flex: 1;
    min-width: 150px;
}

.serp-metric.good {
    border: 1px solid var(--ai-success);
    background: var(--ai-success-light);
}

.serp-metric.warning {
    border: 1px solid var(--ai-warning);
    background: var(--ai-warning-light);
}

.serp-metric.critical {
    border: 1px solid var(--ai-danger);
    background: var(--ai-danger-light);
}

.serp-metric .metric-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.serp-metric .metric-label {
    flex: 1;
    font-size: 0.8rem;
    color: var(--ai-text-secondary);
}

.serp-metric .metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ai-text);
}

/* ============================================
   Enrichment Grid Enhanced
   ============================================ */
.enrichment-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--ai-border);
    margin-bottom: 1rem;
}

.enrichment-tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--ai-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enrichment-tab:hover {
    color: var(--ai-text);
}

.enrichment-tab.active {
    color: var(--ai-primary);
    border-bottom-color: var(--ai-primary);
}

.enrichment-grid-enhanced {
    padding: 1rem;
}

.enrichment-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.enrichment-category {
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    overflow: hidden;
}

.enrichment-category .category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--ai-surface);
    border-bottom: 1px solid var(--ai-border);
}

.enrichment-category .category-header i {
    color: var(--ai-primary);
}

.enrichment-category .category-header span:first-of-type {
    flex: 1;
    font-weight: 600;
    color: var(--ai-text);
}

.enrichment-category .category-count {
    font-size: 0.75rem;
    color: var(--ai-text-muted);
    padding: 0.25rem 0.5rem;
    background: var(--ai-surface-hover);
    border-radius: 10px;
}

.enrichment-category .category-fields {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.enrichment-item {
    padding: 1rem;
    background: var(--ai-surface);
    border-radius: var(--ai-radius-md);
    border: 1px solid var(--ai-border);
    overflow: hidden;
}

.enrichment-item.critical {
    border-color: var(--ai-danger);
    background: var(--ai-danger-light);
}

.enrichment-item.no-suggestion {
    opacity: 0.6;
}

/* ── Enrichment Item Header ── DS-aligned ── */
.enrichment-item-header {
    display: flex;
    align-items: center;
    gap: var(--mm-space-3, 0.75rem);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mm-border-subtle, #e5e7eb);
    min-width: 0;
}

.enrichment-item-header .field-checkbox {
    display: flex;
    align-items: center;
    gap: var(--mm-space-2, 0.5rem);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--mm-text);
    flex: 1;
    min-width: 0;
    padding: 0.25rem 0;
    border: none;
    cursor: pointer;
}

/* Text content inside header checkbox truncates gracefully */
.enrichment-item-header .field-checkbox > *:not(.checkmark):not(.critical-indicator):not(input) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enrichment-item-header .critical-indicator {
    color: var(--mm-error, #EF4444);
    flex-shrink: 0;
    font-size: 0.8rem;
    margin-left: 0.125rem;
}

.enrichment-item-header .length-indicator {
    font-size: 0.72rem;
    color: var(--mm-text-secondary);
    padding: 0.2rem 0.5rem;
    background: var(--mm-surface-subtle, #f5f5f5);
    border: 1px solid var(--mm-border-subtle, #e5e7eb);
    border-radius: var(--mm-radius-xs, 4px);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.enrichment-values {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.enrichment-values.vertical {
    flex-direction: column;
    align-items: stretch;
}

.value-box {
    flex: 1;
    padding: 0.75rem;
    border-radius: var(--mm-radius-sm, 6px);
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    min-width: 0;
    overflow: hidden;
}

.value-box small {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.68rem;
    color: var(--mm-text-muted);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value-box span {
    font-size: 0.875rem;
    color: var(--mm-text);
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.value-box.current {
    background: var(--mm-surface-subtle, #f8f9fa);
}

.value-box.suggested {
    background: var(--ai-success-light);
    border-color: var(--ai-success);
}

.value-box.suggested.empty {
    background: var(--ai-surface);
    border-color: var(--ai-border);
}

.value-box span em {
    color: var(--ai-text-muted);
    font-style: italic;
}

.value-arrow {
    color: var(--ai-text-muted);
    flex-shrink: 0;
}

.enrichment-values.vertical .value-arrow {
    transform: rotate(90deg);
    align-self: center;
}

.apply-single-btn {
    margin-top: 0.5rem;
}

/* ============================================
   Missing Products Grid
   ============================================ */
.missing-products-list-enhanced {
    padding: 0.5rem;
}

.missing-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.missing-product-card {
    background: white;
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-md);
    overflow: hidden;
    transition: all 0.2s;
    border-top: 3px solid transparent;
}

.missing-product-card:hover {
    box-shadow: var(--ai-shadow-md);
    transform: translateY(-2px);
}

.missing-product-card.good {
    border-top-color: var(--ai-success);
}

.missing-product-card.warning {
    border-top-color: var(--ai-warning);
}

.missing-product-card.critical {
    border-top-color: var(--ai-danger);
}

.missing-product-card .product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--ai-surface);
}

.missing-product-card .product-card-header img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--ai-radius-sm);
}

.missing-product-card .product-card-score {
    text-align: center;
}

.missing-product-card .score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}

.missing-product-card.critical .score-value {
    color: var(--ai-danger);
}

.missing-product-card.warning .score-value {
    color: var(--ai-warning);
}

.missing-product-card.good .score-value {
    color: var(--ai-success);
}

.missing-product-card .score-label {
    font-size: 0.65rem;
    color: var(--ai-text-muted);
    text-transform: uppercase;
}

.missing-product-card .product-card-body {
    padding: 1rem;
}

.missing-product-card .product-card-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--ai-text);
}

.missing-product-card .product-sku {
    display: block;
    font-size: 0.8rem;
    color: var(--ai-text-muted);
    margin-bottom: 0.75rem;
}

.missing-fields-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.missing-field-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.missing-field-tag.critical {
    background: var(--ai-danger-light);
    color: var(--ai-danger);
}

.missing-field-tag.more {
    background: var(--ai-surface);
    color: var(--ai-text-muted);
}

.missing-product-card .product-card-actions {
    padding: 0 1rem 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Batch Workflow Enhanced — Definitive v3
   ============================================ */
.batch-workflow-enhanced {
    padding: 1.5rem;
}

/* Step visibility — non-active steps are hidden */
.batch-step {
    display: none;
    animation: fadeIn 0.3s ease;
}
.batch-step.active {
    display: block;
}

/* Step header */
.batch-step .step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ai-border);
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.step-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ai-surface);
    border: 2px solid var(--ai-border);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
    flex-shrink: 0;
}

.step-number.completed {
    background: var(--ai-success);
    border-color: var(--ai-success);
    color: white;
}

.step-line {
    width: 30px;
    height: 2px;
    background: var(--ai-border);
    flex-shrink: 0;
}

.step-line.completed {
    background: var(--ai-success);
}

.step-title {
    flex: 1;
}

.step-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--ai-text);
}

.step-title p {
    font-size: 0.85rem;
    color: var(--ai-text-secondary);
    margin: 0.25rem 0 0 0;
}

.batch-config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .batch-config-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Config Section — Batch Field Checkboxes
   ============================================ */
.config-section {
    padding: var(--mm-space-5, 1.25rem);
    background: var(--mm-surface);
    border-radius: var(--mm-radius-md, 12px);
    border: 1px solid var(--mm-border);
}

.config-section h4 {
    display: flex;
    align-items: center;
    gap: var(--mm-space-2, 0.5rem);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 var(--mm-space-4, 1rem) 0;
    color: var(--mm-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.config-section h4 i {
    color: var(--mm-accent, #EC7014);
    font-size: 0.85rem;
}

/* ── Checkbox Grid ── */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 4px;
}

/* ── Individual Checkbox Label ── flexbox keeps all children on one line */
label.field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--mm-text);
    padding: 0.5rem 0.75rem;
    border-radius: var(--mm-radius-sm, 8px);
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1.45;
    white-space: nowrap;
    position: relative;
}

label.field-checkbox:hover {
    background: color-mix(in srgb, var(--mm-accent, #EC7014) 5%, transparent);
    border-color: color-mix(in srgb, var(--mm-accent, #EC7014) 20%, transparent);
}

/* Input inside label: fully hidden, out of flex flow */
label.field-checkbox input,
input.field-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ── Custom Checkmark ── */
label.field-checkbox .checkmark,
.field-checkbox .checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-xs, 4px);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: var(--mm-surface);
}

label.field-checkbox:hover .checkmark {
    border-color: var(--mm-accent, #EC7014);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-accent, #EC7014) 8%, transparent);
}

label.field-checkbox input:checked + .checkmark {
    background: var(--mm-accent, #EC7014);
    border-color: var(--mm-accent, #EC7014);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-accent, #EC7014) 12%, transparent);
}

label.field-checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* Text elements inline after checkmark */
label.field-checkbox strong,
.field-checkbox strong {
    font-weight: 600;
    color: var(--mm-text);
    white-space: nowrap;
    flex-shrink: 0;
}

label.field-checkbox small,
.field-checkbox small {
    color: var(--mm-text-muted);
    font-size: 0.72rem;
    opacity: 0.75;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Checked label row highlight */
label.field-checkbox:has(input:checked) {
    background: color-mix(in srgb, var(--mm-accent, #EC7014) 6%, transparent);
    border-color: color-mix(in srgb, var(--mm-accent, #EC7014) 15%, transparent);
}

.selection-count {
    font-size: 0.85rem;
    color: var(--ai-text-muted);
    margin-left: auto;
}

/* ============================================================================
   BATCH REVIEW v4 — Complete self-contained rewrite
   No dependency on .mm-input or label.field-checkbox globals.
   ============================================================================ */

.batch-products-review-enhanced {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2px; /* prevent box-shadow clipping */
}

/* ── Card container ── */
.batch-product-card {
    border: 1px solid var(--mm-border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    background: var(--mm-surface, #fff);
    transition: box-shadow 0.2s;
}
.batch-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* ── Card header (click to toggle) ── */
.batch-product-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    background: var(--mm-surface-subtle, #f8fafc);
    border-bottom: 1px solid var(--mm-border, #e2e8f0);
    user-select: none;
}

.batch-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.batch-product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.batch-product-info .product-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--mm-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.batch-product-info .product-meta {
    font-size: 0.75rem;
    color: var(--mm-text-muted, #94a3b8);
}

/* Chevron icon */
.batch-toggle-icon {
    margin-left: auto;
    color: var(--mm-text-muted, #94a3b8);
    transition: transform 0.25s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ── Collapsed state ── */
.batch-product-card.collapsed .batch-product-fields {
    display: none !important;
}
.batch-product-card.collapsed .batch-toggle-icon {
    transform: rotate(-90deg);
}

/* ── Fields wrapper ── */
.batch-product-fields {
    display: block;
    padding: 0.75rem;
}

/* ── Individual field row ── */
.batch-field-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    transition: background 0.15s;
    background: var(--mm-surface, #fff);
    margin-bottom: 4px;
}
.batch-field-row:last-child {
    margin-bottom: 0;
}
.batch-field-row:hover {
    background: var(--mm-surface-subtle, #f8fafc);
}
.batch-field-row.has-change {
    border-left: 3px solid var(--mm-success, #22c55e);
}

/* Row header: native checkbox + label text */
.batch-row-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Native checkbox — simple, no custom checkmark trickery */
.batch-row-head input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--mm-accent, #EC7014);
    flex-shrink: 0;
}

.batch-row-head .batch-field-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mm-text-secondary, #64748b);
}

/* Values (current + AI suggestion) stacked */
.batch-field-values {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.batch-current-val {
    font-size: 0.75rem;
    color: var(--mm-text-muted, #94a3b8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 2px;
}
.batch-current-val small {
    color: var(--mm-text-muted, #94a3b8);
    margin-right: 4px;
}

.batch-suggested-val {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.batch-suggested-val small {
    color: var(--mm-accent, #EC7014);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* Self-contained input — does NOT use .mm-input */
.batch-edit-input {
    display: block;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--mm-border, #e2e8f0);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 400;
    background: var(--mm-surface, #fff);
    color: var(--mm-text, #1e293b);
    min-height: 32px;
    line-height: 1.4;
}
.batch-edit-input:focus {
    outline: none;
    border-color: var(--mm-accent, #EC7014);
    box-shadow: 0 0 0 2px rgba(236, 112, 20, 0.15);
}

/* Batch Stats */
.batch-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.batch-stat {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--mm-surface-subtle, #f1f5f9);
    font-size: 0.82rem;
    color: var(--mm-text, #1e293b);
}

.batch-stat strong {
    color: var(--mm-accent, #EC7014);
}

.batch-stat.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--ai-success, #10b981);
}

/* Batch Actions */
.batch-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ai-border, #e2e8f0);
}

.selection-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Result Breakdown */
.result-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.result-card.result-success {
    background: rgba(16, 185, 129, 0.08);
}

.result-card.result-success i {
    font-size: 2.5rem;
    color: var(--ai-success, #10b981);
}

.result-card.result-partial {
    background: rgba(245, 158, 11, 0.08);
}

.result-card.result-partial i {
    font-size: 2.5rem;
    color: #f59e0b;
}

.result-card h4 {
    margin: 0.75rem 0 0.25rem;
    font-size: 1.1rem;
}

.result-errors {
    text-align: left;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.06);
}

.error-item {
    font-size: 0.82rem;
    padding: 4px 0;
    color: #ef4444;
}

.result-breakdown {
    padding: 1rem;
    border-radius: 12px;
    background: var(--ai-bg-secondary, #f8fafc);
}

.result-breakdown h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--ai-text-secondary, #64748b);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--ai-border, #e2e8f0);
}

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

.breakdown-count {
    font-weight: 600;
    color: var(--ai-primary, #EC7014);
}

/* Results Summary - Step 3 */
.batch-results-summary {
    padding: 2rem;
    text-align: center;
}

/* Loading Subtext */
.loading-subtext {
    font-size: 0.85rem;
    color: var(--ai-text-muted);
    margin-top: 0.5rem;
}

/* Empty State Success */
.empty-state.success {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state.success i {
    font-size: 3rem;
    color: var(--ai-success);
    margin-bottom: 1rem;
}

.empty-state.success h4 {
    font-size: 1.1rem;
    color: var(--ai-text);
    margin: 0 0 0.5rem 0;
}

.empty-state.success p {
    font-size: 0.9rem;
    color: var(--ai-text-secondary);
    margin: 0;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .seo-health-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .seo-health-metrics {
        justify-content: center;
    }
    
    .health-metric {
        min-width: auto;
        flex: 1 1 45%;
    }
    
    .product-preview-enhanced {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-details-enhanced {
        align-items: center;
    }
    
    .enrichment-values {
        flex-direction: column;
    }
    
    .value-arrow {
        transform: rotate(90deg);
    }
}

/* ============================================================
   Editable Enrichment Fields
   ============================================================ */

.value-box.suggested.editable {
    padding: 0.5rem;
    background: var(--mm-surface-subtle, #f8f9fa);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm, 6px);
}

.value-box.suggested.editable small {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.68rem;
    color: var(--mm-accent, #EC7014);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enrichment-edit-input {
    width: 100% !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 0.625rem !important;
    background: var(--mm-surface) !important;
    border: 1px solid var(--mm-border) !important;
    border-radius: var(--mm-radius-sm, 6px) !important;
    color: var(--mm-text) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    box-sizing: border-box;
}

.enrichment-edit-input:focus {
    border-color: var(--mm-accent, #EC7014) !important;
    box-shadow: 0 0 0 2px rgba(236, 112, 20, 0.12) !important;
    outline: none;
}

textarea.enrichment-edit-input {
    min-height: 60px;
    line-height: 1.5;
}

.value-box.current.compact {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
    background: var(--mm-surface-subtle, #f5f5f5);
    border-radius: var(--mm-radius-sm, 6px);
    margin-bottom: 0.375rem;
    border-left: 3px solid var(--mm-border);
}

.value-box.current.compact small {
    font-size: 0.65rem;
    margin-bottom: 0.125rem;
    display: block;
    color: var(--mm-text-muted);
}

.value-box.current.compact span {
    color: var(--mm-text-secondary);
    font-size: 0.8rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.enrichment-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.375rem;
}

.btn-xs {
    padding: 3px 10px !important;
    font-size: 0.72rem !important;
}

.enrichment-item.applied {
    border-color: var(--ai-success) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.enrichment-item.applied::after {
    content: "Aplicado";
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--ai-success);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.enrichment-item {
    position: relative;
}

/* Legacy .length-indicator — superseded by DS version (line ~3618) */

/* Better responsive for enrichment grid */
@media (max-width: 1024px) {
    .enrichment-categories {
        gap: 12px;
    }
    
    .category-fields {
        gap: 10px;
    }

    .seo-health-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .seo-health-metrics {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ai-enrichment-page .page-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .ai-enrichment-page .page-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .tabs-shell {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }

    .tab-btn span:not(.tab-badge) {
        display: none;
    }

    .ai-enrichment-page .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .seo-health-score .score-ring {
        width: 90px;
        height: 90px;
    }

    .seo-health-metrics {
        gap: 0.5rem;
    }

    .health-metric {
        min-width: 120px;
        padding: 0.5rem 0.75rem;
    }

    .enrichment-grid,
    .enrichment-grid-enhanced {
        grid-template-columns: 1fr;
    }

    .enrichment-values {
        grid-template-columns: 1fr;
    }

    .value-arrow {
        transform: rotate(90deg);
        justify-content: center;
    }

    .product-preview-enhanced {
        flex-direction: column;
    }

    .product-image-container img {
        width: 100%;
        max-width: 200px;
    }

    .seo-fields-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .mm-btn {
        width: 100%;
        justify-content: center;
    }

    .batch-config-grid {
        grid-template-columns: 1fr;
    }

    .audit-filters {
        flex-direction: column;
    }

    .audit-filters .filter-group {
        width: 100%;
    }

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

    .filters-row .filter-group {
        width: 100%;
    }

    .filters-row .mm-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ai-enrichment-page .stats-grid {
        grid-template-columns: 1fr;
    }

    .ai-enrichment-page .page-title {
        font-size: 1.25rem;
    }

    .tab-btn {
        padding: 0.5rem 0.75rem;
    }

    .seo-health-metrics {
        flex-direction: column;
    }

    .health-metric {
        width: 100%;
    }

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

    .batch-actions .selection-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .enrichment-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .enrichment-footer .footer-actions {
        flex-direction: column;
    }

    .enrichment-footer .footer-actions .mm-btn {
        width: 100%;
        justify-content: center;
    }

    .missing-product-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .missing-product-actions {
        width: 100%;
    }
}

/* ============================================
   UX Polish v2.1
   ============================================ */

/* Search card improvements */
.search-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-hint {
    font-size: 0.75rem;
    color: var(--ai-text-secondary, #64748b);
    opacity: 0.7;
}

/* Results count badge */
.results-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ai-primary, #EC7014);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    margin-left: 8px;
}

/* Empty state compact */
.empty-state-compact {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--ai-text-secondary, #64748b);
}

.empty-state-compact i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.empty-state-compact p {
    margin: 0;
    font-size: 0.9rem;
}

.empty-state-compact small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Product item improvements */
.ai-enrichment-page .product-list .product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: var(--ai-surface, #f8fafc);
}

.ai-enrichment-page .product-list .product-item:hover {
    border-color: var(--ai-primary, #EC7014);
    background: rgba(236, 112, 20, 0.04);
    transform: translateX(4px);
}

.ai-enrichment-page .product-list .product-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ai-enrichment-page .product-list .product-item-info {
    flex: 1;
    min-width: 0;
}

.ai-enrichment-page .product-list .product-item-info h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ai-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-enrichment-page .product-list .product-item-info span {
    font-size: 0.8rem;
    color: var(--ai-text-secondary, #64748b);
}

.ai-enrichment-page .product-list .product-item-score {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-item-score.score-high { background: rgba(16, 185, 129, 0.12); color: var(--ai-success-strong); }
.product-item-score.score-medium { background: rgba(245, 158, 11, 0.12); color: var(--ai-warning-strong); }
.product-item-score.score-low { background: rgba(239, 68, 68, 0.12); color: var(--ai-danger-strong); }

/* Ghost button style */
.btn-premium-ghost {
    background: transparent;
    color: var(--ai-text-secondary, #64748b);
    border: none;
    padding: 0.75rem 1rem;
}

.btn-premium-ghost:hover {
    color: var(--ai-text, #1e293b);
    background: var(--ai-surface, #f1f5f9);
}

/* Success button */
.btn-premium-success {
    background: linear-gradient(135deg, var(--ai-success), var(--ai-success-strong));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-premium-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.btn-premium-success:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Enrichment footer */
.enrichment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--ai-border, #e2e8f0);
    margin-top: 1rem;
    gap: 1rem;
}

.enrichment-footer .footer-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.fields-count-label {
    font-size: 0.85rem;
    color: var(--ai-text-secondary, #64748b);
    font-weight: 500;
}

/* Main enrich button animation */
.btn-enrich-main {
    position: relative;
    overflow: hidden;
}

.btn-enrich-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btn-shine 3s infinite;
}

@keyframes btn-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Apply all button */
.btn-apply-all {
    min-width: 180px;
    justify-content: center;
}

/* Action buttons layout */
.action-buttons {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
}

.action-buttons .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Card premium spacing */
.ai-enrichment-page .card-premium {
    margin-bottom: 1rem;
}

.ai-enrichment-page .card-header {
    padding: 1rem 1.5rem;
}

.ai-enrichment-page .card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Enrichment item spacing */
.enrichment-item {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--ai-border, #e2e8f0);
    transition: all 0.2s ease;
}

.enrichment-item:hover {
    border-color: var(--ai-primary, #EC7014);
}

/* Duplicate enrichment-item-header — superseded by DS version (line ~3588) */

/* Enrichment edit input — DS override */
.enrichment-edit-input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm, 6px);
    font-size: 0.85rem;
    background: var(--mm-surface);
    color: var(--mm-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.enrichment-edit-input:focus {
    outline: none;
    border-color: var(--mm-accent, #EC7014);
    box-shadow: 0 0 0 3px rgba(236, 112, 20, 0.1);
}

/* Search section padding */
.search-section {
    padding: 0 1.5rem 1.5rem;
}

/* Button disabled state */
.btn-premium:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

```