/* Compact view (summary.js): a sheet of paper, light in both themes. */
.sum-buttons { display: flex; gap: 8px; }
.sum-sheet {
  background: #fff; color: #1b1f25; border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 22px; font-size: 13px; line-height: 1.4;
}
.sum-sheet table { font-size: 13px; width: 100%; }
.sum-sheet th, .sum-sheet td { padding: 3px 6px; border-bottom: 1px solid #e6e9ee; white-space: normal; vertical-align: top; }
.sum-sheet th { color: #646d7a; font-weight: 500; }
.sum-sheet td.num, .sum-sheet th.num { white-space: nowrap; }
.sum-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.sum-top > * { flex: 1 1 200px; min-width: 0; }
.sum-label { color: #646d7a; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 2px; }
.sum-party .sum-label { margin-top: 0; }
.sum-small, .sum-descr { color: #646d7a; font-size: 12px; }
.sum-descr { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sum-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 0 0 10px; }
.sum-type { margin: 0; font-size: 18px; }
.sum-code { color: #646d7a; font-size: 12px; font-weight: 400; }
.sum-scroll { overflow-x: auto; }
.sum-meta th { width: 40%; padding-left: 0; }
.sum-meta td { overflow-wrap: anywhere; }
.sum-meta tr:last-child td, .sum-meta tr:last-child th { border-bottom: 0; }
.sum-lines { margin-top: 4px; }
.sum-lines thead th { border-bottom: 1px solid #b9c0ca; }
.sum-item { min-width: 160px; }
.sum-lines td:first-child { max-width: 7em; overflow-wrap: anywhere; color: #646d7a; }
.sum-pay th { width: 30%; }
.sum-ac td { color: #646d7a; }
.sum-two { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; }
.sum-two > :first-child { flex: 3 1 280px; }
.sum-two > :last-child { flex: 2 1 220px; }
.sum-totals th { text-align: left; }
.sum-totals tr:last-child td, .sum-totals tr:last-child th { border-bottom: 0; }
.sum-due th, .sum-due td { font-weight: 700; color: #1b1f25; border-top: 1px solid #b9c0ca; }
.sum-notes { white-space: pre-line; font-size: 12px; }
.sum-foot { color: #646d7a; font-size: 11px; max-width: 26em; text-align: right; }
#print-root { display: none; }
@media (max-width: 520px) {
  .sum-sheet { padding: 14px 12px; }
  .sum-foot { text-align: left; }
}

@media print {
  @page { size: A4; margin: 10mm 12mm; }
  body.print-sum { background: #fff; }
  body.print-sum > :not(#print-root) { display: none !important; }
  body.print-sum #print-root { display: block; }
  #print-root .sum-sheet { border: 0; border-radius: 0; padding: 0; font-size: 9pt; line-height: 1.3; }
  #print-root .sum-scroll { overflow: visible; }
  #print-root .sum-sheet table { font-size: 9pt; }
  #print-root .sum-sheet th, #print-root .sum-sheet td { padding: 1.5px 4px; }
  #print-root .sum-top { flex-wrap: nowrap; margin-bottom: 8px; }
  #print-root .sum-label { margin-top: 6px; }
  #print-root .sum-title { margin-bottom: 6px; }
  #print-root .sum-lines tr { break-inside: avoid; }
  #print-root .sum-lines thead { display: table-header-group; }
  #print-root .sum-descr { -webkit-line-clamp: 1; line-clamp: 1; }
}
