body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

input[type="file"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#exportBtn {
    background-color: #27ae60;
}

#exportBtn:hover {
    background-color: #219653;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    margin: 30px 0;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.section h3 {
    margin-top: 0;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
}

.detail-row.total-row {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

.label {
    font-weight: bold;
    min-width: 150px;
    color: #555;
}

.value {
    flex: 1;
}

#productsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#productsTable th, #productsTable td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#productsTable th {
    background-color: #3498db;
    color: white;
}

#productsTable tr:nth-child(even) {
    background-color: #f2f2f2;
}

@media (max-width: 768px) {
    .invoice-details {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .label {
        margin-bottom: 5px;
    }
}