/* Shared base for every Divya Vision page: studio dashboard, client, guest, team and guide.
   Direction "The album, opened" (see design/research-and-direction.md): neutral paper, warm ink,
   one sindoor accent, Newsreader for big headings only, Schibsted Grotesk for everything else.
   The public site (index.html) layers site.css on top. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #efedea;
  --text: #17130f;
  --muted: #5b544e;
  --line: #dedad5;
  --brand: #17130f;
  --brand-ink: #fbfaf8;
  --accent: #9f2b1f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e9e6;
  --accent-on-dark: #e98a76;
  --gold: var(--accent);
  --ok: #276b42;
  --ok-bg: #e5f1e8;
  --warn: #85520b;
  --warn-bg: #f8edd9;
  --danger: #a12a2a;
  --wa: #14783f;
  --bar: #17130f;
  --bar-ink: #f3eee8;
  --bar-muted: #b9b0a6;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(23, 19, 15, .16);
  --serif: 'Newsreader', 'Schibsted Grotesk', Georgia, serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1c1a18;
    --surface-2: #26231f;
    --text: #f1ece6;
    --muted: #b0a79e;
    --line: #34302b;
    --brand: #f1ece6;
    --brand-ink: #121110;
    --accent: #e2826f;
    --accent-ink: #1a0f0c;
    --accent-soft: #2c1c18;
    --ok: #7cc797;
    --ok-bg: #1d3326;
    --warn: #f0bd6a;
    --warn-bg: #3a2c15;
    --danger: #f08a8a;
    --wa: #2fbf6c;
    --bar: #0b0a09;
    --bar-ink: #f3eee8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.005em; margin: 0 0 .4em; font-variant-numeric: lining-nums; font-optical-sizing: auto; }
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.3; letter-spacing: 0; margin: 0 0 .5em; }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
small { font-size: .875rem; }
.ic { width: 20px; height: 20px; flex: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 760px; }
.section { padding: 56px 0; }
.section-alt { background: var(--surface-2); }
/* Kept for old markup: a quiet line of context, not a shouty label. */
.eyebrow { font-size: .9375rem; color: var(--muted); font-weight: 500; margin-bottom: .4em; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card.flat { box-shadow: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-ink);
  font: 600 16px/1.1 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .2s, border-color .2s, color .2s, transform .1s;
}
.btn:hover { background: color-mix(in srgb, var(--brand) 86%, var(--bg)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 19px; height: 19px; }
.btn.ghost { background: transparent; color: var(--text); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.btn.ghost:hover { text-decoration-color: currentColor; background: transparent; }
.btn.quiet { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.quiet:hover { border-color: color-mix(in srgb, var(--text) 45%, var(--line)); background: var(--surface); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: color-mix(in srgb, var(--wa) 86%, #000); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn.block { width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.wa { color: #06140b; } }

label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: 16px var(--sans);
  transition: border-color .15s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 16px; cursor: pointer; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; line-height: 1.35; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.accent { background: var(--accent); color: var(--accent-ink); }

.money { font-variant-numeric: lining-nums; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.lines tr.total td { border-bottom: 0; font-weight: 600; font-size: 1.125rem; padding-top: 14px; }
.lines .detail { display: block; color: var(--muted); font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--bar); color: var(--bar-ink); padding: 14px 20px; border-radius: 12px;
  font-weight: 500; z-index: 100; max-width: calc(100% - 32px); width: max-content; box-shadow: var(--shadow);
}
@media (min-width: 900px) { .toast { bottom: 28px; } }
.toast.error { background: var(--danger); color: #fff; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Photo grids */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (min-width: 900px) { .photos { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; } }
.photo { position: relative; border-radius: 4px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo .heart {
  position: absolute; right: 6px; bottom: 6px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(23, 19, 15, .55); color: #fff; font-size: 20px; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.photo .heart .ic { width: 22px; height: 22px; }
.photo.picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo.picked .heart { background: var(--accent); }
.photo.picked .heart .ic path { fill: currentColor; }
.photo .tag { position: absolute; left: 6px; top: 6px; }

.lightbox { position: fixed; inset: 0; background: #0c0a08; display: flex; align-items: center; justify-content: center; z-index: 90; padding: 16px; }
.lightbox img { max-height: 84vh; max-width: 100%; object-fit: contain; border-radius: 2px; }
.lightbox .close { position: absolute; top: 12px; right: 12px; }
.lightbox .actions { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }

/* Bars */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--bar-ink); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.topbar .pill { background: rgba(243, 238, 232, .12); color: var(--bar-ink); }
.topbar .btn { background: var(--bar-ink); border-color: var(--bar-ink); color: var(--bar); }
.topbar .btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand .word { font: 400 1.3rem/1 var(--serif); letter-spacing: .01em; white-space: nowrap; }
.logo { height: 40px; width: auto; display: block; }
.bottombar { position: sticky; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }

/* Progress through a booking */
.steps { display: flex; gap: 4px; margin: 0 0 24px; padding: 0; list-style: none; }
.steps li { flex: 1 1 0; min-width: 0; font-size: 13.5px; line-height: 1.3; color: var(--muted); }
.steps li::before { content: ''; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 8px; }
.steps li.done::before { background: var(--text); }
.steps li.now::before { background: var(--accent); }
.steps li.now { color: var(--text); font-weight: 600; }

@media (max-width: 600px) {
  .section { padding: 40px 0; }
  .card { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

body.locked { overflow: hidden; }
.icon-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--text); }

/* ---------- bottom sheets (ui.js openSheet, WhatsApp messages) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(12, 9, 7, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .28s var(--ease); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sheet-head h2 { font-size: 1.6rem; margin: 6px 0 0; }
.sheet textarea { min-height: 220px; font-size: 16px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 14px; }
.sheet-actions .btn { min-height: 52px; }
@media (min-width: 761px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 18px; padding: 26px 28px; }
  .sheet-actions { grid-template-columns: 1fr auto; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet-wrap, .sheet { animation: none; } }
.sheet-body > p:first-child { margin-top: 6px; }
.sheet .choice { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: center; width: 100%; text-align: left; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: 16px/1.4 var(--sans); cursor: pointer; text-decoration: none; }
.sheet .choice:last-child { border-bottom: 0; }
.sheet .choice:hover b { text-decoration: underline; text-underline-offset: 3px; }
.sheet .choice .ic { width: 22px; height: 22px; justify-self: center; grid-row: span 2; }
.sheet .choice b { font-weight: 600; }
.sheet .choice small { grid-column: 2; color: var(--muted); font-size: 14.5px; }
.sheet .choice:disabled { opacity: .5; cursor: not-allowed; }
.small-note { font-size: 14px; margin: 12px 0 0; }
.zip-state .stack { margin: 14px 0 0; }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 15px var(--sans); cursor: pointer; }
.chip span { font-size: 13px; color: var(--muted); font-variant-numeric: lining-nums; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed="true"] span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-left: -8px; }

/* ---------- full-screen photo viewer ---------- */
.viewer, .show { position: fixed; inset: 0; z-index: 80; background: #0c0a08; color: #f3eee8; }
.viewer { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 18px; }
.viewer-count { font-size: 15px; color: #b9b0a6; font-variant-numeric: tabular-nums; }
.viewer-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(243, 238, 232, .1); color: #f3eee8; font: 600 15px var(--sans); cursor: pointer; text-decoration: none; }
.viewer-btn:hover { background: rgba(243, 238, 232, .18); }
.viewer-btn .ic { width: 22px; height: 22px; }
.viewer-btn.wide { min-width: 96px; }
.viewer-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.viewer-btn[aria-pressed="true"] .ic path { fill: currentColor; }
.viewer-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer-prev, .viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
@media (hover: none) { .viewer-prev, .viewer-next { display: none; } }
.viewer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); min-height: 20px; }
.viewer-note { flex-basis: 100%; text-align: center; margin: 0; color: #d8d0c6; font-size: 15px; }

/* ---------- slideshow ---------- */
.show img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s ease; }
.show img.on { opacity: 1; }
.show img.instant, .show.cut img { transition: none; }
.show-controls { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; opacity: 0; transition: opacity .3s; }
.show-tip { position: absolute; left: 16px; right: 16px; top: calc(14px + env(safe-area-inset-top)); text-align: center; margin: 0; font-size: 14px; color: #b9b0a6; opacity: 0; transition: opacity .3s; }
.show.controls .show-controls, .show.controls .show-tip, .show:focus-within .show-controls { opacity: 1; }
.show .viewer-btn { background: rgba(12, 10, 8, .6); }

/* ---------- photo grid extras ---------- */
.photo .note-dot { position: absolute; left: 6px; bottom: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(23, 19, 15, .6); color: #fff; font-size: 14px; }
.photo .tick { position: absolute; left: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(23, 19, 15, .35); display: grid; place-items: center; color: #fff; pointer-events: none; }
.photo.selected .tick { background: var(--accent); border-color: var(--accent); }
.photo.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo .tick .ic { width: 18px; height: 18px; }
.photo button.tick { pointer-events: auto; cursor: pointer; padding: 0; width: 40px; height: 40px; }
.photo button.open { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: zoom-in; }
.photo button.open img { cursor: inherit; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.toolbar .grow { flex: 1; }
.load-more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- films ---------- */
.film { margin: 0 0 16px; }
.film video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; display: block; }
.film figcaption { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; flex-wrap: wrap; }

/* ---------- agreement and invoice ---------- */
.terms { max-height: 340px; overflow: auto; white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.inv-wrap { overflow-x: auto; margin: 0 -16px 32px; padding: 0 16px; }
/* The invoice: plain black on white in boxes, the way it prints (A4). */
.invoice { --inv-line: #3b3b3b; --inv-head: #e6e6e6; min-width: 600px; max-width: 820px; margin: 0 auto; background: #fff; color: #111; font: 400 13.5px/1.45 "Helvetica Neue", Arial, sans-serif; padding: 20px; border-radius: 4px; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.invoice .inv-top { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.invoice .inv-type { font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.invoice .inv-copy { border: 1px solid #9a9a9a; color: #6b6b6b; padding: 1px 6px; font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.invoice .inv-box { border: 1px solid var(--inv-line); }
.invoice .inv-box + .inv-box { margin-top: 10px; }
.invoice .inv-studio { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--inv-line); }
.invoice .inv-logo { width: 84px; height: auto; display: block; }
.invoice .inv-studio-text { text-align: center; }
.invoice .inv-studio-text h1 { font-family: inherit; font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin: 0 0 4px; letter-spacing: 0; }
.invoice .inv-studio-text p { margin: 0; }
.invoice .inv-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 6px !important; }
.invoice .inv-parties { display: grid; grid-template-columns: 1fr 1.15fr; border-bottom: 1px solid var(--inv-line); }
.invoice .inv-billto { padding: 12px 14px; border-right: 1px solid var(--inv-line); display: flex; flex-direction: column; gap: 2px; }
.invoice .inv-label { font-size: 12.5px; text-transform: uppercase; }
.invoice .inv-billto strong { text-transform: uppercase; font-size: 14px; overflow-wrap: anywhere; }
.invoice .inv-billto small, .invoice .inv-items small { display: block; color: #555; font-size: 12px; }
.invoice .inv-meta { display: flex; justify-content: space-around; gap: 12px; margin: 0; padding: 12px 10px; text-align: center; align-items: center; }
.invoice .inv-meta dt { font-weight: 700; }
.invoice .inv-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.invoice .inv-studio-text, .invoice .inv-items td { overflow-wrap: anywhere; }
.invoice .inv-items { width: 100%; border-collapse: collapse; margin: 0; font-size: 13.5px; }
.invoice .inv-items th { background: var(--inv-head); font-weight: 600; text-transform: uppercase; font-size: 12.5px; padding: 8px; text-align: center; border-bottom: 1px solid var(--inv-line); }
.invoice .inv-items td { padding: 7px 8px; vertical-align: top; border: 0; }
.invoice .inv-items th + th, .invoice .inv-items td + td { border-left: 1px solid var(--inv-line); }
.invoice .inv-items .num { text-align: right; white-space: nowrap; }
.invoice .inv-items th.num { text-align: center; }
.invoice .inv-items .inv-c { text-align: center; width: 54px; }
.invoice .inv-items .inv-r { text-align: right; }
.invoice .inv-fill td { height: 160px; }
.invoice tfoot td { border-top: 1px solid var(--inv-line); padding: 8px; }
.invoice .inv-total td { background: var(--inv-head); font-weight: 700; text-transform: uppercase; }
.invoice .inv-sub td { font-weight: 600; text-transform: uppercase; }
.invoice .inv-notes section { padding: 10px 12px; }
.invoice .inv-notes section + section { border-top: 1px solid var(--inv-line); }
.invoice .inv-notes h2 { font-family: inherit; font-weight: 500; font-size: 14px; line-height: 1.3; margin: 0 0 4px; letter-spacing: 0; }
.invoice .inv-notes p { margin: 0; }
.invoice .inv-notes ol { margin: 0; padding-left: 18px; font-size: 12.5px; }
@media print {
  @page { size: A4; margin: 10mm; }
  body * { visibility: hidden; }
  .invoice, .invoice * { visibility: visible; }
  .inv-wrap { overflow: visible; margin: 0; padding: 0; }
  .invoice { position: absolute; left: 0; top: 0; width: 100%; max-width: none; min-width: 0; padding: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .invoice .inv-fill td { height: 120px; }
  .invoice tr, .invoice .inv-notes section { break-inside: avoid; }
  .no-print { display: none !important; }
}


/* Quote PDF: the invoice layout, with the functions and the opening line. */
.quote-doc .quote-intro { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--inv-line); }
.quote-doc .inv-items + .inv-items { border-top: 1px solid var(--inv-line); }
.quote-doc .inv-items td.inv-c { width: auto; white-space: nowrap; }

/* No internet: one plain line at the top of every portal page. */
.offline { position: sticky; top: 0; z-index: 60; padding: 10px 16px; background: var(--warn-bg, #f6ead8); color: var(--warn, #7a4a10); font: 500 15px/1.4 var(--sans); text-align: center; }
.offline[hidden] { display: none; }
