/* ============================================================
   PrairieOps — service-report.css (SVC-REPORT Phase 1 rev3, 2026-07-11)
   Rev3 per Isaiah: compact letterhead (icon + small GOLD wordmark
   top-left, title/farm/date small at right), condensed identity box,
   SERVICE RECORDS as the visual centerpiece. Gold accent rules.
   @media print isolates #svc-report — only the page prints.
   ============================================================ */

/* ── paper preview (screen) ── */
.svr {
  background: #ffffff; color: #111;
  border-radius: 8px; padding: 16px 16px 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px; line-height: 1.45;
}

/* compact letterhead: brand left, title/meta right, gold rule under */
.svr-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid #c49060; padding-bottom: 8px; margin-bottom: 10px;
}
.svr-brandrow { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.svr-icon { width: 22px; height: 22px; border-radius: 5px; display: block; }
.svr-brand {
  font-family: "Copperplate", "Copperplate Gothic Light", Cinzel, serif;
  font-size: 15px; font-weight: 700; letter-spacing: 0.1em;
}
/* Isaiah 2026-07-11 rev: "Prairie" plain black, "Ops" gold, no outlines. */
.svr-b1 { color: #111; }
.svr-b2 { color: #c49060; }
.svr-headr { text-align: right; min-width: 0; }
.svr-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #111; }
.svr-gen { font-size: 10px; color: #777; margin-top: 1px; }

/* condensed identity box */
.svr-identity { border: 1px solid #ddd; border-radius: 6px; padding: 2px 10px; margin-bottom: 14px; }
.svr-idrow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 3px 0; border-bottom: 1px solid #f1f1f1; font-size: 11px;
}
.svr-idrow:last-child { border-bottom: 0; }
.svr-idrow span { color: #888; flex: 0 0 auto; }
.svr-idrow b { text-align: right; word-break: break-word; min-width: 0; font-weight: 600; }

/* SERVICE RECORDS — the centerpiece */
.svr-sechd {
  font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: #111; border-bottom: 2px solid #c49060; padding-bottom: 5px; margin-bottom: 2px;
}
.svr-rec { padding: 12px 0 11px; border-bottom: 1px solid #ddd; page-break-inside: avoid; break-inside: avoid; }
.svr-rec-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.svr-rec-date { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.svr-rec-type { font-weight: 700; font-size: 13.5px; color: #222; }
.svr-rec-right { margin-left: auto; color: #555; font-size: 12px; white-space: nowrap; }
.svr-rec-line { font-size: 12.5px; color: #222; margin-top: 4px; padding-left: 2px; }
.svr-rec-line span { display: inline-block; min-width: 46px; color: #999; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 6px; }
.svr-empty { color: #777; text-align: center; padding: 16px 0; }
.svr-dag { font-weight: 700; }

.svr-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 7px; border-top: 1px solid #ddd;
  font-size: 9.5px; color: #777;
}

/* ── print isolation: only the report reaches paper ──
   sr7 (Isaiah 2026-07-12): US-Letter layout, white page (app's black
   body was printing), report fills the full sheet width. */
@media print {
  html, body {
    background: #fff !important;         /* kill the app's black page */
    width: auto !important; height: auto !important; overflow: visible !important;
  }
  body * { visibility: hidden !important; }
  #svc-report, #svc-report * { visibility: visible !important; }

  /* topbar + Print button never reach paper (and leave no gap) */
  #svc-report-overlay .task-detail-topbar,
  #svc-report-overlay .task-detail-actions { display: none !important; }

  /* un-cage the report from the phone-width modal */
  #svc-report-overlay {
    position: absolute !important; left: 0 !important; top: 0 !important;
    width: 100% !important; height: auto !important;
    background: #fff !important; padding: 0 !important; margin: 0 !important;
    display: block !important;
  }
  #svc-report-overlay .task-detail-modal,
  #svc-report-overlay .task-detail-modal > div {
    position: static !important; display: block !important;
    width: 100% !important; max-width: none !important;
    height: auto !important; max-height: none !important;
    overflow: visible !important; background: #fff !important;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    transform: none !important;
  }
  #svc-report {
    position: static !important;
    width: 100% !important; margin: 0 !important; padding: 0 !important;
    border-radius: 0 !important; background: #fff !important; color: #000 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; /* keep the gold rules */
  }
  /* paper is wide: identity rows two-up to save depth */
  #svc-report .svr-identity { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .svr-head { break-inside: avoid; }
  @page { size: letter; margin: 13mm; }
}
