@page {
  size: A4 portrait;
  margin: 15mm 12mm;
}

body {
  font-family: Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.35;
  color: #111111;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  max-width: 820px;
}

.print-toolbar {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #faf8f4;
  border: 1px solid #ded8ce;
  border-radius: 10px;
}

.print-btn {
  padding: 9px 18px;
  background: #a63a12;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 9.5pt;
}

.print-btn:hover {
  background: #8a2e0c;
}

.sample-caption {
  font-size: 8pt;
  color: #555555;
  margin-bottom: 4px;
}

.top-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.header-box {
  flex: 1;
  border-collapse: collapse;
  width: 100%;
}

.header-box td {
  border: 1px solid #222222;
  padding: 5px 8px;
  font-size: 9pt;
  vertical-align: top;
}

.col-bank { width: 58%; }
.col-bik-lbl { width: 14%; }
.col-bik-val { width: 28%; }
.col-inn { width: 32%; }
.col-kpp { width: 26%; }

.sub-caption {
  font-size: 8pt;
  color: #555555;
}

.qr-box {
  width: 168px;
  text-align: center;
  border: 1px solid #222222;
  padding: 8px;
  font-size: 7.5pt;
  line-height: 1.25;
}

.qr-note {
  margin-top: 4px;
}

.invoice-title {
  font-size: 14pt;
  font-weight: bold;
  margin: 14px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #111111;
}

.party-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.party-table td {
  padding: 4px 0;
  vertical-align: top;
}

.party-label {
  width: 110px;
  font-weight: bold;
  color: #333333;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
}

.items-table th,
.items-table td {
  border: 1px solid #111111;
  padding: 6px 8px;
  font-size: 9pt;
}

.items-table th {
  background: #f3f1ec;
  text-align: center;
}

.col-num { width: 6%; }
.col-name { width: 54%; }
.col-qty { width: 10%; }
.col-unit { width: 10%; }
.col-price { width: 10%; }
.col-sum { width: 10%; }

.ta-center { text-align: center; }
.ta-right { text-align: right; }
.fw-bold { font-weight: bold; }
.fs-11 { font-size: 11pt; }

.totals-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.totals-table td {
  padding: 3px 6px;
  font-size: 9.5pt;
}

.col-tot-lbl { width: 80%; text-align: right; }
.col-tot-val { width: 20%; text-align: right; }

.words-block {
  margin: 10px 0 22px;
  padding: 10px 12px;
  background: #f8f6f1;
  border-left: 3px solid #a63a12;
  font-size: 9.5pt;
}

.words-amount {
  margin-top: 4px;
  font-weight: bold;
}

.words-tax {
  font-style: italic;
  color: #555555;
  font-size: 8.5pt;
  margin-top: 4px;
}

.signatures {
  width: 100%;
  border-collapse: collapse;
  margin-top: 26px;
}

.col-sign-left { width: 65%; }
.col-sign-right { width: 35%; text-align: right; }

.sign-line {
  border-bottom: 1px solid #111111;
  width: 180px;
  display: inline-block;
}

@media print {
  .no-print {
    display: none !important;
  }
  body {
    padding: 0;
  }
}
