/* BaoGiaQR Pro — SaaS Studio UI + 6 Pro Invoice Themes + Crisp A4 @media print */
:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --pro-gold: #f59e0b;
  --pro-grad: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* --- Top Navbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}
.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-top: -2px;
}
.pro-badge-pill {
  background: var(--pro-grad);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.4px;
  vertical-align: middle;
  margin-left: 4px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-pro {
  background: var(--pro-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
}
.btn-pro:hover { filter: brightness(1.06); }
.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-soft); border-color: #cbd5e1; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover { background: #e2e8f0; color: var(--text); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-danger-soft { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-danger-soft:hover { background: #fee2e2; }

/* --- Hero Strip --- */
.hero-strip {
  max-width: 1460px;
  margin: 14px auto 0;
  padding: 0 18px;
}
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0369a1 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-banner h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-banner p {
  margin: 0;
  font-size: 13.5px;
  color: #cbd5e1;
}
.preset-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.chip:hover { background: rgba(255, 255, 255, 0.24); }

/* --- Main Studio Grid --- */
.studio-wrap {
  max-width: 1460px;
  margin: 16px auto 32px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: minmax(410px, 520px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* --- Editor Panel (Left) --- */
.editor-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pro-tag {
  font-size: 10px;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* Line Items Editor */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item-row-edit {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 66px 118px 32px;
  gap: 6px;
  align-items: center;
}
.item-row-edit input {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 13px;
  width: 100%;
  background: #fff;
}
.item-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #dc2626;
  cursor: pointer;
  font-weight: 700;
}
.item-del-btn:hover { background: #fee2e2; }

/* Theme Selector Pills */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.theme-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  transition: all 0.15s;
}
.theme-btn.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}
.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  flex-shrink: 0;
}
.theme-lock { font-size: 11px; opacity: 0.8; }

/* Signature Canvas */
.sig-wrap {
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  position: relative;
}
#signatureCanvas {
  width: 100%;
  height: 110px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.sig-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Live A4 Preview Panel (Right) --- */
.preview-col {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preview-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.preview-stage {
  background: #cbd5e1;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

/* The Printable A4 Sheet */
.a4-sheet {
  width: 100%;
  max-width: 820px;
  min-height: 1040px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  --doc-accent: #1d4ed8;
}
.sheet-accent-bar {
  height: 10px;
  background: var(--doc-accent);
}
.sheet-inner {
  padding: 36px 42px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Pro Theme Variations */
.a4-sheet.theme-noir .sheet-header-band {
  background: #0f172a;
  color: #fff;
  margin: -36px -42px 24px;
  padding: 32px 42px;
}
.a4-sheet.theme-noir .sheet-header-band .muted,
.a4-sheet.theme-noir .sheet-header-band .doc-meta-line { color: #cbd5e1; }
.a4-sheet.theme-noir .sheet-header-band .doc-type-title { color: #38bdf8; }

.a4-sheet.theme-gold { --doc-accent: #b45309; }
.a4-sheet.theme-gold .sheet-header-band {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  margin: -36px -42px 24px;
  padding: 30px 42px;
  border-bottom: 2px solid #f59e0b;
}

.a4-sheet.theme-emerald { --doc-accent: #047857; }
.a4-sheet.theme-coral { --doc-accent: #e11d48; }
.a4-sheet.theme-slate { --doc-accent: #334155; }

.sheet-header-band {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 22px;
}
.sender-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 58%;
}
.sender-logo-img {
  max-width: 110px;
  max-height: 62px;
  object-fit: contain;
  border-radius: 6px;
}
.sender-name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sender-meta {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.55;
}
.doc-title-block {
  text-align: right;
}
.doc-type-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 900;
  color: var(--doc-accent);
  letter-spacing: -0.02em;
}
.doc-meta-line {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
}
.doc-meta-line strong { color: inherit; }

/* Client Card inside Sheet */
.client-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--doc-accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.client-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 4px;
}
.client-main {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}
.client-sub {
  font-size: 12.5px;
  color: #475569;
  margin-top: 2px;
}

/* Items Table inside Sheet */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: 13px;
}
.inv-table thead th {
  background: var(--doc-accent);
  color: #fff;
  padding: 10px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
}
.inv-table thead th:first-child { border-radius: 7px 0 0 7px; width: 36px; text-align: center; }
.inv-table thead th:last-child { border-radius: 0 7px 7px 0; }
.inv-table th.num, .inv-table td.num { text-align: right; white-space: nowrap; }
.inv-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}
.inv-table tbody tr:nth-child(even) { background: #f8fafc; }
.inv-table tbody td:first-child { text-align: center; color: #64748b; }

/* Payment + Totals 2-Column Footer */
.sheet-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.95fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}
.qr-payment-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
}
.qr-img-box {
  width: 118px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #e2e8f0;
}
.qr-img-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.qr-meta-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--doc-accent);
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.qr-bank-name { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.qr-bank-acc { font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: 0.5px; margin: 2px 0; }
.qr-bank-owner { font-size: 12px; font-weight: 600; color: #475569; text-transform: uppercase; }
.qr-ref-pill {
  display: inline-block;
  margin-top: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.totals-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  padding: 2px 8px;
}
.total-line.grand {
  background: #f1f5f9;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--doc-accent);
}
.total-line.due {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 15.5px;
  font-weight: 800;
  color: #dc2626;
}
.words-line {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
  padding: 4px 8px 0;
}

/* Notes & Signature Row */
.notes-sig-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
}
.notes-block {
  flex: 1;
  font-size: 12px;
  color: #475569;
  white-space: pre-line;
  line-height: 1.6;
}
.notes-block strong { color: #0f172a; display: block; margin-bottom: 3px; }
.sig-stamp-block {
  min-width: 190px;
  text-align: center;
  position: relative;
}
.sig-stamp-title { font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.sig-stamp-visual {
  position: relative;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sig-preview-img { max-width: 170px; max-height: 74px; object-fit: contain; }
.red-stamp-svg {
  width: 96px;
  height: 96px;
  position: absolute;
  right: 8px;
  top: -10px;
  opacity: 0.84;
  transform: rotate(-10deg);
  pointer-events: none;
}

/* Viral Free Watermark */
.sheet-watermark {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 8px 16px;
  text-align: center;
  font-size: 11.5px;
  color: #64748b;
}
.sheet-watermark a { color: #1d4ed8; font-weight: 600; }

/* --- Client Payment View Mode (#view=...) --- */
.client-view-banner {
  max-width: 820px;
  margin: 18px auto 12px;
  padding: 14px 18px;
  background: #0f172a;
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.client-copy-bar {
  max-width: 820px;
  margin: 0 auto 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Ecosystem / B2B Upsell & SEO Footer --- */
.b2b-section {
  max-width: 1424px;
  margin: 12px auto 40px;
  padding: 0 18px;
}
.b2b-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-radius: 18px;
  padding: 26px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: center;
}
.b2b-card h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; }
.b2b-card p { margin: 0 0 12px; color: #cbd5e1; font-size: 14px; }
.b2b-bullets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  font-size: 13px;
  color: #e2e8f0;
  list-style: none;
  padding: 0;
  margin: 0;
}
.b2b-cta-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
.b2b-price { font-size: 26px; font-weight: 900; color: #fbbf24; margin: 4px 0; }

.seo-footer {
  max-width: 1424px;
  margin: 0 auto 40px;
  padding: 24px 18px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.seo-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
}
.seo-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.faq-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.faq-card h3 { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.faq-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* --- Modals (PRO Upgrade & History) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-close {
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 99px;
  font-size: 18px;
  cursor: pointer;
}
.modal-body { padding: 20px 22px; }

.pro-price-hero {
  background: linear-gradient(135deg, #fffbeb, #ffedd5);
  border: 1.5px solid #fdba74;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}
.price-old { text-decoration: line-through; color: #9a3412; font-size: 14px; margin-right: 8px; }
.price-now { font-size: 28px; font-weight: 900; color: #c2410c; }
.pro-perks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.pay-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.pay-tab {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.pay-tab.active { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.pay-box-inner {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.pay-qr-preview {
  width: 158px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
}
.license-activate-box {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.license-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.license-row input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: monospace;
  text-transform: uppercase;
}
.status-msg {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.status-msg.ok { color: var(--success); }
.status-msg.err { color: var(--danger); }

/* History List */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 300;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Responsive --- */
@media (max-width: 1080px) {
  .studio-wrap { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .b2b-card { grid-template-columns: 1fr; }
  .seo-faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-grid-2, .form-grid-3, .pro-perks, .b2b-bullets { grid-template-columns: 1fr; }
  .item-row-edit { grid-template-columns: 1fr 1fr; }
  .sheet-inner { padding: 20px 18px; }
  .sheet-header-band { flex-direction: column; }
  .sender-block { max-width: 100%; }
  .doc-title-block { text-align: left; }
  .sheet-bottom-grid { grid-template-columns: 1fr; }
  .pay-box-inner { flex-direction: column; text-align: center; }
}

/* --- CRISP A4 VECTOR PDF PRINT STYLES --- */
@page {
  size: A4 portrait;
  margin: 8mm;
}
@media print {
  body { background: #fff !important; }
  .no-print, .topbar, .hero-strip, .editor-panel, .preview-toolbar, .b2b-section, .seo-footer, .modal-backdrop, .toast, .client-view-banner, .client-copy-bar {
    display: none !important;
  }
  .studio-wrap {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .preview-stage {
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .a4-sheet {
    max-width: none !important;
    width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
