/*
 * Printed front desk documents: guest registration card, invoice and payment receipt
 * (resources/views/admin/pages/front/guest-card, checkout/invoice, checkout/receipt).
 * A white A4 sheet on screen with Back / Print on top; only the sheet when printed.
 */
:root { --ink: #111; --muted: #666; --line: #cfd3da; --brand: #233d89; --void: #c00; }
* { box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: #f4f5f7; margin: 0; font-size: 13px; }
.sheet { background: #fff; max-width: 820px; margin: 24px auto; padding: 32px 40px; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.sheet.is-narrow { max-width: 520px; }
.sheet.is-card { padding: 28px 36px; font-size: 12.5px; }
h1 { color: var(--brand); font-size: 22px; margin: 0; letter-spacing: .5px; }
h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--brand); margin: 16px 0 6px; border-bottom: 1px solid var(--brand); padding-bottom: 3px; }
.muted { color: var(--muted); }
.small-print { margin-top: 16px; font-size: 10.5px; }
.head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--brand); padding-bottom: 16px; margin-bottom: 16px; }
.parties { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.r { text-align: right; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.totals { width: 50%; margin-left: auto; }
.totals td { border: 0; padding: 3px 8px; }
.totals .grand td { font-weight: 700; font-size: 15px; border-top: 2px solid var(--ink); }
.void { color: var(--void); font-weight: 700; border: 2px solid var(--void); display: inline-block; padding: 2px 8px; transform: rotate(-4deg); text-transform: uppercase; }
.late { color: var(--void); font-weight: 600; }
/* guest card fields */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dotted var(--line); min-height: 26px; align-items: baseline; }
.f span { color: var(--muted); font-size: 11px; white-space: nowrap; min-width: 92px; }
.f b { font-weight: 600; overflow-wrap: anywhere; }
.f .tag { margin-left: auto; color: var(--brand); }
.full { grid-column: 1 / -1; }
.terms { font-size: 11px; line-height: 1.5; margin: 0; padding-left: 16px; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.sign div { border-top: 1px solid var(--ink); padding-top: 4px; font-size: 11px; color: var(--muted); }
/* Back and Print above the sheet */
.bar { max-width: 820px; margin: 16px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bar.is-end { justify-content: flex-end; }
.bar button, .bar a { font: inherit; font-size: 13px; border-radius: 8px; padding: 8px 16px; cursor: pointer; text-decoration: none; }
.bar button { background: var(--brand); color: #fff; border: 0; }
.bar .back { color: var(--brand); background: #fff; border: 1px solid var(--line); }
.bar .back:hover { border-color: var(--brand); }
/* a till receipt (restaurant bill): narrow, centred head, dashed cuts, no row lines */
.sheet.is-receipt { max-width: 340px; padding: 22px 20px; font-size: 12.5px; }
.bar.is-receipt { max-width: 340px; }
.receipt-head { text-align: center; margin-bottom: 8px; }
.receipt-head h1 { font-size: 17px; }
.is-receipt table { margin: 0; }
.is-receipt td { border: 0; padding: 2px 0; }
.is-receipt .cut { border: 0; border-top: 1px dashed var(--muted); margin: 8px 0; }
.is-receipt .grand td { font-weight: 700; font-size: 15px; padding-top: 4px; }
.is-receipt .sign-line { padding-top: 22px; color: var(--muted); }
.receipt-foot { text-align: center; margin: 10px 0 0; }
@media (max-width: 600px) {
    .bar { margin: 12px 16px 0; }
    .sheet, .sheet.is-card { margin: 0; padding: 16px; }
    .grid, .grid.three { grid-template-columns: 1fr; }
    .head, .parties { flex-direction: column; }
    .r { text-align: left; }
    .totals { width: 100%; }
}
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; }
    .sheet, .sheet.is-card { box-shadow: none; margin: 0; max-width: none; padding: 0; }
    .sheet.is-receipt { max-width: 80mm; }
    .bar { display: none; }
}
