/* Invoice CSS - Professional Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    min-height: 100vh;
}

.invoice-a4 {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 50px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Header Styles */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #667eea;
}

.company {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    border: 2px solid #667eea;
    padding: 5px;
}

.company h1 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
}

.company p {
    font-size: 13px;
    color: #7f8c8d;
    margin: 3px 0;
}

.invoice-meta {
    text-align: right;
}

.invoice-meta h2 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.invoice-meta p {
    font-size: 14px;
    color: #34495e;
    margin: 5px 0;
    font-weight: 500;
}

/* Table Styles */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.invoice-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-table th:first-child {
    border-top-left-radius: 8px;
}

.invoice-table th:last-child {
    border-top-right-radius: 8px;
    text-align: right;
}

.invoice-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.3s ease;
}

.invoice-table tbody tr:hover {
    background-color: #f8f9fa;
}

.invoice-table tbody tr:last-child {
    border-bottom: 2px solid #667eea;
}

.invoice-table td {
    padding: 15px;
    color: #2c3e50;
    font-size: 14px;
}

.invoice-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

.invoice-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.qty, .rate {
    text-align: center;
}

/* Totals Section */
.totals {
    margin-left: auto;
    width: 350px;
    margin-top: 30px;
}

.totals .row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 15px;
    color: #34495e;
}

.totals .row span:first-child {
    font-weight: 500;
}

.totals .row span:last-child {
    font-weight: 600;
    color: #2c3e50;
}

.totals .grand {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    padding: 15px 20px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.totals .grand span {
    color: white;
    font-weight: 700;
}

/* Note */
.note {
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: #95a5a6;
    font-style: italic;
    padding-top: 20px;
    border-top: 1px dashed #bdc3c7;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .invoice-a4 {
        box-shadow: none;
        border-radius: 0;
        padding: 20px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .invoice-a4 {
        padding: 30px 20px;
    }
    
    .invoice-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .invoice-meta {
        text-align: left;
    }
    
    .company {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .totals {
        width: 100%;
    }
    
    .invoice-table {
        font-size: 12px;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 10px 5px;
    }
}