/* VibeReserve — Print Receipt stylesheet (used by handle_print_receipt) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 13px;
    color: #0f172a;
    background: #f1f5f9;
    min-height: 100vh;
    padding: 32px 16px;
}

.page {
    background: #fff;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 4px 32px rgba(0,0,0,.12);
    border: 1px solid #cbd5e1;
}

/* Top accent bar */
.accent-bar {
    height: 6px;
    background: repeating-linear-gradient(90deg, #0f172a 0px, #0f172a 60px, #1d4ed8 60px, #1d4ed8 120px);
    border-radius: 4px 4px 0 0;
}

/* Header */
.header {
    padding: 32px 40px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #0f172a;
}
.brand-name { font-size: 24px; font-weight: 900; color: #0f172a; letter-spacing: -.5px; }
.brand-sub  { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 3px; }
.brand-contact { margin-top: 10px; font-size: 11px; color: #475569; line-height: 1.9; }

.invoice-meta { text-align: right; }
.invoice-label { font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #94a3b8; margin-bottom: 4px; }
.invoice-ref {
    font-size: 20px; font-weight: 900; font-family: monospace;
    letter-spacing: 2px; color: #0f172a;
    border: 2px solid #0f172a;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}
.invoice-date { font-size: 11px; color: #64748b; margin-top: 6px; }

/* Status row */
.status-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 40px; background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
}
.status-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
    color: #0f172a;
}
.status-indicator {
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid currentColor; flex-shrink: 0;
}
.status-indicator.filled { background: currentColor; }
.pay-badge {
    font-size: 10px; font-weight: 800;
    color: #0f172a; border: 1.5px solid #0f172a;
    padding: 3px 11px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: .8px;
}

/* Body */
.body { padding: 32px 40px; }

/* Service block */
.service-block {
    border: 2px solid #0f172a; border-radius: 4px;
    padding: 18px 22px; margin-bottom: 28px;
    display: flex; align-items: center; gap: 18px;
}
.service-icon-box {
    width: 48px; height: 48px;
    border: 2px solid #0f172a; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.service-name { font-size: 17px; font-weight: 900; color: #0f172a; margin-bottom: 5px; }
.service-meta { font-size: 11px; color: #475569; display: flex; flex-wrap: wrap; gap: 16px; }
.service-meta span { display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* Two columns */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 28px; }
.col { padding-right: 28px; }
.col + .col { padding-right: 0; padding-left: 28px; border-left: 1.5px solid #e2e8f0; }

.section-label {
    font-size: 9px; font-weight: 800;
    letter-spacing: 1.8px; text-transform: uppercase;
    color: #64748b;
    padding-bottom: 8px; border-bottom: 1.5px solid #0f172a;
    margin-bottom: 14px;
}
.field { margin-bottom: 12px; }
.field-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #94a3b8; margin-bottom: 3px; }
.field-value { font-size: 13px; font-weight: 600; color: #0f172a; line-height: 1.4; }
.field-value small { font-weight: 400; color: #64748b; font-size: 11px; display: block; margin-top: 1px; }

/* Notes */
.notes-box {
    border: 1.5px dashed #94a3b8; border-radius: 4px;
    padding: 12px 16px; margin-bottom: 24px;
}
.notes-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #64748b; margin-bottom: 5px; }
.notes-text  { font-size: 13px; color: #334155; line-height: 1.5; }

/* Financial table */
.financial-table {
    width: 100%; border-collapse: collapse;
    border: 1.5px solid #0f172a; border-radius: 4px;
    margin-bottom: 28px; overflow: hidden;
}
.financial-table thead tr { background: #0f172a; }
.financial-table thead th {
    padding: 10px 16px;
    font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
    text-transform: uppercase; color: #fff; text-align: left;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.financial-table thead th:last-child { text-align: right; }
.financial-table tbody td {
    padding: 11px 16px; font-size: 13px; color: #334155;
    border-top: 1px solid #e2e8f0; font-weight: 500;
}
.financial-table tbody td:last-child { text-align: right; font-weight: 700; color: #0f172a; }
.financial-table tfoot tr {
    background: #f8fafc;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.financial-table tfoot td {
    padding: 13px 16px; border-top: 2px solid #0f172a;
    font-size: 15px; font-weight: 900; color: #0f172a;
}
.financial-table tfoot td:last-child { text-align: right; font-size: 20px; }

/* Footer */
.footer {
    border-top: 2px solid #0f172a;
    padding: 18px 40px;
    display: flex; justify-content: space-between; align-items: flex-end;
    background: #f8fafc;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.footer-msg { font-size: 12px; color: #334155; line-height: 1.7; }
.footer-msg strong { color: #0f172a; font-weight: 800; }
.footer-ref { font-size: 10px; color: #94a3b8; text-align: right; line-height: 1.8; }

/* Print button (screen only) */
.print-actions {
    display: flex; gap: 8px;
    margin: 0 auto 20px; max-width: 720px;
    justify-content: flex-end;
}
.btn-print {
    background: #0f172a; color: #fff; border: none;
    padding: 10px 22px; border-radius: 8px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: inherit;
    display: flex; align-items: center; gap: 7px;
}
.btn-print:hover { background: #1e293b; }

/* Print media */
@media print {
    body { background: #fff; padding: 0; font-size: 12px; }
    .page { box-shadow: none; max-width: 100%; border: none; }
    .accent-bar { background: #0f172a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .print-actions { display: none !important; }
    .financial-table thead tr { background: #0f172a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
