/* Mobile-first tweaks */
body { background: #f7f9fc; }
.navbar-brand { letter-spacing: 0.3px; }
.table thead th { white-space: nowrap; }
.card { border: 0; box-shadow: 0 1px 3px rgba(3, 0, 71, 0.09); }
.btn-primary { box-shadow: 0 3px 10px rgba(13,110,253,.2); }
.form-label.required:after { content: ' *'; color: #dc3545; }
img.logo-preview { max-height: 64px; object-fit: contain; }
/* Make tables horizontally scrollable on small screens */
.table-responsive { overflow-x: auto; }

/* Invoice Theme (red/black) */
:root { --brand-red:#c8102e; --brand-dark:#111; }
.invoice-wrap { max-width: 900px; margin: 0 auto; background:#fff; border:2px solid var(--brand-red); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.invoice-header { border-bottom: 3px solid var(--brand-red); padding: 16px 16px 8px; }
.invoice-brand { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.invoice-logo { max-height:72px; object-fit:contain; width:50%; height:auto; }
.invoice-title { color: var(--brand-red); font-weight:700; letter-spacing:1px; }
.invoice-meta { color:#555; }
.invoice-body { padding: 16px; }
.invoice-section { margin-bottom: 12px; }
.invoice-box { border:1px solid #e6e6e6; border-radius:6px; }
.invoice-table thead th { background: #222; color:#fff; border-color:#222; }
.invoice-table tbody td, .invoice-table thead th { border:1px solid #ddd; }
.totals-table th { font-weight:600; }
.invoice-footer { border-top:1px solid #eee; padding: 12px 16px; color:#444; font-size:.92rem; }
.signature { margin-top: 32px; border-top: 1px solid #ccc; padding-top: 8px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.signature .name { font-weight:600; color:#000; }
.thankyou { color: var(--brand-red); font-weight:600; margin-top: 8px; }
.nowrap { white-space: nowrap; }

/* Prevent section breaks in PDF/print */
.invoice-section { page-break-inside: avoid; }
.invoice-header { page-break-after: avoid; }
.signature { page-break-inside: avoid; }
.totals-table { page-break-inside: avoid; }
.invoice-footer { page-break-inside: avoid; }

@media print {
	body { background:#fff; }
	.navbar, .btn, .alert, .no-print { display:none !important; }
	.container { max-width: none !important; width: 100% !important; padding: 0 !important; }
	.invoice-wrap { box-shadow:none; border:2px solid #000; width: 100%; max-width: none; margin: 0; }
	@page { margin: 0; }
}
