/* Invoice Display Styles - Matching the exact format from the image */

.invoice-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Action Bar */
.invoice-actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    justify-content: flex-end;
}

.invoice-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.invoice-btn:hover {
    background: #135e96;
    color: white;
}

.invoice-btn-print {
    background: #2271b1;
}

.invoice-btn-download {
    background: #00a32a;
}

.invoice-btn-download:hover {
    background: #008a20;
}

.invoice-btn .invoice-icon {
    font-size: 18px;
    line-height: 1;
}

.invoice-document {
    background: white;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 8.5in;
    margin: 0 auto;
    min-height: 11in;
}

/* Header with Logo */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.invoice-header-left {
    flex: 1;
}

.invoice-header-right {
    text-align: right;
}

.invoice-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #000;
    margin: 0;
    letter-spacing: 2px;
}

.company-logo {
    margin-bottom: 1rem;
}

.company-logo img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.company-name-header {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.invoice-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.sender-info {
    font-size: 0.9rem;
    line-height: 1.6;
}

.company-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.legal-entity {
    margin-bottom: 0.5rem;
}

.address,
.phone,
.email {
    margin-bottom: 0.3rem;
}

.tax-number {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.recipient-info {
    font-size: 0.9rem;
    line-height: 1.6;
}

.section-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.recipient-name {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.recipient-company {
    margin-bottom: 0.3rem;
}

.recipient-address,
.recipient-email {
    margin-bottom: 0.3rem;
}

.invoice-details-section {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.invoice-detail-item {
    display: flex;
    gap: 0.5rem;
}

.detail-label {
    font-weight: 500;
}

.detail-value {
    color: #333;
}

.services-section {
    margin-bottom: 2rem;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.services-table thead {
    border-bottom: 2px solid #000;
}

.services-table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.services-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #ddd;
}

.services-table .text-right {
    text-align: right;
}

.services-table .text-center {
    text-align: center;
}

.col-service {
    width: 25%;
}

.col-description {
    width: 50%;
}

.col-amount {
    width: 25%;
}

.summary-section {
    margin-bottom: 2rem;
    margin-left: auto;
    width: fit-content;
    min-width: 300px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.summary-row.total-row {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.summary-row.invoice-total {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.summary-label {
    margin-right: 2rem;
}

.summary-value {
    font-weight: 500;
    min-width: 120px;
    text-align: right;
}

.payment-section {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.payment-instructions {
    margin-bottom: 1rem;
}

.payment-info {
    margin-bottom: 1rem;
}

.payment-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

.bank-details {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.invoice-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

/* Invoice List Styles */
.invoice-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.invoice-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.invoice-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.invoice-item h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.invoice-item h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.invoice-item p {
    margin-bottom: 0.5rem;
    color: #34495e;
}

/* Print Styles */
@media print {
    .invoice-actions-bar {
        display: none !important;
    }
    
    .invoice-document {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        background: white;
    }
    
    .invoice-container {
        padding: 0;
    }
    
    @page {
        margin: 1cm;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .invoice-header {
        flex-direction: column;
    }
    
    .invoice-header-right {
        text-align: left;
        margin-top: 1rem;
    }
    
    .invoice-top-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .invoice-details-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .invoice-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}

