* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
    padding: 40px 20px;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
}
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}
h2 {
    color: #333;
    margin: 25px 0 15px;
    font-size: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}
.subtitle {
    color: #666;
    margin-bottom: 30px;
}
.sync-section {
    text-align: center;
    padding: 40px;
}
.sync-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 60px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}
.sync-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}
.sync-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.last-sync {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}
.last-sync h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}
.last-sync .time {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}
.last-sync .status {
    margin-top: 10px;
    font-size: 14px;
}
.status.success { color: #10b981; }
.status.error { color: #ef4444; }
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
.stat-box h4 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 5px;
}
.stat-box p {
    color: #666;
    font-size: 14px;
}
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}
td {
    color: #666;
    vertical-align: top;
}
tr:hover {
    background: #f8f9fa;
}
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 13px;
}
.filter-group input, .filter-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}
.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: #667eea;
}
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn:hover {
    opacity: 0.9;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #667eea;
}
.pagination a:hover {
    background: #667eea;
    color: white;
}
.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.message.success {
    background: #f0fdf4;
    border: 1px solid #10b981;
    color: #047857;
}
.message.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #dc2626;
}
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.sku-col {
    font-weight: 600;
    color: #667eea;
    min-width: 120px;
}
.name-col {
    min-width: 250px;
}
.desc-col {
    min-width: 300px;
    max-width: 400px;
    font-size: 12px;
    color: #999;
}
.store-col {
    min-width: 150px;
}

/* Redraft Panel Styles */
.redraft-panel {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.redraft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.redraft-header h2 {
    margin: 0;
    font-size: 20px;
    border-bottom: none;
    padding-bottom: 0;
}
.model-selector {
    margin: 15px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.model-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}
.model-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}
.model-selector select:hover {
    border-color: #667eea;
}
.model-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.05);
}
.redraft-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.btn-redraft {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    touch-action: manipulation;
}
.btn-redraft:hover {
    transform: scale(1.05);
    opacity: 0.9;
}
.btn-redraft:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    min-height: 44px;
}
.select-all-label input {
    cursor: pointer;
}
#selectedCount {
    opacity: 0.7;
    font-size: 14px;
}
.progress-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}
.progress-panel.show {
    display: block;
}
.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}
.progress-stat {
    background: #FFFFFF;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.progress-stat .value {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}
.progress-stat .label {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}
.progress-current {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
}
.progress-bar-container {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}
.redraft-title {
    color: #667eea;
    cursor: pointer;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.redraft-title.pass {
    color: #10b981;
}
.redraft-title.fail {
    color: #ef4444;
}
.redraft-title.pending {
    color: #999;
}
.score-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-top: 4px;
}
.score-badge.good {
    background: rgba(72,187,120,0.2);
    color: #48bb78;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-top: 4px;
}
.score-badge.bad {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}
.checkbox-col {
    width: 50px;
    text-align: center;
}
.checkbox-col input {
    cursor: pointer;
}
