﻿/* ============================================================
   STATEMENT OF ACCOUNT — Print + Screen styles
   Mirrors receipt.css with statement- prefix + extras
   ============================================================ */

.statement-document {
    max-width: 780px;
    margin: 40px auto;
    padding: 50px;
    background: #fff;
    color: #1f2937;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

/* Header */
.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.statement-clinic-block {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.statement-logo {
    width: 80px;
    height: 80px;
    background: #4b0082;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 4px;
}

.statement-clinic-info h2 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.statement-clinic-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.statement-meta {
    text-align: right;
}

.statement-title {
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

/* Statement number sits under the title */
.statement-number {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.statement-meta-row {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0;
}

    .statement-meta-row strong {
        color: #111827;
        font-weight: 500;
    }

/* Status banner */
.statement-status-banner {
    margin: 8px 0 24px;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .statement-status-banner.status-outstanding {
        background: #fff8e1;
        border-left: 4px solid #ff9800;
    }

    .statement-status-banner.status-overdue {
        background: #ffebee;
        border-left: 4px solid #d32f2f;
    }

    .statement-status-banner.status-paid {
        background: #e8f5e9;
        border-left: 4px solid #2e7d32;
    }

.status-pill {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.status-detail {
    font-size: 13px;
    color: #6c757d;
}

/* Customer block */
.statement-customer {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.statement-customer-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.statement-customer-info p {
    margin: 0;
    line-height: 1.6;
}

.statement-customer-name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.statement-customer-detail {
    font-size: 12px;
    color: #6b7280;
}

/* Items table */
.statement-items {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0 10px 0;
}

    .statement-items thead th {
        text-align: left;
        font-weight: 500;
        font-size: 12px;
        color: #6b7280;
        padding: 10px 8px;
        border-bottom: 1px solid #d1d5db;
    }

        .statement-items thead th.text-right {
            text-align: right;
        }

        .statement-items thead th.text-center {
            text-align: center;
        }

    .statement-items tbody td {
        padding: 14px 8px;
        border-bottom: 1px solid #f3f4f6;
        font-size: 13px;
        color: #374151;
    }

        .statement-items tbody td.text-right {
            text-align: right;
        }

        .statement-items tbody td.text-center {
            text-align: center;
        }

        .statement-items tbody td.line-total {
            font-weight: 600;
            color: #111827;
        }

/* Totals */
.statement-totals {
    width: 100%;
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.statement-totals-table {
    width: 320px;
    font-size: 13px;
}

.statement-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
}

    .statement-totals-row.total-row {
        font-weight: 700;
        font-size: 14px;
        color: #111827;
        border-top: 1px solid #d1d5db;
        border-bottom: 1px solid #d1d5db;
        padding: 10px 8px;
        margin-top: 4px;
    }

    .statement-totals-row .label {
        color: #6b7280;
    }

    .statement-totals-row.total-row .label,
    .statement-totals-row.total-row .value {
        color: #111827;
    }

    /* Balance due — the headline number */
    .statement-totals-row.balance-due-row {
        border-top: 2px solid #d32f2f;
        margin-top: 8px;
        padding-top: 10px;
        font-weight: 700;
        font-size: 16px;
        color: #d32f2f;
    }

        .statement-totals-row.balance-due-row .label,
        .statement-totals-row.balance-due-row .value {
            color: #d32f2f;
        }

/* Payment history block */
.statement-payments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

    .statement-payments h4 {
        font-size: 14px;
        font-weight: 600;
        color: #111827;
        margin: 0 0 12px 0;
    }

.statement-payments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .statement-payments-table td {
        padding: 8px 0;
        color: #374151;
    }

        .statement-payments-table td.text-right {
            text-align: right;
            font-weight: 500;
        }

/* Payment instructions block */
.statement-instructions {
    margin-top: 24px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

    .statement-instructions h4 {
        margin: 0 0 8px;
        font-size: 14px;
        color: #2c3e50;
        font-weight: 600;
    }

    .statement-instructions p {
        margin: 0;
        font-size: 13px;
        color: #495057;
        line-height: 1.5;
    }

/* Print rules */
@media print {
    body * {
        visibility: hidden;
    }

    .statement-document, .statement-document * {
        visibility: visible;
    }

    .statement-document {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
        padding: 30px;
    }

    .no-print {
        display: none !important;
    }
}
