/* Invoice improvements (v2.9.0): status chip, More menu, payments, credit notes, reminders and the paper trail */
.iv-chip { white-space: normal; height: auto; min-height: 26px; padding: 4px 12px; line-height: 1.35; text-align: left; }
.iv-more-list { display: grid; gap: 8px; }
.iv-more-list .btn { justify-content: flex-start; text-align: left; }
.iv-more-list .btn .small { display: block; font-weight: 400; }
.iv-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.iv-sum .stat-val { font-size: 20px; }
.iv-pay.void .t { text-decoration: line-through; opacity: .7; }
.iv-row .main { min-width: 0; }
.iv-trail { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.iv-ev { border-left: 3px solid var(--border); padding-left: 10px; }
.iv-ev-payment, .iv-ev-stripe, .iv-ev-paid_in_full { border-left-color: var(--ok); }
.iv-ev-payment_void, .iv-ev-reopened, .iv-ev-deleted { border-left-color: var(--bad, #C62828); }
.iv-ev-credit_note, .iv-ev-reminder { border-left-color: var(--warn); }
.iv-ev-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.iv-ev-h .muted { margin-left: auto; }
.iv-ev .s { overflow-wrap: anywhere; }
.iv-bot { font-size: 11px; vertical-align: middle; }
.iv-preview { white-space: pre-wrap; font-size: 14px; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; max-height: 300px; overflow: auto; }
.iv-cn-doc .neg { color: var(--bad); }
.iv-link { overflow-wrap: anywhere; }
@media print { .iv-sections, .iv-chip { display: none !important; } }

/* v2.9.0: the invoice document's line table was squashed to one letter per line on a phone (fixed column widths wider than the card). */
@media (max-width: 560px) {
  .doc table.lines th, .doc table.lines td { padding: 6px 4px; }
  .doc table.lines th:nth-child(2), .doc table.lines td:nth-child(2) { width: 36px; }
  .doc table.lines th:nth-child(3), .doc table.lines td:nth-child(3),
  .doc table.lines th:nth-child(4), .doc table.lines td:nth-child(4) { width: 72px; }
}
