/* Invoice Generator: deliberately scoped to preserve Mavensum's shared theme. */
.inv-page { --invoice-accent:var(--brand); background:var(--slate-50); }
.inv-main { padding:38px 0 94px; }
.inv-workspace { display:grid; grid-template-columns:minmax(0,465px) minmax(0,1fr); align-items:start; gap:25px; }
.inv-panel,.inv-preview-panel { background:#fff; border:1px solid var(--slate-200); border-radius:var(--radius-lg); box-shadow:0 10px 35px rgba(15,23,42,.045); min-width:0; }
.inv-editor { overflow:hidden; }
.inv-editor-head { padding:25px 25px 16px; }
.inv-editor-head h2,.inv-preview-head h2 { color:var(--slate-900); font-size:1.45rem; line-height:1.25; font-weight:700; letter-spacing:-.035em; margin:6px 0; }
.inv-editor-head p,.inv-preview-head p { color:var(--slate-500); font-size:.78rem; line-height:1.6; }
.inv-kicker { font-size:.66rem; letter-spacing:.12em; font-weight:700; color:var(--brand); }
.inv-editor-actions { display:flex; gap:9px; padding:0 25px 20px; flex-wrap:wrap; }
.inv-small-btn,.inv-text-btn { border:0; font-family:'Poppins',sans-serif; font-weight:600; cursor:pointer; }
.inv-small-btn { background:var(--slate-100); color:var(--slate-700); padding:9px 13px; border:1px solid var(--slate-200); border-radius:8px; font-size:.71rem; }
.inv-small-btn:hover { color:var(--brand); border-color:var(--brand-100); background:var(--brand-50); }
.inv-text-btn { background:transparent; color:var(--slate-500); padding:8px 2px; font-size:.7rem; text-decoration:underline; text-underline-offset:2px; }
.inv-text-btn:hover { color:var(--red); }
.inv-section { border-top:1px solid var(--slate-200); }
.inv-section > summary { padding:19px 24px; display:flex; align-items:center; gap:12px; cursor:pointer; list-style:none; color:var(--slate-800); font-family:'Space Grotesk',sans-serif; font-size:.91rem; font-weight:700; }
.inv-section > summary::-webkit-details-marker { display:none; }
.inv-section > summary:focus-visible,.inv-small-btn:focus-visible,.inv-text-btn:focus-visible,.inv-upload-btn:focus-visible,.inv-primary-btn:focus-visible,.inv-secondary-btn:focus-visible,.inv-add-item:focus-visible,.inv-remove-item:focus-visible { outline:3px solid var(--brand-200); outline-offset:2px; }
.inv-section-number { font-size:.66rem; background:var(--brand-50); color:var(--brand); padding:6px 7px; border-radius:7px; min-width:27px; text-align:center; }
.inv-chevron { margin-left:auto; width:8px; height:8px; border-bottom:2px solid var(--slate-400); border-right:2px solid var(--slate-400); transform:rotate(45deg); transition:transform .2s; }
.inv-section[open] .inv-chevron { transform:rotate(225deg); }
.inv-section-body { padding:0 24px 23px; display:grid; gap:14px; }
.inv-field { display:flex; flex-direction:column; min-width:0; gap:6px; }
.inv-field label { font-size:.72rem; font-weight:600; color:var(--slate-700); }
.inv-field label span[aria-hidden=true] { color:var(--red); }
.inv-optional { font-weight:400; color:var(--slate-400); margin-left:5px; }
.inv-field input:not([type=radio]):not([type=file]),.inv-field textarea,.inv-field select,.inv-item input { min-width:0; width:100%; border:1px solid var(--slate-200); border-radius:9px; padding:10px 11px; background:#fff; color:var(--slate-900); font:400 .78rem/1.45 'Poppins',sans-serif; outline:0; transition:border-color .2s,box-shadow .2s; }
.inv-field input::placeholder,.inv-field textarea::placeholder,.inv-item input::placeholder { color:#94a3b8; }
.inv-field input:focus,.inv-field textarea:focus,.inv-field select:focus,.inv-item input:focus { border-color:var(--brand-mid) !important; box-shadow:0 0 0 3px rgba(60,63,222,.12); }
.inv-field input[aria-invalid="true"] { border-color:var(--red); }
.inv-field textarea { resize:vertical; }
.inv-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.inv-hint { font-size:.675rem; color:var(--slate-500); line-height:1.65; }
.inv-logo-row { display:flex; align-items:center; gap:14px; padding:13px; border-radius:10px; border:1px dashed var(--slate-300); background:var(--slate-50); }
.inv-logo-box { flex:0 0 83px; width:83px; height:72px; border-radius:9px; background:#fff; border:1px solid var(--slate-200); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.inv-logo-box span { color:var(--slate-400); font-family:'Space Grotesk',sans-serif; font-size:.72rem; text-align:center; }
.inv-logo-box img { display:block; width:100%; height:100%; object-fit:contain; padding:4px; }
.inv-logo-box img[hidden] { display:none; }
.inv-logo-actions { min-width:0; display:flex; flex-direction:column; align-items:start; gap:5px; }
.inv-logo-actions input[type=file] { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.inv-upload-btn { display:inline-block; border-radius:8px; cursor:pointer; font-size:.73rem; padding:8px 10px; font-weight:600; background:#fff; color:var(--brand); border:1px solid var(--brand-100); font-family:'Poppins',sans-serif; }
.inv-upload-btn:hover { background:var(--brand-50); }
.inv-logo-actions small { color:var(--slate-400); line-height:1.5; font-size:.62rem; }
.inv-colors { display:flex; flex-wrap:wrap; gap:13px; padding:5px 0 0; }
.inv-colors label { display:flex; flex-direction:column; align-items:center; gap:5px; cursor:pointer; }
.inv-colors input { position:absolute; opacity:0; width:1px; height:1px; }
.inv-colors span { display:block; height:31px; width:31px; border-radius:50%; background:var(--swatch); border:3px solid #fff; box-shadow:0 0 0 1px var(--slate-300); }
.inv-colors input:checked + span { box-shadow:0 0 0 3px var(--slate-800); }
.inv-colors input:focus-visible + span { box-shadow:0 0 0 3px var(--brand-mid),0 0 0 5px white; }
.inv-colors small { font-size:.62rem; color:var(--slate-500); }
.inv-items-head,.inv-item { display:grid; grid-template-columns:minmax(0,2.15fr) minmax(57px,.65fr) minmax(80px,.9fr) 30px; gap:6px; align-items:center; }
.inv-items-head { color:var(--slate-500); font-size:.65rem; font-weight:600; padding:0 2px; }
.inv-items { display:grid; gap:10px; }
.inv-item { align-items:start; }
.inv-item label { display:none; }
.inv-item input { padding:10px 7px; font-size:.7rem; }
.inv-item .inv-line-total { grid-column:1 / -1; color:var(--slate-500); text-align:right; font-size:.66rem; margin:0 32px 0 0; line-height:1.2; }
.inv-remove-item { width:29px; height:37px; padding:0; border:1px solid var(--slate-200); border-radius:8px; background:#fff; color:var(--slate-400); font-size:1.1rem; line-height:1; cursor:pointer; }
.inv-remove-item:hover { color:var(--red); border-color:var(--red-light); background:var(--red-bg); }
.inv-add-item { display:flex; align-items:center; justify-content:center; gap:8px; padding:11px; border:1.5px dashed var(--brand-100); background:var(--brand-50); color:var(--brand); border-radius:10px; font:600 .76rem 'Poppins',sans-serif; cursor:pointer; }
.inv-add-item:hover { border-color:var(--brand-mid); background:var(--brand-light); }
.inv-add-item span { font-size:1.2rem; }
.inv-add-item:disabled { opacity:.45; cursor:not-allowed; }
.inv-draft-panel { background:var(--slate-50); padding:22px 24px; }
.inv-draft-panel strong { font-family:'Space Grotesk',sans-serif; font-size:.86rem; }
.inv-draft-panel p { color:var(--slate-500); font-size:.69rem; line-height:1.6; padding-top:4px; }
.inv-draft-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:13px; }
.inv-preview-panel { position:sticky; top:83px; padding:22px; }
.inv-preview-head { display:flex; justify-content:space-between; align-items:start; gap:12px; margin-bottom:15px; }
.inv-status-pill { background:#fff7ed; color:#b45309; border:1px solid #fed7aa; font-size:.67rem; font-weight:700; padding:5px 10px; border-radius:100px; white-space:nowrap; }
.inv-status-pill.paid { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.inv-status-pill.partial { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.inv-preview-actions { display:grid; grid-template-columns:1.25fr 1fr; gap:10px; margin-bottom:12px; }
.inv-primary-btn,.inv-secondary-btn { display:inline-flex; justify-content:center; align-items:center; gap:8px; padding:13px 10px; border-radius:9px; font:600 .76rem 'Poppins',sans-serif; cursor:pointer; }
.inv-primary-btn { color:#fff; background:var(--brand); border:1px solid var(--brand); }
.inv-primary-btn:hover { background:var(--brand-dark); }
.inv-primary-btn:disabled { opacity:.6; cursor:wait; }
.inv-secondary-btn { border:1px solid var(--slate-200); background:#fff; color:var(--slate-700); }
.inv-secondary-btn:hover { border-color:var(--brand-100); color:var(--brand); }
.inv-primary-btn svg,.inv-secondary-btn svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.inv-message { min-height:0; margin-bottom:10px; font-size:.73rem; line-height:1.5; }
.inv-message:empty { display:none; }
.inv-message.error { color:#9f1239; border:1px solid var(--red-light); border-radius:8px; padding:10px; background:var(--red-bg); }
.inv-message.ok { color:#166534; border:1px solid var(--green-light); border-radius:8px; padding:10px; background:var(--green-bg); }
.inv-preview-scroll { background:#edf1f8; border:1px solid #e1e7f0; padding:14px; border-radius:12px; overflow:auto; }
.inv-privacy-hint { font-size:.67rem; line-height:1.7; color:var(--slate-500); margin-top:13px; }
/* The document is a real HTML preview; PDF is rendered from the same state client-side. */
.inv-sheet { --invoice-accent:var(--brand); min-height:718px; background:#fff; border-top:7px solid var(--invoice-accent); padding:32px 30px 25px; box-shadow:0 8px 26px rgba(15,23,42,.065); color:#1e293b; font-family:'Poppins',sans-serif; font-size:10px; }
.inv-sheet * { overflow-wrap:anywhere; }
.inv-sheet-top { display:flex; justify-content:space-between; align-items:start; gap:22px; padding-bottom:29px; border-bottom:1px solid #e2e8f0; }
.inv-sheet-brand { display:flex; flex-direction:column; align-items:start; max-width:57%; min-width:0; }
.inv-sheet-brand img { display:block; width:auto; max-width:155px; height:auto; max-height:68px; object-fit:contain; object-position:left center; margin-bottom:11px; }
.inv-sheet-brand img[hidden] { display:none; }
.inv-sheet-brand > strong { font:700 16px/1.3 'Space Grotesk',sans-serif; color:#0f172a; }
.inv-sheet-small { white-space:pre-line; font-size:9px; color:#64748b; margin-top:6px; line-height:1.65; }
.inv-sheet-invoice-title { text-align:right; min-width:0; }
.inv-sheet-invoice-title h2 { color:var(--invoice-accent); font-size:27px; line-height:1.1; letter-spacing:.055em; margin:2px 0 11px; font-weight:700; }
.inv-sheet-invoice-title span { font-size:10px; font-weight:600; color:#334155; }
.inv-sheet-parties { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:19px; padding:27px 0 28px; }
.inv-sheet-label { display:block; color:var(--invoice-accent); font-weight:700; letter-spacing:.13em; font-size:8px; margin-bottom:9px; }
.inv-sheet-parties strong { color:#0f172a; font-size:11px; }
.inv-sheet-date-box { border:1px solid #e2e8f0; background:#f8fafc; padding:13px; border-radius:10px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.inv-sheet-date-box div { display:grid; gap:2px; }
.inv-sheet-date-box div span { color:#64748b; font-size:8px; }
.inv-sheet-date-box div strong { color:#0f172a; font-size:9px; }
.inv-sheet-table { border-collapse:collapse; width:100%; table-layout:fixed; }
.inv-sheet-table th { padding:11px 8px; background:var(--invoice-accent); color:#fff; text-align:right; font-weight:600; font-size:8px; }
.inv-sheet-table th:first-child { text-align:left; width:50%; border-radius:5px 0 0 0; }
.inv-sheet-table th:last-child { border-radius:0 5px 0 0; }
.inv-sheet-table th:nth-child(2) { width:11%; }
.inv-sheet-table th:nth-child(3) { width:19%; }
.inv-sheet-table th:nth-child(4) { width:20%; }
.inv-sheet-table td { padding:13px 8px; border-bottom:1px solid #e2e8f0; color:#334155; text-align:right; font-size:9px; vertical-align:top; }
.inv-sheet-table td:first-child { text-align:left; color:#0f172a; font-weight:500; }
.inv-sheet-totals { width:56%; min-width:220px; margin:22px 0 26px auto; display:grid; gap:10px; }
.inv-sheet-totals > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:10px; }
.inv-sheet-totals > div > span { color:#64748b; }
.inv-sheet-totals > div > strong { font-weight:600; color:#0f172a; font-size:10px; white-space:nowrap; }
.inv-sheet-totals > .inv-sheet-total { margin-top:4px; padding:13px 0 10px; border-top:2px solid #e2e8f0; }
.inv-sheet-totals > .inv-sheet-total strong { font:700 16px 'Space Grotesk',sans-serif; color:var(--invoice-accent); }
.inv-sheet-totals > .inv-sheet-balance { background:#f0f0fe; padding:11px 13px; border-radius:7px; }
.inv-sheet-totals > .inv-sheet-balance span,.inv-sheet-totals > .inv-sheet-balance strong { color:#1e2090; font-weight:700; }
.inv-sheet-bottom { display:grid; gap:14px; padding:12px 0 20px; border-top:1px solid #e2e8f0; }
.inv-sheet-bottom > div { min-width:0; }
.inv-sheet-bottom p { white-space:pre-line; line-height:1.65; font-size:9px; color:#475569; }
.inv-sheet-footer { margin-top:24px; border-top:1px solid #e2e8f0; display:flex; justify-content:space-between; gap:16px; padding-top:12px; color:#94a3b8; font-size:8px; }
.inv-support { padding-top:58px; }
@media (max-width:1090px) { .inv-workspace { grid-template-columns:minmax(0,430px) minmax(0,1fr); gap:16px; } .inv-preview-panel { padding:15px; } .inv-preview-scroll { padding:10px; } .inv-sheet { padding:26px 20px; } }
@media (max-width:850px) { .inv-workspace { grid-template-columns:1fr; } .inv-preview-panel { position:static; } .inv-sheet { max-width:720px; margin:0 auto; } }
@media (max-width:520px) { .inv-main { padding-top:18px; } .inv-editor-head { padding:20px 17px 12px; } .inv-editor-actions { padding:0 17px 16px; } .inv-section > summary { padding:16px; } .inv-section-body { padding:0 16px 18px; } .inv-field-grid { grid-template-columns:1fr; } .inv-items-head,.inv-item { grid-template-columns:minmax(0,1.8fr) minmax(52px,.58fr) minmax(70px,.75fr) 26px; gap:4px; } .inv-item input { padding:9px 5px; font-size:.67rem; } .inv-preview-panel { padding:13px; } .inv-preview-scroll { padding:7px; } .inv-sheet { padding:17px 12px; min-height:540px; } .inv-sheet-top { gap:8px; padding-bottom:18px; } .inv-sheet-invoice-title h2 { font-size:21px; } .inv-sheet-brand > strong { font-size:13px; } .inv-sheet-parties { padding:20px 0; gap:7px; } .inv-sheet-date-box { padding:7px; gap:7px; } .inv-sheet-small { font-size:7px; } .inv-sheet-table td,.inv-sheet-table th { padding:10px 3px; font-size:7px; } .inv-sheet-totals { min-width:0; width:80%; } .inv-preview-actions { grid-template-columns:1fr 1fr; } .inv-primary-btn,.inv-secondary-btn { font-size:.69rem; gap:5px; padding:11px 5px; } }
@media (prefers-reduced-motion:reduce) { .inv-chevron { transition:none; } }
@page { size:A4; margin:12mm; }
@media print {
  html,body,.nt-page,.inv-page { background:#fff !important; }
  nav,footer,.nt-hero,.inv-editor,.inv-preview-head,.inv-preview-actions,.inv-message,.inv-privacy-hint,.inv-support { display:none !important; }
  .inv-main { width:100% !important; max-width:none !important; padding:0 !important; margin:0 !important; }
  .inv-workspace { display:block !important; }
  .inv-preview-panel,.inv-preview-scroll { display:block !important; position:static !important; border:0 !important; padding:0 !important; background:#fff !important; box-shadow:none !important; overflow:visible !important; }
  .inv-sheet { width:100% !important; max-width:none !important; padding:18px 12px 12px !important; min-height:0; border-top-width:7px; box-shadow:none !important; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .inv-sheet-table thead { display:table-header-group; }
  .inv-sheet-table tr,.inv-sheet-totals,.inv-sheet-bottom > div,.inv-sheet-parties { break-inside:avoid; page-break-inside:avoid; }
  .inv-sheet-brand > strong { font-size:17px; }
}
