@page {
  size: A4 portrait;
  margin: 0;
}

body.print-mode * {
  visibility: hidden !important;
}

body.print-mode > :not(#printRoot) {
  display: none !important;
}

body.print-mode #printRoot,
body.print-mode #printRoot * {
  visibility: visible !important;
}

body.print-mode {
  margin: 0 !important;
  background: #fff !important;
  overflow: visible !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body.print-mode #printRoot {
  display: block !important;
  position: static;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 0;
  background: #fff;
  color: #1f2a44;
  font-family: var(--font-sans);
}

.print-meta-list strong,
.print-total-row strong,
.print-company-strip-item span,
.print-footer-page,
.print-footer-date,
.print-continuation-meta,
.print-annex-meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.print-document {
  width: calc(210mm + 56px);
  max-width: calc(210mm + 56px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: linear-gradient(135deg, #dfe7ef 0%, #eef3f8 45%, #d6e0ea 100%);
  padding: 28px;
  box-sizing: border-box;
}

.print-sheet {
  width: 100%;
  height: 297mm;
  max-height: 297mm;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12mm 14mm 14mm;
  background: #ffffff;
  color: #24324a;
  box-shadow: 0 26px 60px rgba(38, 60, 96, 0.12);
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-sheet:last-child {
  break-after: auto;
  page-break-after: auto;
}

.print-sheet.theme-spee {
  background:
    radial-gradient(circle at top left, rgba(162, 28, 36, 0.06), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
}

.print-sheet.theme-ibn {
  background:
    radial-gradient(circle at top right, rgba(11, 74, 124, 0.06), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.print-header,
.print-top-grid,
.print-continuation-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.print-header,
.print-top-grid,
.print-project-section,
.print-lower,
.print-company-details,
.print-block,
.print-copy-block,
.print-notes,
.print-totals,
.print-company-strip,
.print-footer,
.print-continuation-head,
.print-table thead,
.print-table tbody tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-header,
.print-continuation-head {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbe4ef;
}

.print-company {
  max-width: 42%;
  font-size: 12px;
  color: #66748f;
}

.print-company-name {
  font-weight: 800;
  font-size: 19px;
  color: #1a2740;
}

.print-company-role {
  display: inline-flex;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf2fb;
  color: #355173;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.print-workspace-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a1f29;
}

.print-company-trade {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: #6a7a92;
}

.print-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: 210px;
  max-height: 86px;
  object-fit: contain;
}

.print-logo-minimal {
  max-width: 170px;
  max-height: 48px;
}

.print-logo-corporate {
  max-width: 230px;
  max-height: 96px;
}

.print-logo-construction {
  max-width: 210px;
  max-height: 80px;
}

.print-logo-premium {
  max-width: 190px;
  max-height: 72px;
}

.print-logo-fallback {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #0f172a 0%, #334155 100%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.print-logo-fallback-minimal {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 18px;
}

.print-logo-fallback-corporate {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  font-size: 26px;
}

.print-logo-fallback-construction {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  font-size: 24px;
}

.print-logo-fallback-premium {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  font-size: 22px;
}

.print-company-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.print-company-identity .print-block-label {
  margin-bottom: 5px;
}

.print-company-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
}

.print-company-detail {
  display: grid;
  gap: 3px;
}

.print-company-detail span {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.print-company-detail strong {
  font-size: 12px;
  line-height: 1.55;
  color: #22314a;
}

.print-sheet.theme-spee .print-header {
  border-bottom-color: #e6c7cb;
}

.print-sheet.theme-spee .print-continuation-head {
  border-bottom-color: #ead7da;
}

.print-sheet.theme-spee .print-continuation-head strong {
  color: #3c1f24;
}

.print-sheet.theme-spee .print-title {
  color: #d9c5c8;
}

.print-sheet.theme-spee .print-subject {
  border-bottom-color: #ead7da;
}

.print-sheet.theme-spee .print-subject h2 {
  color: #3c1f24;
}

.print-sheet.theme-spee .print-company-role {
  background: #f7e7e9;
  color: #8a1f29;
}

.print-sheet.theme-spee .print-logo-fallback {
  background: linear-gradient(145deg, #8a1f29 0%, #c2414d 100%);
}

.print-sheet.theme-spee .print-company-details,
.print-sheet.theme-spee .print-project-section,
.print-sheet.theme-spee .print-notes,
.print-sheet.theme-spee .print-totals,
.print-sheet.theme-spee .print-block,
.print-sheet.theme-spee .print-company-strip,
.print-sheet.theme-spee .print-footer {
  border-color: #ead7da;
}

.print-sheet.theme-spee .print-block {
  background: #fdf9fa;
}

.print-sheet.theme-spee .print-company-details,
.print-sheet.theme-spee .print-project-section,
.print-sheet.theme-spee .print-notes,
.print-sheet.theme-spee .print-totals {
  background: #fffafb;
}

.print-sheet.theme-spee .print-table th {
  border-bottom-color: #8a1f29;
}

.print-sheet.theme-spee .print-total-row.grand {
  border-top-color: #8a1f29;
  color: #4a1e25;
}

.print-sheet.theme-ibn .print-header {
  border-bottom-color: #d9e5ef;
}

.print-sheet.theme-ibn .print-continuation-head {
  border-bottom-color: #dbe6ef;
}

.print-sheet.theme-ibn .print-continuation-head strong {
  color: #17324d;
}

.print-sheet.theme-ibn .print-title {
  color: #c9d8e6;
}

.print-sheet.theme-ibn .print-subject {
  border-bottom-color: #dbe6ef;
}

.print-sheet.theme-ibn .print-subject h2 {
  color: #17324d;
}

.print-sheet.theme-ibn .print-company-role {
  background: #e8f0f7;
  color: #174a77;
}

.print-sheet.theme-ibn .print-workspace-label {
  color: #174a77;
}

.print-sheet.theme-ibn .print-logo-fallback {
  background: linear-gradient(145deg, #174a77 0%, #2563a6 100%);
}

.print-sheet.theme-ibn .print-company-details,
.print-sheet.theme-ibn .print-project-section,
.print-sheet.theme-ibn .print-notes,
.print-sheet.theme-ibn .print-totals,
.print-sheet.theme-ibn .print-block,
.print-sheet.theme-ibn .print-company-strip,
.print-sheet.theme-ibn .print-footer {
  border-color: #d9e5ef;
}

.print-sheet.theme-ibn .print-block {
  background: #f8fbfd;
}

.print-sheet.theme-ibn .print-company-details,
.print-sheet.theme-ibn .print-project-section,
.print-sheet.theme-ibn .print-notes,
.print-sheet.theme-ibn .print-totals {
  background: #fbfdff;
}

.print-sheet.theme-ibn .print-table th {
  border-bottom-color: #174a77;
}

.print-sheet.theme-ibn .print-total-row.grand {
  border-top-color: #174a77;
  color: #17324d;
}

.print-title-block {
  width: 38%;
}

.print-title {
  margin: 0 0 10px;
  font-size: 46px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #d7e2ef;
  text-align: right;
}

.print-meta-list {
  margin-left: auto;
  width: 100%;
  max-width: 260px;
}

.print-meta-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 5px 0;
}

.print-meta-list span,
.print-block-label {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.print-meta-list strong {
  font-size: 11px;
  color: #24324a;
  text-align: right;
}

.print-subject {
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe4ef;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-subject h2 {
  margin: 0;
  max-width: 90%;
  font-size: 20px;
  line-height: 1.18;
  color: #16233a;
}

.print-top-grid {
  align-items: flex-start;
}

.print-block {
  width: 43%;
  padding: 10px 14px;
  border-radius: 16px;
  background: #f6f8fb;
  border: 1px solid #dbe4ef;
  line-height: 1.65;
  font-size: 12px;
  color: #5f6f88;
}

.print-block strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: #1b2942;
}

.print-copy-block {
  width: 49%;
  font-size: 12px;
  line-height: 1.75;
  color: #4d5d76;
}

.print-copy-block p {
  margin: 0;
}

.print-project-section {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid #dbe4ef;
  background: #f7f9fc;
}

.print-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.print-project-item {
  display: grid;
  gap: 4px;
}

.print-project-item span {
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.print-project-item strong {
  font-size: 11px;
  line-height: 1.45;
  color: #22314a;
}

.print-mode-note {
  padding-top: 10px;
  border-top: 1px solid #dbe4ef;
  font-size: 11px;
  line-height: 1.6;
  color: #4d5d76;
}

.print-continuation-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  color: #16233a;
}

.print-continuation-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  font-size: 11px;
  line-height: 1.5;
  color: #61708a;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.print-table thead {
  display: table-header-group;
}

.print-table th:first-child,
.print-table td:first-child {
  width: 46%;
  padding-right: 14px;
}

.print-table th,
.print-table td {
  text-align: left;
  padding: 7px 0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.print-table th {
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 2px solid #24324a;
}

.print-item-description strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #16233a;
}

.print-item-description span {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: #7b8aa1;
}

.print-item-details {
  margin-bottom: 6px;
  color: #55657d !important;
  white-space: normal;
}

.align-right {
  text-align: right !important;
}

.print-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: start;
  padding-top: 0;
}

.print-page-tail {
  margin-top: auto;
  display: grid;
  gap: 3mm;
}

.print-notes {
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid #dbe4ef;
  background: #f7f9fc;
  font-size: 12px;
  line-height: 1.8;
  color: #4d5d76;
}

.print-notes p {
  margin: 0;
}

.print-totals {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid #dbe4ef;
  background: #f7f9fc;
}

.print-company-strip {
  padding-top: 2mm;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid #dbe4ef;
}

.print-company-strip-item {
  min-width: 0;
}

.print-company-strip-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d8ba0;
}

.print-company-strip-item span {
  display: block;
  font-size: 9px;
  line-height: 1.35;
  color: #24324a;
  overflow-wrap: anywhere;
}

.print-total-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #dbe4ef;
  font-size: 12px;
}

.print-total-row.grand {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #24324a;
  border-bottom: 0;
  font-size: 15px;
  font-weight: 800;
  color: #16233a;
}

.print-footer {
  padding-top: 2mm;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #dbe4ef;
  font-size: 9px;
  color: #7b8aa1;
}

.print-footer-company,
.print-footer-page,
.print-footer-date {
  margin: 0;
  font-size: 9px;
  line-height: 1.2;
}

.print-footer-company {
  justify-self: start;
  text-align: left;
}

.print-footer-page {
  justify-self: center;
  text-align: center;
  font-weight: 700;
  color: #24324a;
}

.print-footer-date {
  justify-self: end;
  text-align: right;
}

.preview-frame {
  width: calc(210mm + 56px);
  min-height: 297mm;
  margin: 0 auto;
  background: transparent;
}

.print-document.template-style-minimal {
  background: linear-gradient(135deg, #e7edf3 0%, #f7f9fb 48%, #dfe6ee 100%);
}

.print-document.template-style-corporate {
  background: linear-gradient(135deg, #d7e2f0 0%, #ecf2f9 48%, #d3ddec 100%);
}

.print-document.template-style-construction {
  background: linear-gradient(135deg, #ebe6da 0%, #f7f4eb 45%, #e0d7c2 100%);
}

.print-document.template-style-premium {
  background: linear-gradient(135deg, #1d2230 0%, #2b3141 45%, #171b25 100%);
}

.template-style-minimal {
  color: #18273b;
  font-family: var(--font-sans);
}

.template-style-minimal .print-sheet {
  background: #ffffff;
}

.template-style-minimal .print-header,
.template-style-minimal .print-continuation-head,
.template-style-minimal .print-subject,
.template-style-minimal .print-company-strip,
.template-style-minimal .print-footer {
  border-color: #d7e0ea;
}

.template-style-minimal .print-company-details,
.template-style-minimal .print-project-section,
.template-style-minimal .print-notes,
.template-style-minimal .print-totals,
.template-style-minimal .print-block {
  background: #ffffff;
  border-color: #e1e7ef;
  box-shadow: none;
}

.template-style-minimal .print-company-role {
  background: #eef3f8;
  color: #3c5879;
}

.template-style-minimal .print-title {
  color: #d7e0ea;
}

.template-style-minimal .print-table th {
  border-bottom-color: #24324a;
  color: #7b8ba1;
}

.template-style-minimal .print-table td {
  border-bottom-color: #e5ebf2;
}

.template-style-minimal .print-total-row.grand {
  border-top-color: #24324a;
  color: #16233a;
}

.template-style-corporate {
  color: #17304d;
  font-family: var(--font-sans-strong);
}

.template-style-corporate .print-sheet {
  background: #ffffff;
}

.template-style-corporate .print-company-name,
.template-style-corporate .print-subject h2,
.template-style-corporate .print-continuation-head strong {
  font-family: var(--font-sans-strong);
  font-weight: 700;
}

.template-style-corporate .print-header-band {
  margin: -16mm -14mm 16px;
  padding: 16mm 14mm 12mm;
  border-bottom: 0;
  background: linear-gradient(135deg, #16365e 0%, #204c84 58%, #255893 100%);
  color: #ffffff;
}

.template-style-corporate .print-header-band .print-company-name,
.template-style-corporate .print-header-band .print-title,
.template-style-corporate .print-header-band .print-meta-list strong,
.template-style-corporate .print-header-band .print-company-detail strong {
  color: #ffffff;
}

.template-style-corporate .print-header-band .print-title {
  color: rgba(255, 255, 255, 0.3);
}

.template-style-corporate .print-header-band .print-block-label,
.template-style-corporate .print-header-band .print-meta-list span,
.template-style-corporate .print-header-band .print-company-trade,
.template-style-corporate .print-header-band .print-workspace-label,
.template-style-corporate .print-header-band .print-company-detail span {
  color: rgba(226, 236, 248, 0.82);
}

.template-style-corporate .print-header-band .print-company-role {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.template-style-corporate .print-header-band .print-company-details {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.template-style-corporate .print-subject {
  border-bottom-color: #c8d7e8;
}

.template-style-corporate .print-subject h2,
.template-style-corporate .print-continuation-head strong,
.template-style-corporate .print-item-description strong,
.template-style-corporate .print-footer-page {
  color: #17324d;
}

.template-style-corporate .print-project-section,
.template-style-corporate .print-notes,
.template-style-corporate .print-totals,
.template-style-corporate .print-block {
  background: #fbfdff;
  border-color: #d4e0ec;
}

.template-style-corporate .print-mode-note,
.template-style-corporate .print-copy-block,
.template-style-corporate .print-notes,
.template-style-corporate .print-item-description span {
  color: #4f6481;
}

.template-style-corporate .print-table th {
  border-bottom-color: #17324d;
  color: #46627f;
}

.template-style-corporate .print-table td {
  border-bottom-color: #dce6f0;
}

.template-style-corporate .print-total-row.grand {
  border-top-color: #17324d;
  color: #17324d;
}

.template-style-corporate .print-company-strip,
.template-style-corporate .print-footer,
.template-style-corporate .print-continuation-head {
  border-color: #d1deeb;
}

.template-style-construction {
  color: #2f2619;
  font-family: var(--font-sans-strong);
}

.template-style-construction .print-sheet {
  background: #fffdf7;
}

.template-style-construction .print-title,
.template-style-construction .print-subject h2,
.template-style-construction .print-company-name,
.template-style-construction .print-continuation-head strong,
.template-style-construction .print-annex-head h2 {
  font-family: var(--font-sans-strong);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.template-style-construction .print-header,
.template-style-construction .print-continuation-head,
.template-style-construction .print-subject,
.template-style-construction .print-company-strip,
.template-style-construction .print-footer {
  border-color: #ccb996;
}

.template-style-construction .print-company-name,
.template-style-construction .print-subject h2,
.template-style-construction .print-continuation-head strong,
.template-style-construction .print-item-description strong,
.template-style-construction .print-total-row.grand {
  color: #312312;
}

.template-style-construction .print-company-role {
  background: #f3e2c0;
  color: #7b4a0d;
}

.template-style-construction .print-workspace-label {
  color: #8b5e1d;
}

.template-style-construction .print-company-details,
.template-style-construction .print-project-section,
.template-style-construction .print-notes,
.template-style-construction .print-totals,
.template-style-construction .print-block {
  background: #f8f2e5;
  border: 1.5px solid #d4c09c;
}

.template-style-construction .print-mode-note {
  border-top-color: #d4c09c;
  color: #5c4b34;
}

.template-style-construction .print-table th {
  border-bottom: 2px solid #7b4a0d;
  color: #7b4a0d;
}

.template-style-construction .print-table td {
  border-bottom-color: #e2d3b9;
}

.template-style-construction .print-total-row {
  border-bottom-color: #d7c39d;
}

.template-style-construction .print-total-row.grand {
  border-top: 2px solid #7b4a0d;
}

.template-style-construction .print-company-strip-item strong,
.template-style-construction .print-block-label,
.template-style-construction .print-meta-list span,
.template-style-construction .print-project-item span {
  color: #9b7a48;
}

.template-style-construction .print-notes-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #c7af83;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7b4a0d;
}

.template-style-premium {
  color: #241d16;
  font-family: var(--font-serif);
}

.template-style-premium .print-sheet {
  background: #fcf8f1;
}

.template-style-premium .print-company-name,
.template-style-premium .print-subject h2,
.template-style-premium .print-title,
.template-style-premium .print-continuation-head strong,
.template-style-premium .print-cover-copy h1,
.template-style-premium .print-cover-copy h2 {
  font-family: var(--font-serif);
}

.template-style-premium .print-title {
  font-weight: 700;
}

.template-style-premium .print-header,
.template-style-premium .print-continuation-head,
.template-style-premium .print-subject,
.template-style-premium .print-company-strip,
.template-style-premium .print-footer {
  border-color: #d7c3a1;
}

.template-style-premium .print-company-name,
.template-style-premium .print-subject h2,
.template-style-premium .print-continuation-head strong,
.template-style-premium .print-item-description strong,
.template-style-premium .print-total-row.grand,
.template-style-premium .print-footer-page {
  color: #342513;
}

.template-style-premium .print-title {
  color: rgba(154, 122, 67, 0.28);
  letter-spacing: 0.08em;
}

.template-style-premium .print-company-role {
  background: #efe4d1;
  color: #8d6b34;
}

.template-style-premium .print-workspace-label,
.template-style-premium .print-company-strip-item strong,
.template-style-premium .print-block-label,
.template-style-premium .print-meta-list span,
.template-style-premium .print-project-item span {
  color: #9b7c49;
}

.template-style-premium .print-company-details,
.template-style-premium .print-project-section,
.template-style-premium .print-notes,
.template-style-premium .print-totals,
.template-style-premium .print-block {
  background: #fffdf9;
  border-color: #ddcfb6;
}

.template-style-premium .print-copy-block,
.template-style-premium .print-notes,
.template-style-premium .print-mode-note,
.template-style-premium .print-item-description span {
  color: #6a5740;
}

.template-style-premium .print-table th {
  border-bottom-color: #8d6b34;
  color: #9b7c49;
}

.template-style-premium .print-table td {
  border-bottom-color: #eadfcd;
}

.template-style-premium .print-total-row {
  border-bottom-color: #e4d6c0;
}

.template-style-premium .print-total-row.grand {
  border-top-color: #8d6b34;
}

.print-cover-sheet {
  justify-content: space-between;
  padding: 18mm;
  background:
    radial-gradient(circle at top, rgba(192, 151, 79, 0.18), transparent 32%),
    linear-gradient(160deg, #11161f 0%, #1a2130 55%, #0e131b 100%);
  color: #e7d3aa;
}

.print-cover-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 24mm 18mm;
  border: 1px solid rgba(205, 171, 106, 0.36);
  background: linear-gradient(180deg, rgba(11, 14, 22, 0.22), rgba(11, 14, 22, 0.06));
}

.print-cover-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.print-cover-logo {
  display: block;
  width: auto;
  max-width: 220px;
  max-height: 120px;
  object-fit: contain;
  filter: brightness(1.08) contrast(1.05);
}

.print-cover-logo-premium {
  max-width: 240px;
  max-height: 128px;
}

.print-cover-logo-fallback {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(207, 173, 104, 0.36);
  background: rgba(248, 238, 218, 0.06);
  color: #e4c689;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.print-cover-logo-fallback-premium {
  width: 124px;
  height: 124px;
  font-size: 36px;
}

.print-cover-company {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #d4b77f;
}

.print-cover-copy {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.print-cover-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(233, 212, 171, 0.72);
}

.print-cover-copy h1,
.print-cover-copy h2,
.print-cover-copy p {
  margin: 0;
}

.print-cover-copy h1 {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.print-cover-copy h2 {
  max-width: 88%;
  font-size: 54px;
  line-height: 1.04;
  font-weight: 700;
  color: #f3e6ca;
}

.print-cover-copy p {
  max-width: 72%;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(236, 220, 189, 0.74);
}

.print-cover-date {
  margin-top: 18px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(233, 212, 171, 0.58);
}

.print-annex-sheet {
  background: #fffdf7;
}

.print-annex-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #ccb996;
}

.print-annex-head h2,
.print-annex-head p {
  margin: 0;
}

.print-annex-head h2 {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.15;
  color: #312312;
}

.print-annex-head p {
  margin-top: 8px;
  font-size: 12px;
  color: #6c5840;
}

.print-annex-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  font-size: 11px;
  color: #7b5a2d;
}

.print-annex-body {
  display: grid;
  gap: 14px;
  padding: 14px 0 8px;
  font-size: 12px;
  line-height: 1.8;
  color: #4f4232;
}

.print-annex-body p {
  margin: 0;
}

.print-terms-sheet {
  gap: 14px;
}

.print-terms-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dbe4ef;
}

.print-terms-head h2,
.print-terms-head p {
  margin: 0;
}

.print-terms-head h2 {
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.15;
  color: #16233a;
}

.print-terms-head p {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: #6b7a91;
}

.print-terms-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  font-size: 10px;
  color: #6b7a91;
}

.print-terms-body {
  flex: 1 1 auto;
  column-count: 2;
  column-gap: 10mm;
  column-fill: auto;
  font-size: 10px;
  line-height: 1.7;
  color: #4c5c75;
  text-align: justify;
}

.print-terms-body p {
  margin: 0 0 10px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.template-style-minimal .print-terms-head {
  border-bottom-color: #dbe4ef;
}

.template-style-corporate .print-terms-head {
  border-bottom-color: #d1deeb;
}

.template-style-construction .print-terms-head {
  border-bottom-color: #ccb996;
}

.template-style-premium .print-terms-head {
  border-bottom-color: #d7c3a1;
}

.template-style-corporate .print-terms-head h2,
.template-style-corporate .print-terms-meta {
  color: #17324d;
}

.template-style-corporate .print-terms-body {
  color: #51667f;
}

.template-style-construction .print-terms-head h2,
.template-style-construction .print-terms-meta {
  color: #312312;
}

.template-style-construction .print-terms-body {
  color: #564733;
}

.template-style-premium .print-terms-head h2 {
  color: #342513;
}

.template-style-premium .print-terms-head p,
.template-style-premium .print-terms-meta,
.template-style-premium .print-terms-body {
  color: #6a5740;
}

.print-document.template-style-corporate.theme-spee {
  background: linear-gradient(135deg, #f0e2e5 0%, #f7f0f2 48%, #ead6da 100%);
}

.print-document.template-style-corporate.theme-ibn {
  background: linear-gradient(135deg, #dbe9e5 0%, #edf4f1 48%, #d2e1dc 100%);
}

.template-style-corporate.theme-spee {
  --corporate-band-start: #4a1320;
  --corporate-band-mid: #6c1c2b;
  --corporate-band-end: #8a1f29;
  --corporate-band-copy: rgba(244, 224, 229, 0.82);
  --corporate-panel-bg: #fff9fa;
  --corporate-panel-border: #e6cbd1;
  --corporate-ink: #4d1e26;
  --corporate-muted: #83525a;
  --corporate-accent: #8a1f29;
}

.template-style-corporate.theme-ibn {
  --corporate-band-start: #173934;
  --corporate-band-mid: #1f5750;
  --corporate-band-end: #2d7268;
  --corporate-band-copy: rgba(219, 239, 232, 0.82);
  --corporate-panel-bg: #f8fcfb;
  --corporate-panel-border: #cfe0da;
  --corporate-ink: #1d403b;
  --corporate-muted: #4a6963;
  --corporate-accent: #2d7268;
}

.template-style-corporate.theme-spee .print-header-band,
.template-style-corporate.theme-ibn .print-header-band {
  background: linear-gradient(135deg, var(--corporate-band-start) 0%, var(--corporate-band-mid) 58%, var(--corporate-band-end) 100%);
}

.template-style-corporate.theme-spee .print-header-band .print-title,
.template-style-corporate.theme-ibn .print-header-band .print-title {
  color: rgba(255, 255, 255, 0.24);
}

.template-style-corporate.theme-spee .print-header-band .print-block-label,
.template-style-corporate.theme-spee .print-header-band .print-meta-list span,
.template-style-corporate.theme-spee .print-header-band .print-company-trade,
.template-style-corporate.theme-spee .print-header-band .print-workspace-label,
.template-style-corporate.theme-spee .print-header-band .print-company-detail span,
.template-style-corporate.theme-ibn .print-header-band .print-block-label,
.template-style-corporate.theme-ibn .print-header-band .print-meta-list span,
.template-style-corporate.theme-ibn .print-header-band .print-company-trade,
.template-style-corporate.theme-ibn .print-header-band .print-workspace-label,
.template-style-corporate.theme-ibn .print-header-band .print-company-detail span {
  color: var(--corporate-band-copy);
}

.template-style-corporate.theme-spee .print-header-band .print-company-role,
.template-style-corporate.theme-ibn .print-header-band .print-company-role {
  background: rgba(255, 255, 255, 0.12);
}

.template-style-corporate.theme-spee .print-header-band .print-company-details,
.template-style-corporate.theme-ibn .print-header-band .print-company-details {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.template-style-corporate.theme-spee .print-subject,
.template-style-corporate.theme-spee .print-company-strip,
.template-style-corporate.theme-spee .print-footer,
.template-style-corporate.theme-spee .print-continuation-head,
.template-style-corporate.theme-ibn .print-subject,
.template-style-corporate.theme-ibn .print-company-strip,
.template-style-corporate.theme-ibn .print-footer,
.template-style-corporate.theme-ibn .print-continuation-head {
  border-color: var(--corporate-panel-border);
}

.template-style-corporate.theme-spee .print-subject h2,
.template-style-corporate.theme-spee .print-continuation-head strong,
.template-style-corporate.theme-spee .print-item-description strong,
.template-style-corporate.theme-spee .print-footer-page,
.template-style-corporate.theme-ibn .print-subject h2,
.template-style-corporate.theme-ibn .print-continuation-head strong,
.template-style-corporate.theme-ibn .print-item-description strong,
.template-style-corporate.theme-ibn .print-footer-page {
  color: var(--corporate-ink);
}

.template-style-corporate.theme-spee .print-project-section,
.template-style-corporate.theme-spee .print-notes,
.template-style-corporate.theme-spee .print-totals,
.template-style-corporate.theme-spee .print-block,
.template-style-corporate.theme-ibn .print-project-section,
.template-style-corporate.theme-ibn .print-notes,
.template-style-corporate.theme-ibn .print-totals,
.template-style-corporate.theme-ibn .print-block {
  background: var(--corporate-panel-bg);
  border-color: var(--corporate-panel-border);
}

.template-style-corporate.theme-spee .print-mode-note,
.template-style-corporate.theme-spee .print-copy-block,
.template-style-corporate.theme-spee .print-notes,
.template-style-corporate.theme-spee .print-item-description span,
.template-style-corporate.theme-ibn .print-mode-note,
.template-style-corporate.theme-ibn .print-copy-block,
.template-style-corporate.theme-ibn .print-notes,
.template-style-corporate.theme-ibn .print-item-description span {
  color: var(--corporate-muted);
}

.template-style-corporate.theme-spee .print-table th,
.template-style-corporate.theme-ibn .print-table th {
  border-bottom-color: var(--corporate-accent);
  color: var(--corporate-muted);
}

.template-style-corporate.theme-spee .print-table td,
.template-style-corporate.theme-ibn .print-table td {
  border-bottom-color: var(--corporate-panel-border);
}

.template-style-corporate.theme-spee .print-total-row.grand,
.template-style-corporate.theme-ibn .print-total-row.grand {
  border-top-color: var(--corporate-accent);
  color: var(--corporate-ink);
}

.print-document.template-style-premium.theme-spee {
  background: linear-gradient(135deg, #25181d 0%, #322128 48%, #1d1419 100%);
}

.print-document.template-style-premium.theme-ibn {
  background: linear-gradient(135deg, #172320 0%, #20302c 48%, #121b19 100%);
}

.template-style-premium.theme-spee {
  --premium-sheet-bg: #fffaf9;
  --premium-border: #dcc5c8;
  --premium-ink: #46202a;
  --premium-muted: #7b5b62;
  --premium-accent: #8a1f29;
  --premium-accent-soft: #f1e2e4;
  --premium-cover-start: #2b161c;
  --premium-cover-mid: #412028;
  --premium-cover-end: #1f1116;
  --premium-cover-copy: #ecd7db;
  --premium-cover-line: rgba(194, 154, 160, 0.34);
}

.template-style-premium.theme-ibn {
  --premium-sheet-bg: #fbfdfc;
  --premium-border: #d2dfda;
  --premium-ink: #213b36;
  --premium-muted: #5d7771;
  --premium-accent: #2d7268;
  --premium-accent-soft: #e3f0ed;
  --premium-cover-start: #15211f;
  --premium-cover-mid: #203230;
  --premium-cover-end: #101917;
  --premium-cover-copy: #d9ebe6;
  --premium-cover-line: rgba(153, 190, 181, 0.34);
}

.template-style-premium.theme-spee .print-sheet,
.template-style-premium.theme-ibn .print-sheet {
  background: var(--premium-sheet-bg);
}

.template-style-premium.theme-spee .print-header,
.template-style-premium.theme-spee .print-continuation-head,
.template-style-premium.theme-spee .print-subject,
.template-style-premium.theme-spee .print-company-strip,
.template-style-premium.theme-spee .print-footer,
.template-style-premium.theme-ibn .print-header,
.template-style-premium.theme-ibn .print-continuation-head,
.template-style-premium.theme-ibn .print-subject,
.template-style-premium.theme-ibn .print-company-strip,
.template-style-premium.theme-ibn .print-footer {
  border-color: var(--premium-border);
}

.template-style-premium.theme-spee .print-company-name,
.template-style-premium.theme-spee .print-subject h2,
.template-style-premium.theme-spee .print-continuation-head strong,
.template-style-premium.theme-spee .print-item-description strong,
.template-style-premium.theme-spee .print-total-row.grand,
.template-style-premium.theme-spee .print-footer-page,
.template-style-premium.theme-ibn .print-company-name,
.template-style-premium.theme-ibn .print-subject h2,
.template-style-premium.theme-ibn .print-continuation-head strong,
.template-style-premium.theme-ibn .print-item-description strong,
.template-style-premium.theme-ibn .print-total-row.grand,
.template-style-premium.theme-ibn .print-footer-page {
  color: var(--premium-ink);
}

.template-style-premium.theme-spee .print-title,
.template-style-premium.theme-ibn .print-title {
  color: color-mix(in srgb, var(--premium-accent) 24%, transparent);
}

.template-style-premium.theme-spee .print-company-role,
.template-style-premium.theme-ibn .print-company-role {
  background: var(--premium-accent-soft);
  color: var(--premium-accent);
}

.template-style-premium.theme-spee .print-workspace-label,
.template-style-premium.theme-spee .print-company-strip-item strong,
.template-style-premium.theme-spee .print-block-label,
.template-style-premium.theme-spee .print-meta-list span,
.template-style-premium.theme-spee .print-project-item span,
.template-style-premium.theme-ibn .print-workspace-label,
.template-style-premium.theme-ibn .print-company-strip-item strong,
.template-style-premium.theme-ibn .print-block-label,
.template-style-premium.theme-ibn .print-meta-list span,
.template-style-premium.theme-ibn .print-project-item span {
  color: color-mix(in srgb, var(--premium-accent) 72%, #8b97a6 28%);
}

.template-style-premium.theme-spee .print-company-details,
.template-style-premium.theme-spee .print-project-section,
.template-style-premium.theme-spee .print-notes,
.template-style-premium.theme-spee .print-totals,
.template-style-premium.theme-spee .print-block,
.template-style-premium.theme-ibn .print-company-details,
.template-style-premium.theme-ibn .print-project-section,
.template-style-premium.theme-ibn .print-notes,
.template-style-premium.theme-ibn .print-totals,
.template-style-premium.theme-ibn .print-block {
  background: color-mix(in srgb, var(--premium-sheet-bg) 78%, #ffffff 22%);
  border-color: var(--premium-border);
}

.template-style-premium.theme-spee .print-copy-block,
.template-style-premium.theme-spee .print-notes,
.template-style-premium.theme-spee .print-mode-note,
.template-style-premium.theme-spee .print-item-description span,
.template-style-premium.theme-ibn .print-copy-block,
.template-style-premium.theme-ibn .print-notes,
.template-style-premium.theme-ibn .print-mode-note,
.template-style-premium.theme-ibn .print-item-description span {
  color: var(--premium-muted);
}

.template-style-premium.theme-spee .print-table th,
.template-style-premium.theme-ibn .print-table th {
  border-bottom-color: var(--premium-accent);
  color: color-mix(in srgb, var(--premium-accent) 74%, #8b97a6 26%);
}

.template-style-premium.theme-spee .print-table td,
.template-style-premium.theme-ibn .print-table td {
  border-bottom-color: color-mix(in srgb, var(--premium-border) 78%, #f4f1ec 22%);
}

.template-style-premium.theme-spee .print-total-row,
.template-style-premium.theme-ibn .print-total-row {
  border-bottom-color: color-mix(in srgb, var(--premium-border) 76%, #f4f1ec 24%);
}

.template-style-premium.theme-spee .print-total-row.grand,
.template-style-premium.theme-ibn .print-total-row.grand {
  border-top-color: var(--premium-accent);
}

.print-cover-sheet.template-style-premium.theme-spee,
.print-cover-sheet.template-style-premium.theme-ibn {
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--premium-accent) 26%, transparent) 0%, transparent 32%),
    linear-gradient(160deg, var(--premium-cover-start) 0%, var(--premium-cover-mid) 55%, var(--premium-cover-end) 100%);
  color: var(--premium-cover-copy);
}

.print-cover-sheet.template-style-premium.theme-spee .print-cover-frame,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-frame {
  border-color: var(--premium-cover-line);
  background: linear-gradient(180deg, rgba(11, 14, 22, 0.22), rgba(11, 14, 22, 0.05));
}

.print-cover-sheet.template-style-premium.theme-spee .print-cover-logo-fallback,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-logo-fallback {
  border-color: var(--premium-cover-line);
  color: color-mix(in srgb, var(--premium-accent) 68%, #efe5d2 32%);
}

.print-cover-sheet.template-style-premium.theme-spee .print-cover-company,
.print-cover-sheet.template-style-premium.theme-spee .print-cover-kicker,
.print-cover-sheet.template-style-premium.theme-spee .print-cover-date,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-company,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-kicker,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-date {
  color: color-mix(in srgb, var(--premium-accent) 54%, #e8ddd0 46%);
}

.print-cover-sheet.template-style-premium.theme-spee .print-cover-copy h2,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-copy h2 {
  color: #f4ece2;
}

.print-cover-sheet.template-style-premium.theme-spee .print-cover-copy p,
.print-cover-sheet.template-style-premium.theme-ibn .print-cover-copy p {
  color: color-mix(in srgb, var(--premium-cover-copy) 82%, #ffffff 18%);
}

@media screen {
  .print-document {
    border-radius: 28px;
  }

  .print-sheet {
    border-radius: 22px;
  }
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    background: #fff;
  }

  .print-document {
    width: 210mm;
    max-width: 210mm;
    margin: 0;
    padding: 0;
    gap: 0;
    background: #fff;
  }

  .print-sheet {
    width: 210mm;
    box-shadow: none;
    border-radius: 0;
  }
}
