/* ==========================================================================
   DESAIN NOTA A5 PORTRAIT CV. MANDIRI ASTA KENCANA (MANDIRI88)
   Ukuran Fisik: 148 mm x 210 mm (Native A5 Portrait)
   Didesain presisi untuk memaksimalkan kapasitas baris barang & keterbacaan tajam
   ========================================================================== */

:root {
  --nota-primary-blue: #0a3371;
  --nota-dark-blue: #07234f;
  --nota-brand-red: #e51b24;
  --nota-light-blue-bg: #ebf4fe;
  --nota-card-blue: #e3effd;
  --nota-total-bg: #dbeaff;
  --nota-text-dark: #0f172a;
  --nota-text-muted: #64748b;
  --nota-border-color: #cbd5e1;
}

/* ==========================================================================
   KERTAS NOTA A5 KONTAINER (148mm x 210mm)
   ========================================================================== */
.nota-paper {
  width: 148mm;
  min-height: 210mm;
  max-width: 148mm;
  padding: 4mm 5mm 3.5mm 5mm;
  /* Safe margin: 4mm atas, 5mm samping, 3.5mm bawah (aman dari batas fisik printer) */
  margin: 0 auto;
  background: #ffffff;
  box-sizing: border-box;
  position: relative;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--nota-text-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tampilan di layar editor (Screen Preview) */
.nota-paper.screen-preview {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

/* ==========================================================================
   1. HEADER TOKO & NOTA (DUA KOLOM SEJAJAR & HEMAT RUANG VERTIKAL)
   ========================================================================== */
.nota-header-layout {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
}

/* Kolom Kiri: Logo & Identitas Perusahaan */
.nota-brand-left {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.nota-logo-img {
  max-height: 82px;
  width: auto;
  height: auto;
  aspect-ratio: 1600 / 570;
  max-width: none;
  display: block;
  margin-top: -6px;
  margin-left: -4px;
  margin-bottom: 0;
  object-fit: contain;
}

.nota-brand-text {
  margin-top: 0;
}

.nota-company-name {
  font-size: 13.5px;
  font-weight: 900;
  color: #0b224e;
  letter-spacing: 0.2px;
  margin: 0 0 1px 0;
  text-transform: uppercase;
  line-height: 1.15;
}

.nota-company-sub {
  font-size: 8.5px;
  font-weight: 600;
  color: #334155;
  margin: 0;
  line-height: 1.25;
}

/* Kolom Kanan: NOTA Penjualan + Metadata + Card Kepada Yth */
.nota-header-right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  border-left: 1.5px solid #e2e8f0;
  padding-left: 10px;
}

.nota-title-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2px;
}

.nota-title-left-text {
  text-align: left;
}

.nota-main-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--nota-primary-blue);
  line-height: 0.95;
  letter-spacing: 0.4px;
  margin: 0;
}

.nota-sub-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--nota-primary-blue);
  margin: 1px 0 0 0;
  line-height: 1.1;
}

.nota-meta-table {
  font-size: 9px;
  margin-left: auto;
  margin-top: 1px;
  border-collapse: collapse;
}

.nota-meta-table td {
  padding: 0.5px 0;
  vertical-align: middle;
}

.nota-meta-label {
  text-align: left;
  color: var(--nota-text-dark);
  font-weight: 600;
  width: 36px;
  white-space: nowrap;
}

.nota-meta-colon {
  width: 8px;
  text-align: center;
  padding: 0 1px;
}

.nota-meta-val {
  text-align: left;
  color: var(--nota-text-dark);
  font-weight: 700;
}

/* Card Kepada Yth di Bawah Data Nota */
.nota-customer-card {
  background-color: var(--nota-light-blue-bg);
  border-radius: 6px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-grow: 1;
}

.customer-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nota-primary-blue);
  flex-shrink: 0;
}

.customer-icon-badge svg {
  width: 15px;
  height: 15px;
}

.customer-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.customer-to-label {
  font-size: 8px;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.customer-name {
  font-size: 11px;
  font-weight: 800;
  color: #0c2b5e;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-district {
  font-size: 8.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.customer-address {
  font-size: 8px;
  color: #334155;
  line-height: 1.2;
  white-space: pre-line;
}

/* ==========================================================================
   2. TABEL ITEM DENGAN WATERMARK
   ========================================================================== */
.nota-table-wrapper {
  position: relative;
  margin-bottom: 0;
}

/* Watermark Background */
.nota-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  opacity: 0.055;
  pointer-events: none;
  z-index: 1;
}

.nota-watermark img {
  width: 100%;
  height: auto;
}

.nota-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  position: relative;
  z-index: 2;
  font-size: 10px;
}

.nota-table thead tr {
  background-color: transparent;
}

.nota-table th {
  padding: 5.5px 4px;
  font-weight: 700;
  font-size: 10px;
  text-align: center;
  background-color: var(--nota-primary-blue);
  color: #ffffff;
  border-top: 1px solid var(--nota-primary-blue);
  border-bottom: 1px solid var(--nota-primary-blue);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  vertical-align: middle;
}

.nota-table th:first-child {
  border-left: 1px solid var(--nota-primary-blue);
  border-top-left-radius: 4px;
}

.nota-table th:last-child {
  border-right: 1px solid var(--nota-primary-blue);
  border-top-right-radius: 4px;
}

.nota-table th.th-left {
  text-align: left;
  padding-left: 6px;
}

.nota-table th.th-right {
  text-align: right;
  padding-right: 6px;
}

.nota-table td {
  padding: 5px 4px;
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  color: #0f172a;
  vertical-align: middle;
  background-color: rgba(255, 255, 255, 0.90);
  font-size: 10px;
  line-height: 1.35;
}

.nota-table td:first-child {
  border-left: 1px solid #cbd5e1;
}

.nota-table td.col-center {
  text-align: center;
}

.nota-table td.col-left {
  text-align: left;
  padding-left: 6px;
  font-weight: 600;
}

.nota-table td.col-right {
  text-align: right;
  padding-right: 6px;
}

/* Proporsi Lebar Kolom A5 (Total 100% dari Lebar Kertas) */
.col-no {
  width: 5.5%;
}

.col-code {
  width: 8.5%;
}

.col-name {
  width: 39%;
}

.col-qty {
  width: 8.5%;
}

.col-unit {
  width: 8.5%;
}

.col-price {
  width: 15%;
}

.col-total {
  width: 15%;
}

/* ==========================================================================
   3. KETERANGAN & RINGKASAN TOTAL (SUBTOTAL, PPN, GRAND TOTAL)
   ========================================================================== */
.nota-summary-section {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  position: relative;
  z-index: 2;
  margin-top: -1px;
}

.nota-terms-box {
  flex: 1.1;
  padding: 4px 8px 3px 0;
  font-size: 8px;
  line-height: 1.35;
  color: #334155;
}

.terms-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.terms-content {
  margin: 0;
  padding-left: 13px;
}

.terms-content li {
  margin-bottom: 1px;
}

.nota-calc-box {
  width: 44%;
  border-collapse: collapse;
  font-size: 9.5px;
}

.nota-calc-box td {
  padding: 2.5px 5px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}

.calc-label {
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  width: 55%;
  background-color: #ffffff;
}

.calc-val {
  text-align: right;
  font-weight: 600;
  color: #0f172a;
  background-color: #ffffff;
}

.calc-row-total td {
  background-color: var(--nota-total-bg);
  border-color: #93c5fd;
  padding: 3.5px 5px;
}

.calc-row-total .calc-total-label {
  font-size: 11px;
  font-weight: 900;
  color: var(--nota-primary-blue);
  letter-spacing: 0.3px;
}

.calc-row-total .calc-total-val {
  text-align: right;
  font-size: 11px;
  font-weight: 900;
  color: var(--nota-primary-blue);
  letter-spacing: 0.1px;
}

/* ==========================================================================
   4. TERBILANG BAR
   ========================================================================== */
.nota-terbilang-bar {
  background-color: #e2eeff;
  border-radius: 4px;
  padding: 3px 8px;
  margin: 4px 0 5px 0;
  font-size: 8.5px;
  color: #0f172a;
  position: relative;
  z-index: 2;
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.terbilang-tag {
  font-weight: 800;
  color: var(--nota-primary-blue);
  white-space: nowrap;
  font-size: 8.5px;
}

.terbilang-text {
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
  font-size: 8.5px;
  line-height: 1.25;
}

/* ==========================================================================
   5. METODE PEMBAYARAN, REKENING, & TANDA TANGAN / CAP
   ========================================================================== */
.nota-footer-info {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.85fr;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 5px;
  position: relative;
  z-index: 2;
}

/* Col 1: Metode Pembayaran Checklist */
.payment-method-box {
  display: flex;
  gap: 6px;
}

.icon-red-box {
  width: 28px;
  height: 28px;
  background-color: #ef4444;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-red-box svg {
  width: 15px;
  height: 15px;
}

.payment-method-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-title {
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1px;
}

.method-checkbox-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  font-weight: 600;
  color: #1e293b;
}

.custom-checkbox {
  width: 11px;
  height: 11px;
  border: 1.5px solid #0f172a;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  background-color: #ffffff;
}

.custom-checkbox.checked {
  background-color: var(--nota-primary-blue);
  border-color: var(--nota-primary-blue);
  color: #ffffff;
}

.custom-checkbox.checked::after {
  content: '✓';
}

.method-other-line {
  display: inline-block;
  border-bottom: 1px solid #1e293b;
  min-width: 45px;
  height: 10px;
}

/* Col 2: Bank Account Info */
.bank-account-box {
  display: flex;
  gap: 6px;
  border-right: 1px solid #e2e8f0;
  padding-right: 6px;
}

.icon-blue-box {
  width: 28px;
  height: 28px;
  background-color: var(--nota-primary-blue);
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue-box svg {
  width: 15px;
  height: 15px;
}

.bank-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bank-header-title {
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1px;
}

.bank-name {
  font-size: 9.5px;
  font-weight: 800;
  color: #0b2554;
}

.bank-account-num {
  font-size: 8.5px;
  color: #334155;
  font-weight: 600;
}

.bank-holder-name {
  font-size: 8px;
  color: #475569;
}

/* Col 3: Signature & Stempel Toko */
.signature-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 95px;
  position: relative;
}

.sig-title {
  font-size: 8.5px;
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 1px;
}

.sig-space {
  position: relative;
  width: 95px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sig-stamp-img {
  position: absolute;
  width: 80px;
  height: 80px;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  background: transparent !important;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), top 0.25s ease-out, left 0.25s ease-out, opacity 0.25s ease-out;
}

.sig-cashier-name {
  font-size: 8.5px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  border-top: 1.5px solid #0f172a;
  padding-top: 2px;
  width: 92%;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   6. FOOTER KONTAK & INFORMASI RESMI (ALAMAT, TELP, EMAIL)
   ========================================================================== */
.nota-bottom-bar {
  margin-top: auto;
  position: relative;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 5px 8px;
  background: #f1f5f9;
  border-top: 2px solid var(--nota-primary-blue);
  border-radius: 4px;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.footer-contact-item:first-child {
  flex: 1.25;
}

.footer-icon-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--nota-primary-blue);
}

.footer-icon-circle svg {
  width: 11px;
  height: 11px;
}

.footer-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.footer-label {
  font-size: 7.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.5px;
}

.footer-val {
  font-size: 8px;
  color: #0f172a;
  font-weight: 500;
  white-space: pre-line;
}

.footer-divider {
  width: 1px;
  height: 18px;
  background: #cbd5e1;
}

/* ==========================================================================
   7. KUITANSI PEMBAYARAN MODEL A (A5 PORTRAIT - SPJ BENDAHARA)
   Ukuran Fisik: 148 mm x 210 mm
   ========================================================================== */
.kuitansi-a5-paper {
  width: 148mm;
  min-height: 210mm;
  max-width: 148mm;
  padding: 4mm 5mm 3.5mm 5mm;
  margin: 0 auto;
  background: #ffffff;
  box-sizing: border-box;
  position: relative;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--nota-text-dark);
  display: flex;
  flex-direction: column;
}

.kuitansi-a5-paper.screen-preview {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.k-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--nota-primary-blue);
  padding-bottom: 6px;
  margin-bottom: 8px;
  position: relative;
}

.k-header::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 38px;
  height: 2px;
  background: var(--nota-brand-red);
}

.k-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 62%;
}

.k-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.k-brand-text h2 {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--nota-primary-blue);
  letter-spacing: 0.2px;
  line-height: 1.1;
  margin: 0 0 1.5px 0;
}

.k-brand-text p {
  font-size: 7.2px;
  color: #475569;
  line-height: 1.25;
  margin: 0;
}

.k-doc-meta {
  text-align: right;
}

.k-doc-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--nota-dark-blue);
  letter-spacing: 1.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.k-doc-sub {
  font-size: 7.5px;
  font-weight: 700;
  color: var(--nota-brand-red);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.k-meta-table {
  font-size: 8px;
  border-collapse: collapse;
  margin-left: auto;
}

.k-meta-table td {
  padding: 1px 0;
}

.k-meta-lbl {
  color: #64748b;
  text-align: left;
  width: 48px;
}

.k-meta-val {
  font-weight: 700;
  color: var(--nota-text-dark);
  text-align: right;
  padding-left: 5px;
}

.k-field-group {
  margin-bottom: 6px;
}

.k-row {
  display: flex;
  margin-bottom: 4px;
  font-size: 8.8px;
  line-height: 1.35;
}

.k-row-lbl {
  width: 105px;
  flex-shrink: 0;
  font-weight: 600;
  color: #475569;
}

.k-row-sep {
  width: 10px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 700;
  color: #475569;
}

.k-row-val {
  flex: 1;
  font-weight: 600;
  color: var(--nota-text-dark);
}

.k-row-val.strong-name {
  font-weight: 800;
  color: var(--nota-dark-blue);
  font-size: 9.5px;
  text-transform: uppercase;
}

.terbilang-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3px solid var(--nota-primary-blue);
  border-radius: 4px;
  padding: 5px 8px;
  margin: 5px 0 7px 0;
}

.terbilang-header {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.terbilang-text {
  font-size: 9px;
  font-style: italic;
  font-weight: 700;
  color: var(--nota-primary-blue);
  line-height: 1.3;
}

.k-rincian-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
  margin: 6px 0 8px 0;
  background: #ffffff;
}

.k-rincian-table th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  font-weight: 700;
  color: var(--nota-dark-blue);
  text-align: left;
}

.k-rincian-table th.tar {
  text-align: right;
}

.k-rincian-table td {
  border: 1px solid #cbd5e1;
  padding: 3px 6px;
  color: var(--nota-text-dark);
}

.k-rincian-table td.tar {
  text-align: right;
  font-weight: 600;
}

.k-rincian-table tr.total-row td {
  background: #eff6ff;
  font-weight: 800;
  color: var(--nota-primary-blue);
  border-top: 1.5px solid var(--nota-primary-blue);
}

/* Watermark LUNAS Diagonal Besar di Bawah Rincian Transaksi */
.k-watermark-lunas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 4px 0;
  pointer-events: none;
  user-select: none;
}

.k-watermark-lunas-stamp {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 7px;
  color: rgba(220, 38, 38, 0.28);
  border: 3px solid rgba(220, 38, 38, 0.28);
  box-shadow: 0 0 0 1.5px rgba(220, 38, 38, 0.28);
  border-radius: 4px;
  padding: 2px 20px 2px 28px;
  text-transform: uppercase;
  transform: rotate(-10deg);
  display: inline-block;
  line-height: 1.1;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
}

.k-bottom-section {
  margin-top: auto;
  border-top: 1px dashed #cbd5e1;
  padding-top: 7px;
}

.k-sign-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.k-nominal-card {
  position: relative;
  margin-top: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.2px solid #cbd5e1;
  border-left: 4px solid var(--nota-primary-blue);
  border-radius: 4px;
  padding: 6px 14px;
  display: inline-block;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.k-nominal-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 22px;
  height: 2.5px;
  background: #d97706;
  border-radius: 2px 0 0 0;
}

.k-nominal-lbl {
  font-size: 7.2px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.k-nominal-lbl::before {
  content: '◆';
  color: #d97706;
  font-size: 6px;
}

.k-nominal-val {
  font-size: 16px;
  font-weight: 900;
  color: var(--nota-dark-blue);
  letter-spacing: 0.3px;
  line-height: 1.15;
}

.k-sign-box {
  width: 145px;
  text-align: center;
  position: relative;
  margin-right: 42px;
}

.k-sign-date {
  font-size: 8px;
  color: #475569;
  margin-bottom: 2px;
}

.k-sign-role {
  font-size: 8.2px;
  font-weight: 700;
  color: var(--nota-dark-blue);
  margin-bottom: 4px;
}

.k-sign-space {
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Jika menggunakan materai, tambah tinggi area 30% (48px * 1.30 = 62.4px) */
.k-sign-space.has-meterai {
  height: 62.4px;
}

.k-meterai-box {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 48px;
  height: 38px;
  border: 1px dashed #94a3b8;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 6.5px;
  color: #94a3b8;
  text-transform: uppercase;
  line-height: 1.1;
  font-weight: 600;
}

.k-sign-space.has-meterai .k-meterai-box {
  width: 56px;
  height: 52px;
  top: 5px;
  font-size: 7.2px;
}

.k-sign-space.has-meterai .k-stamp-img {
  top: -10px;
}

.k-stamp-img {
  position: absolute;
  width: 80px;
  height: 80px;
  top: -16px;
  right: -4px;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  background: transparent !important;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), top 0.25s ease-out, left 0.25s ease-out;
}

.k-sign-name {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--nota-text-dark);
  border-top: 1.2px solid var(--nota-text-dark);
  padding-top: 2px;
  display: inline-block;
  width: 100%;
  text-transform: uppercase;
}

.k-footer-note {
  font-size: 6.8px;
  color: #94a3b8;
  margin-top: 6px;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 3px;
}

/* ==========================================================================
   8. PRINT MEDIA RULES (@media print) - NATIVE A5 PORTRAIT (148mm x 210mm)
   ========================================================================== */
@media print {
  @page {
    size: A5 portrait;
    margin: 0mm !important;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    width: 148mm !important;
    height: 210mm !important;
  }

  /* Sembunyikan SEMUA elemen antarmuka aplikasi saat dicetak */
  .no-print,
  .app-sidebar,
  .app-topbar,
  .app-header,
  .app-editor-pane,
  .app-modal,
  .preview-toolbar,
  .toast-container {
    display: none !important;
  }

  /* Sembunyikan view section selain editor */
  .view-section {
    display: none !important;
  }

  /* Tampilkan hanya view editor */
  .view-section#view-editor {
    display: block !important;
    overflow: hidden !important;
    height: auto !important;
  }

  .editor-split-container {
    display: block !important;
    overflow: hidden !important;
  }

  .app-editor-pane {
    display: none !important;
  }

  .app-preview-pane {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    display: block !important;
    overflow: hidden !important;
    width: 148mm !important;
    height: 210mm !important;
    min-height: unset !important;
    max-height: 210mm !important;
  }

  /* Hilangkan scrollbar */
  *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .nota-paper,
  .kuitansi-a5-paper {
    width: 148mm !important;
    height: 210mm !important;
    max-height: 210mm !important;
    padding: 4mm 5mm 3.5mm 5mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Kontrol cetak dokumen aktif */
  body.print-doc-kuitansi .nota-paper {
    display: none !important;
  }

  body.print-doc-kuitansi .kuitansi-a5-paper {
    display: flex !important;
  }

  body.print-doc-nota .kuitansi-a5-paper {
    display: none !important;
  }

  body.print-doc-nota .nota-paper {
    display: flex !important;
  }

  .nota-bottom-bar {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    border-top: 2px solid var(--nota-primary-blue) !important;
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}