:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    transform: scale(1.01);
}

.upload-area i {
    transition: transform 0.3s ease;
}

.upload-area:hover i {
    transform: scale(1.1);
}

.card {
    border: none;
    border-radius: 16px;
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
}

.nav-tabs {
    border: none;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.manual-entry-row {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.manual-entry-row:hover {
    background: #f1f5f9;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.table {
    margin-bottom: 0;
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    vertical-align: middle;
}

.barcode-preview {
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.barcode-preview svg {
    max-width: 100%;
    height: auto;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

#loadingOverlay .spinner-border {
    width: 4rem;
    height: 4rem;
}

.badge {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
}

.display-4 {
    font-weight: 700;
    color: #1e293b;
}

.text-muted {
    color: #64748b !important;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

.manual-entry-row {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-area {
        padding: 40px 20px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .manual-entry-row .col-md-2 {
        margin-top: 10px;
    }
}

/* Preview Section */
#previewSection {
    animation: fadeIn 0.5s ease;
}

.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* File info display */
.file-info {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #ecfdf5;
    border-radius: 12px;
    margin-top: 20px;
}

.file-info i {
    font-size: 2rem;
    color: var(--success-color);
    margin-right: 15px;
}

.file-info .file-details {
    flex: 1;
}

.file-info .file-name {
    font-weight: 600;
    color: #1e293b;
}

.file-info .file-size {
    font-size: 0.875rem;
    color: #64748b;
}
