/* Invoice document - laid out to match the sample invoice format. */
.invoice-sheet {
  position: relative;
  width: 780px;
  max-width: 100%;
  min-height: 980px;
  padding: 16px 22px 22px;
  background-color: #fff;
  color: #000;
  font-family: 'Times New Roman', Times, serif;
  font-size: 13.5px;
  box-shadow: var(--shadow);
}

.invoice-no { text-align: right; font-style: italic; }
.invoice-date { text-align: right; font-style: italic; margin-bottom: 6px; }
.invoice-title { font-size: 30px; font-weight: 700; margin: 4px 0 26px; letter-spacing: .5px; }
.invoice-to { margin-bottom: 16px; line-height: 1.5; }
.invoice-to-name { font-weight: 700; font-size: 15px; }

.invoice-table { width: 86%; border-collapse: collapse; table-layout: fixed; }
.invoice-table th, .invoice-table td { border: 1px solid #c9d2dc; padding: 5px 8px; vertical-align: top; }
.invoice-table th { font-style: italic; font-weight: 700; text-align: left; background: rgba(255,255,255,.72); }
.invoice-table th.inv-item, .invoice-table td.inv-item { width: 7%; text-align: center; }
.invoice-table th.inv-desc, .invoice-table td.inv-desc { width: 55%; }
.invoice-table th.inv-amount, .invoice-table td.inv-amount { width: 18%; text-align: right; white-space: nowrap; }
.invoice-table th.inv-total, .invoice-table td.inv-total { width: 20%; text-align: right; white-space: nowrap; }
.invoice-table .inv-line { font-style: italic; line-height: 1.45; }
.invoice-table .inv-line-main { margin-bottom: 1px; }
.invoice-table tr.inv-grand td { padding-top: 7px; padding-bottom: 7px; }
.invoice-table tr.inv-grand td.inv-total { font-weight: 700; font-style: italic; }

.invoice-payment { margin-top: 22px; line-height: 1.5; }
.invoice-paid { margin-top: 10px; font-style: italic; }
.invoice-footer { margin-top: 40px; font-weight: 700; font-size: 12px; }

/* statement of account - matches the landlord's own statement layout */
.statement-sheet { padding: 20px 26px 26px; font-size: 13px; }
.st-date-top { text-align: right; font-style: italic; margin-bottom: 12px; }
.st-head { text-align: center; margin-bottom: 20px; }
.st-head-name { font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.st-head-line { line-height: 1.5; }
.st-customer { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; }
.st-customer-main { flex: 1; min-width: 0; }
.st-label { font-size: 12.5px; }
.st-customer-name { font-weight: 700; font-size: 14.5px; }
.st-customer-line { line-height: 1.45; }
.st-blank-line { line-height: 1.45; margin-top: 12px; }
.st-title-box { border: 1px solid #000; padding: 5px 30px; font-size: 14px; white-space: nowrap; margin-top: 16px; }
.st-rule { border-top: 1px solid #000; margin: 14px 0 10px; }
.st-table { width: 100%; border-collapse: collapse; }
.st-table th { font-weight: 700; text-align: right; padding: 0 12px 5px; }
.st-table th.st-period { text-align: left; }
.st-table th span { display: block; border-bottom: 1px solid #000; padding-bottom: 3px; }
.st-table td { padding: 2px 12px; }
.st-table td.st-period { text-align: right; }
.st-table td.st-num { text-align: right; }
.st-table td.st-date { text-align: right; white-space: nowrap; }
.st-table tr.st-total td { font-weight: 700; border-top: 1px solid #000; border-bottom: 4px double #000; padding-top: 6px; padding-bottom: 6px; }
.st-table td.st-empty { text-align: center; padding: 12px; font-style: italic; }
.st-payable { display: flex; justify-content: flex-end; align-items: baseline; gap: 48px; margin-top: 18px; }
.st-payable-label { font-weight: 700; font-size: 14.5px; }
.st-payable-value { font-weight: 700; font-size: 14.5px; border-bottom: 4px double #000; padding: 0 6px 3px; min-width: 140px; text-align: right; }

@media print {
  body { background: #fff; }
  .topbar, .tabs, .page-head, .no-print, .toast-host, .modal-overlay { display: none !important; }
  .page { padding: 0; max-width: none; }
  .preview-wrap { overflow: visible; }
  .invoice-sheet { box-shadow: none; width: 100%; min-height: auto; margin: 0; }
  @page { size: A4; margin: 12mm; }
}

@media screen {
  .invoice-sheet { margin: 0 auto; }
}