/* Notice Sheet Styling - Screen Preview & A4 Print */
@page {
  size: A4 portrait;
  margin: 12mm;
}

#sheet-wrapper #print-notice,
.a4-sheet-wrapper #print-notice {
  display: block;
}

#print-notice {
  width: 100%;
  font-size: 11pt;
  line-height: 1.35;
  box-sizing: border-box;
  color: #000000;
  font-family: Arial, "Segoe UI", sans-serif;
}

#print-notice h1, #print-notice h2, #print-notice p { margin: 0; }
#print-notice .notice-kicker { font-size: 10pt; letter-spacing: 1.2pt; font-weight: 700; text-transform: uppercase; color: #334155; }
#print-notice h1 { font-size: 24pt; line-height: 1.12; margin: 2mm 0; font-weight: 800; }
#print-notice .notice-address { font-size: 19pt; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; color: #0f172a; }
#print-notice .notice-period { margin-top: 3mm; font-size: 11pt; color: #1e293b; }
#print-notice .notice-header { padding-bottom: 5mm; border-bottom: 2pt solid #000; }
#print-notice .notice-consumption { margin: 4mm 0; font-size: 13pt; }
#print-notice .notice-consumption strong { font-size: 19pt; white-space: nowrap; color: #000; }

#print-notice .notice-metrics { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 5mm; }
#print-notice .notice-metrics td { width: 33.33%; border: 1pt solid #000; padding: 4mm 3mm; vertical-align: top; }
#print-notice .notice-metric-label { display: block; font-size: 10pt; min-height: 10mm; font-weight: 500; }
#print-notice .notice-metric-value { display: block; font-size: 22pt; line-height: 1.15; font-weight: 800; white-space: nowrap; }
#print-notice .notice-unit { display: block; font-size: 10pt; margin-top: 1mm; font-weight: 600; }

#print-notice .notice-qr-section { display: table; width: 100%; table-layout: fixed; border-bottom: 1pt solid #000; padding-bottom: 5mm; margin-bottom: 5mm; }
#print-notice .notice-qr-copy { display: table-cell; vertical-align: middle; padding-right: 7mm; }
#print-notice .notice-qr-copy h2 { font-size: 20pt; line-height: 1.2; margin-bottom: 3mm; font-weight: 800; }
#print-notice .notice-qr-copy p { font-size: 10.5pt; line-height: 1.4; }
#print-notice .notice-qr-cell { display: table-cell; vertical-align: middle; width: 72mm; text-align: center; }
#print-notice #notice-qr { width: 72mm; height: 72mm; padding: 4mm; background: #fff !important; margin: 0 auto; }
#print-notice #notice-qr canvas { display: block !important; width: 64mm !important; height: 64mm !important; margin: 0 auto; }
#print-notice #notice-qr img { display: none !important; }
#print-notice .notice-link { font-size: 9pt; overflow-wrap: anywhere; margin-top: 3mm; color: #334155; font-weight: 600; }

#print-notice .notice-debts h2 { font-size: 14pt; margin-bottom: 2mm; font-weight: 800; }
#print-notice .notice-debts table { border-collapse: collapse; width: 100%; font-size: 11pt; table-layout: fixed; }
#print-notice .notice-debts th, #print-notice .notice-debts td { border-bottom: .5pt solid #000; padding: 1.7mm 2mm; text-align: left; }
#print-notice .notice-debts th:last-child, #print-notice .notice-debts td:last-child { text-align: right; }
#print-notice .notice-debts td { overflow-wrap: anywhere; }
#print-notice .notice-note { font-size: 9pt; margin-top: 2mm; color: #475569; }

#print-notice .notice-tariff-banner {
  border: 1.5pt solid #000;
  border-radius: 4px;
  padding: 2.5mm 3.5mm;
  margin: 3mm 0;
  background: #f8fafc;
}
#print-notice .notice-tariff-header {
  font-size: 10.5pt;
  font-weight: 800;
  margin-bottom: 1.5mm;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#print-notice .notice-tariff-badge {
  font-size: 8.5pt;
  border: 1pt solid #000;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 800;
}
#print-notice .notice-tariff-text {
  font-size: 8.8pt;
  line-height: 1.35;
  color: #1e293b;
}

#print-notice .notice-footer { margin-top: 4mm; padding-top: 2.5mm; border-top: 1pt solid #000; font-size: 8.5pt; color: #334155; }
#print-notice .notice-footer span { float: right; font-weight: 600; }

#print-notice section, #print-notice table, #print-notice tr, #print-notice header, #print-notice footer {
  break-inside: avoid;
}

@media print {
  html, body {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }
  
  body > * {
    display: none !important;
  }
  
  body > .sheet-preview-container,
  body > .sheet-preview-container .a4-sheet-wrapper,
  body > .sheet-preview-container .a4-sheet-wrapper #print-notice {
    display: block !important;
  }

  .operator-bar,
  .print-hint {
    display: none !important;
  }

  #print-notice, #print-notice * {
    box-sizing: border-box;
    color: #000000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #000000 !important;
    font-family: Arial, "Segoe UI", sans-serif;
    animation: none !important;
  }
}
