/**
 * PRINT / PDF — the Lobby register.
 *
 * This is the surface that LEAVES THE BUILDING. The day sheet lands in WhatsApp and gets
 * read on a phone by the owner, the cook and sometimes a guest; the invoice is the only
 * part of this system most people will ever see. Signature moment S3.
 *
 * The client's current process is screenshotting his screen. The bar is: this must be
 * obviously better than a screenshot.
 */

@page {
  size: A4 portrait;
  margin: 14mm 12mm 16mm;
}

@media print {
  /* Drop every piece of Desk chrome. */
  .sidebar, .sidebar-scrim, .topbar, .filter-bar, .drawer, .drawer-scrim,
  .toast, .btn, .icon-btn, .chip button, .seg, .banner, input[type="checkbox"] {
    display: none !important;
  }

  html, body {
    background: #fff;   /* the sheet itself, not a token */
    color: var(--print-ink);
    font-family: var(--font-ui);
    font-size: 10.5pt;
    line-height: 1.4;
  }
  .app, .app-main { display: block; }
  .page { max-width: none; padding: 0; }

  /* --- Document header: logo badge + the hill-contour rule ------------- */
  .page::before {
    content: '';
    display: block;
    height: 42px;
    background: url('../img/logo.png') left center / contain no-repeat;
    margin-bottom: 4mm;
  }
  .page-head { border-bottom: 1.2pt solid var(--print-rule-strong); padding-bottom: 3mm; margin-bottom: 5mm; }
  .page-head h1 {
    font-family: var(--font-lobby);
    font-weight: 400;
    font-size: 22pt;
    letter-spacing: -0.01em;
  }
  /* The filter summary travels with the export so the recipient knows what they
     are looking at — this is the difference between a PDF and a screenshot. */
  .page-head .sub { font-size: 9pt; color: var(--print-ink-dim); }
  .page-head .actions { display: none; }

  /* --- Money strip ----------------------------------------------------- */
  .money-strip { border-top: 0.8pt solid var(--print-ink); border-bottom: 0.5pt solid var(--print-rule); page-break-inside: avoid; }
  .money-strip .cell > span { font-size: 7.5pt; letter-spacing: .08em; color: var(--print-ink-dim); }
  .money-strip .cell > b { font-size: 13pt; }
  .money-strip .cell--due > b { font-size: 18pt; }

  /* --- Table ----------------------------------------------------------- */
  .table-scroll { overflow: visible; }
  .dtable { width: 100%; font-size: 9pt; }
  .dtable thead { display: table-header-group; }  /* repeat on every page */
  .dtable th {
    position: static; background: none;
    border-bottom: 0.8pt solid var(--print-ink);
    font-size: 7.5pt; letter-spacing: .07em; color: var(--print-ink);
    padding: 2mm 1.5mm;
  }
  .dtable td { height: auto; padding: 1.6mm 1.5mm; border-bottom: 0.4pt solid var(--print-rule); }
  .dtable tbody tr { page-break-inside: avoid; }
  .dtable tbody tr:nth-child(even) { background: var(--print-paper); }   /* cream, not grey */
  .dtable .col-guest { position: static; }
  .num, .money { font-variant-numeric: tabular-nums slashed-zero; text-align: right; }

  /* Status keeps its SHAPE in print, which is the whole point of pairing the two. */
  .badge { color: var(--print-ink) !important; font-size: 8pt; }
  .badge[data-hue="red"] { font-weight: 700; }

  /* The cook reads the side note across a kitchen — it does not shrink. */
  .sidenote { border-left: 1.5pt solid var(--st-amber-600); background: var(--print-wash); font-size: 11pt; page-break-inside: avoid; }

  /* --- Footer ---------------------------------------------------------- */
  .page::after {
    content: 'Ecoza Hill Retreat · Sitakunda · ecozahill.com';
    display: block;
    margin-top: 6mm; padding-top: 2mm;
    border-top: 0.4pt solid var(--print-rule);
    font-size: 7.5pt; color: var(--print-ink-faint); text-align: center;
  }

  a { text-decoration: none; color: inherit; }
  a[href^="http"]::after { content: ''; }   /* no URL dumps in the margin */
}
