* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

.scanner-section, .cart-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scanner-section h2, .cart-section h2 {
    color: #2E7D32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #388E3C;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #607D8B;
    color: white;
}

.btn-secondary:hover {
    background-color: #455A64;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.product-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    border-left: 4px solid #4CAF50;
}

.product-info h4 {
    color: #2E7D32;
    margin-bottom: 10px;
}

.product-info p {
    margin: 5px 0;
    font-size: 14px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
}

.cart-item-price {
    font-weight: 600;
    color: #4CAF50;
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

.remove-btn:hover {
    text-decoration: underline;
}

.cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.summary-row:last-child {
    border-bottom: none;
    font-size: 1.2em;
    font-weight: 600;
    color: #2E7D32;
}

.checkout-form {
    margin-top: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2em;
    }
}

/* Upload Page Styles */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-box {
    border: 3px dashed #4CAF50;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: #f8fff8;
    margin: 20px 0;
    transition: all 0.3s;
}

.upload-box.dragover {
    border-color: #2E7D32;
    background: #e8f5e8;
}

.upload-box i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.file-label:hover {
    background: #388E3C;
}

.file-name {
    margin-top: 15px;
    font-weight: 600;
    color: #555;
}

/* Table styles for preview */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.preview-table th,
.preview-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.preview-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.preview-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
}

/* Stats cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #4CAF50;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Error list */
.error-list {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
}

.error-item {
    padding: 5px 0;
    border-bottom: 1px solid #f5c6cb;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.tab.active {
    color: #4CAF50;
    border-bottom: 3px solid #4CAF50;
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

/* Instructions box */
.instructions {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.instructions h3 {
    color: #2E7D32;
    margin-bottom: 10px;
}

.instructions ul {
    margin: 10px 0;
    padding-left: 20px;
}

.instructions li {
    margin: 5px 0;
}
