/**
 * Simple Finance Manager Public Styles
 */

/* Invoice Display */
.sfm-invoice {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    font-family: Arial, sans-serif;
}

.sfm-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000;
}

.sfm-invoice-title {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.sfm-invoice-number {
    font-size: 18px;
    color: #666;
    margin: 5px 0 0 0;
}

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

.sfm-customer-info h4,
.sfm-invoice-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

.sfm-customer-info p,
.sfm-invoice-info p {
    margin: 5px 0;
    line-height: 1.4;
}

.sfm-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.sfm-items-table th,
.sfm-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.sfm-items-table th {
    background: #f5f5f5;
    font-weight: bold;
    border-bottom: 2px solid #000;
}

.sfm-items-table .sfm-qty,
.sfm-items-table .sfm-unit-price,
.sfm-items-table .sfm-line-total {
    text-align: right;
    width: 100px;
}

.sfm-invoice-totals {
    max-width: 300px;
    margin: 30px 0 0 auto;
}

.sfm-invoice-totals table {
    width: 100%;
    border-collapse: collapse;
}

.sfm-invoice-totals td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.sfm-invoice-totals .sfm-total-label {
    font-weight: 600;
    text-align: right;
}

.sfm-invoice-totals .sfm-total-amount {
    text-align: right;
    width: 120px;
}

.sfm-invoice-totals .sfm-grand-total {
    border-top: 2px solid #000;
    font-weight: bold;
    font-size: 18px;
}

.sfm-invoice-notes {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.sfm-invoice-notes h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
}

/* Status badge */
.sfm-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.sfm-status-draft {
    background: #f0f0f1;
    color: #50575e;
}

.sfm-status-sent {
    background: #dc3232;
    color: #fff;
}

.sfm-status-partial {
    background: #ffb900;
    color: #fff;
}

.sfm-status-paid {
    background: #46b450;
    color: #fff;
}

.sfm-status-void {
    background: #666;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .sfm-invoice {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .sfm-invoice-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sfm-invoice-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sfm-items-table {
        font-size: 14px;
    }
    
    .sfm-items-table th,
    .sfm-items-table td {
        padding: 8px 5px;
    }
}

@media print {
    .sfm-invoice {
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}