/* invoice-generator: styles only it uses, split out of site.css by scripts/split-css.mjs. */
.inline-fields { display: flex; gap: 8px; }
.inline-fields input { min-width: 0; }
.inline-fields input[type="color"] { width: 56px; flex: none; }
.inv-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.inv-form { display: flex; flex-direction: column; gap: 14px; }
.inv-group { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; gap: 12px; }
.inv-group legend { padding: 0 6px; font-family: var(--display); font-weight: 700; color: var(--ink); }
.inv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-logo-row { display: flex; gap: 8px; }
.inv-items { display: flex; flex-direction: column; gap: 10px; }
.inv-item { display: grid; grid-template-columns: minmax(0, 1fr) 64px 96px 32px; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.inv-item textarea { min-height: 40px; resize: vertical; }
.inv-tool .icon-btn { width: 32px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--paper); color: var(--slate); font-size: 1.2rem; cursor: pointer; }
.inv-tool .icon-btn:hover:not(:disabled) { color: var(--bad); border-color: var(--bad); }
.inv-tool .icon-btn:disabled { opacity: 0.4; cursor: default; }
.inv-totals-form { margin-top: 6px; }
.inv-preview-col { position: sticky; top: 84px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-preview { position: relative; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow-3); background: #fff; }
.inv-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; }
.inv-history li { display: flex; align-items: center; gap: 6px; }
.inv-history .icon-btn { width: 28px; height: 28px; margin-left: auto; font-size: 1rem; }
.inv-tool .link-button { padding: 0; border: 0; background: none; color: var(--signal-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 1000px) { .inv-layout { grid-template-columns: 1fr; } .inv-preview-col { position: static; } }
@media (max-width: 480px) { .inv-two { grid-template-columns: 1fr; } .inv-item { grid-template-columns: 1fr 1fr 32px; } .inv-item-desc { grid-column: 1 / -1; } }
.inv-sheet { --accent: #0f1d3a; transform-origin: top left; box-sizing: border-box; padding: 56px 60px; background: #fff; color: #1a2233; font-family: var(--text); font-size: 13px; line-height: 1.5; }
.inv-sheet p { margin: 0; }
.inv-s-head { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.inv-s-logo { display: block; max-width: 180px; max-height: 70px; margin-bottom: 12px; object-fit: contain; }
.inv-s-from-name { font-family: var(--display); font-size: 17px; font-weight: 700; color: #0f1d3a; }
.inv-s-muted { color: #5a6578; margin-top: 4px; }
.inv-s-placeholder { color: #6B7385; font-weight: 400; }
.inv-s-title { text-align: right; }
.inv-s-title h2 { margin: 0 0 12px; font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--accent); }
.inv-s-title dl { margin: 0; display: grid; gap: 2px; }
.inv-s-title dl div { display: flex; justify-content: flex-end; gap: 14px; }
.inv-s-title dt { color: #5a6578; }
.inv-s-title dd { margin: 0; min-width: 100px; font-weight: 600; }
.inv-s-parties { display: flex; justify-content: space-between; gap: 32px; margin: 36px 0 28px; }
.inv-s-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: #5a6578; margin-bottom: 4px !important; }
.inv-s-to-name { font-weight: 700; font-size: 15px; }
.inv-s-due { text-align: right; }
.inv-s-due-amount { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.inv-s-items { width: 100%; border-collapse: collapse; }
.inv-s-items th { padding: 9px 10px; text-align: left; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); }
.inv-s-items td { padding: 10px; border-bottom: 1px solid #e6e9ef; vertical-align: top; }
.inv-s-items .num { text-align: right; white-space: nowrap; width: 1%; }
.inv-s-totals { display: flex; justify-content: flex-end; margin-top: 14px; }
.inv-s-totals dl { margin: 0; min-width: 280px; }
.inv-s-totals dl div { display: flex; justify-content: space-between; gap: 24px; padding: 5px 10px; }
.inv-s-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.inv-s-total { border-top: 2px solid var(--accent); font-weight: 700; font-size: 15px; margin-top: 4px; padding-top: 8px !important; }
.inv-s-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; padding-top: 18px; border-top: 1px solid #e6e9ef; color: #3b4558; }
.inv-sheet[data-style="classic"] { font-family: Georgia, "Times New Roman", serif; }
.inv-sheet[data-style="classic"] .inv-s-title h2, .inv-sheet[data-style="classic"] .inv-s-from-name, .inv-sheet[data-style="classic"] .inv-s-due-amount { font-family: Georgia, "Times New Roman", serif; }
.inv-sheet[data-style="classic"] .inv-s-head { padding-bottom: 20px; border-bottom: 3px double var(--accent); }
.inv-sheet[data-style="classic"] .inv-s-items th { color: var(--accent); background: none; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.inv-sheet[data-style="minimal"] .inv-s-items th { color: #5a6578; background: none; border-bottom: 1px solid #1a2233; }
.inv-sheet[data-style="minimal"] .inv-s-title h2 { color: #1a2233; font-weight: 600; }
.inv-sheet[data-style="minimal"] .inv-s-due-amount { color: #1a2233; }
.inv-sheet[data-style="minimal"] .inv-s-total { border-top-width: 1px; border-top-color: #1a2233; }

@media print {
    body.inv-printing > :not(.inv-print-root) { display: none !important; }
    body.inv-printing { background: #fff; }
    .inv-print-root .inv-sheet { transform: none !important; width: 100% !important; min-height: 0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .inv-print-root .inv-s-items tr { break-inside: avoid; }
    .inv-print-root .inv-s-placeholder { visibility: hidden; }
}
.inv-print-root { display: none; }
body.inv-printing .inv-print-root { display: block; }
@media screen { body.inv-printing .inv-print-root { display: none; } }
.inv-tool input[type="color"] { width: 64px; height: 40px; padding: 3px; }
.pv-wrap.is-full > .inv-preview { padding: 24px; background: transparent; box-shadow: none; border-radius: 0; }
.pv-wrap.is-full .inv-sheet { margin: 0 auto; background: #fff; box-shadow: var(--shadow-3); }
