* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.upload-section {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.upload-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.file-input-button:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
}

.file-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.file-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats-section {
    padding: 30px;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.error-section {
    margin-top: 20px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    display: none;
}

.error-section.show {
    display: block;
}

.error-section h4 {
    color: #856404;
    margin-bottom: 15px;
}

.error-list {
    list-style: none;
}

.error-list li {
    color: #856404;
    padding: 8px 0;
    border-bottom: 1px solid #f5deb3;
}

.table-section {
    padding: 30px;
    background: white;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
    position: relative;
}

th:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

th::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ecf0f1;
    opacity: 0.6;
}

th.sort-asc::after {
    border-top: none;
    border-bottom: 4px solid white;
    opacity: 1;
}

th.sort-desc::after {
    border-bottom: none;
    border-top: 4px solid white;
    opacity: 1;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

tr:nth-child(even) {
    background: #f8f9fa;
}

tr:hover {
    background: #e3f2fd;
}

.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.currency {
    font-weight: 600;
    color: #27ae60;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading.show {
    display: block;
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .stat-card .value {
        font-size: 2rem;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}