:root{--swept-blue:#3592ff;--swept-dark-blue:#2e72d9;--swept-light-blue:#e5f0ff;--swept-green:#00c79f;--swept-dark:#37383f;--swept-light-gray:#f5f5f7;--swept-gray:#e0e0e0;--swept-red:#ff647c;--topbar-height:64px}.invoice-tool-embed *{box-sizing:border-box;margin:0;padding:0}.invoice-tool-embed{background:#f5f7fa;color:#1e293b;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5}.app-layout,.app-main{display:flex}.app-main{flex:1;flex-direction:column;margin:0 auto;max-width:1240px;width:100%}.app-topbar{align-items:center;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;height:var(--topbar-height);justify-content:space-between;padding:0 1.5rem;position:sticky;top:0;transition:transform .2s;z-index:50}.app-topbar.topbar-hidden{transform:translateY(-100%)}.topbar-title{color:var(--swept-dark);font-size:1.25rem;font-weight:600}.topbar-subtitle{color:#64748b;font-size:.8rem;margin-top:.1rem}.topbar-actions{display:flex;gap:.75rem}.btn{align-items:center;border:none;border-radius:8px;cursor:pointer;display:inline-flex;font-size:.875rem;font-weight:500;gap:.4rem;min-height:40px;padding:.5rem 1rem;transition:all .15s}.btn-icon{fill:none;height:16px;stroke:currentColor;stroke-width:2;width:16px}.btn-ghost{background:transparent;color:#475569}.btn-ghost:hover{background:#f1f5f9}.btn-primary{background:linear-gradient(135deg,var(--swept-blue),var(--swept-dark-blue));color:#fff}.btn-primary:hover{box-shadow:0 4px 12px rgba(53,146,255,.3);transform:translateY(-1px)}.btn-secondary{background:#f1f5f9;color:#475569}.btn-secondary:hover{background:#e2e8f0}.app-content{flex:1;padding:0}.invoice-container{display:grid;gap:0;grid-template-columns:480px minmax(0,1fr)}.form-panel{background:#fff;border-right:1px solid #e2e8f0;padding:1.5rem}.form-section{border-bottom:1px solid #f1f5f9;margin-bottom:1.5rem;padding-bottom:1.5rem}.form-section:last-child{border-bottom:none}.form-section h3{align-items:center;color:#64748b;display:flex;font-size:.75rem;gap:.5rem;letter-spacing:.5px;text-transform:uppercase}.form-group,.form-section h3{margin-bottom:1rem}.form-group label{color:#475569;display:block;font-size:.85rem;font-weight:500;margin-bottom:.4rem}.form-row{grid-template-columns:1fr 1fr}.form-row,.form-row-3{display:grid;gap:.75rem}.form-row-3{grid-template-columns:1fr 1fr 1fr}.invoice-tool-embed :is(input,textarea,select){border:1px solid #e2e8f0;border-radius:8px;font-family:inherit;font-size:.9rem;padding:.6rem .75rem;transition:all .2s;width:100%}.invoice-tool-embed :is(input,textarea,select):focus{border-color:var(--swept-blue);box-shadow:0 0 0 3px rgba(53,146,255,.1);outline:none}.invoice-tool-embed textarea{min-height:80px;resize:vertical}.logo-upload{border:2px dashed #e2e8f0;border-radius:8px;cursor:pointer;padding:1rem;text-align:center;transition:all .2s}.logo-upload:hover{background:#f0f9ff;border-color:var(--swept-blue)}.logo-upload img{max-height:60px;max-width:150px}.logo-upload input{display:none}.logo-upload-placeholder{color:#94a3b8;font-size:.85rem}.line-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:.5rem;padding:.75rem}.line-item-row{align-items:center;display:grid;gap:.5rem;grid-template-columns:1fr 70px 90px 90px 40px}.line-item-row input{font-size:.85rem}.line-item-total{color:var(--swept-dark);font-weight:600;padding-right:.25rem;text-align:right}.btn-remove{background:#fee2e2;border:none;border-radius:6px;color:#dc2626;font-size:1rem;height:32px;width:32px}.btn-add,.btn-remove{align-items:center;cursor:pointer;display:flex;justify-content:center}.btn-add{background:#f0f9ff;border:1px dashed #0ea5e9;border-radius:8px;color:#0369a1;font-size:.85rem;gap:.5rem;min-height:40px;padding:.5rem;width:100%}.btn-add:hover{background:#e0f2fe}.totals-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-top:1rem;padding:1rem}.totals-row{align-items:center;display:flex;justify-content:space-between;padding:.5rem 0}.totals-row.grand-total{border-top:2px solid #e2e8f0;color:var(--swept-dark);font-size:1.1rem;font-weight:700;margin-top:.5rem;padding-top:.75rem}.totals-row label{color:#475569;font-weight:500}.totals-row .value{color:var(--swept-dark);font-weight:600}.tax-input-group{align-items:center;display:flex;gap:.5rem}.tax-input-group input{text-align:right;width:70px}.preview-panel{background:#475569;display:flex;justify-content:center;padding:1.5rem}.pages-container{align-items:center;display:flex;flex-direction:column;gap:1.5rem;max-width:100%}.page-indicator{background:hsla(0,0%,100%,.15);border-radius:20px;color:#fff;font-size:12px;font-weight:500;padding:.5rem 1rem}.invoice-page{background:#fff;box-shadow:0 4px 24px rgba(0,0,0,.3);color:#1a1a1a;flex-shrink:0;font-family:Georgia,serif;font-size:10pt;line-height:1.5;max-width:100%;min-height:11in;overflow-wrap:anywhere;padding:.6in;position:relative;width:8.5in;word-break:break-word}.invoice-footer,.invoice-meta,.invoice-totals,.items-table thead{page-break-inside:avoid}.invoice-header{align-items:flex-start;border-bottom:3px solid var(--swept-blue);display:flex;justify-content:space-between;margin-bottom:1.5rem;padding-bottom:1rem}.company-info h1{color:#1e40af;font-family:-apple-system,sans-serif;font-size:24pt;margin-bottom:.25rem}.company-info p{color:#64748b;font-size:10pt;margin:.1rem 0}.company-logo{max-height:70px;max-width:180px;object-fit:contain}.invoice-badge{background:var(--swept-blue);color:#fff;font-family:-apple-system,sans-serif;font-size:10pt;font-weight:600;letter-spacing:1px;padding:.5rem 1.5rem;text-transform:uppercase}.invoice-meta{display:grid;gap:2rem;grid-template-columns:1fr 1fr;margin-bottom:1.5rem}.invoice-meta-section h3{color:#1e40af;font-family:-apple-system,sans-serif;font-size:10pt;letter-spacing:.5px;margin-bottom:.5rem;text-transform:uppercase}.invoice-meta-section p{margin:.25rem 0}.invoice-details-box{background:#f8fafc;border-left:4px solid var(--swept-blue);padding:.75rem}.invoice-details-row{display:flex;justify-content:space-between;margin:.25rem 0}.invoice-details-row strong{color:#1e293b}.items-table{border-collapse:collapse;font-family:-apple-system,sans-serif;font-size:10pt;margin:1rem 0;width:100%}.items-table th{background:#1e40af;color:#fff;font-weight:600;padding:.75rem;text-align:left}.items-table th:nth-child(2),.items-table th:nth-child(3),.items-table th:nth-child(4){text-align:right}.items-table td{border-bottom:1px solid #e2e8f0;padding:.5rem .75rem}.items-table td:nth-child(2),.items-table td:nth-child(3),.items-table td:nth-child(4){text-align:right}.items-table tr:nth-child(2n){background:#f8fafc}.invoice-totals{margin-left:auto;margin-top:1rem;max-width:100%;width:300px}.invoice-totals-row{border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;padding:.5rem 0}.invoice-totals-row.grand-total{background:#1e40af;border:none;color:#fff;font-size:12pt;font-weight:700;margin-top:.5rem;padding:.75rem}.invoice-footer{border-top:1px solid #e2e8f0;margin-top:2rem;padding-top:1rem}.invoice-footer h4{color:#1e40af;font-family:-apple-system,sans-serif;font-size:10pt;margin-bottom:.5rem}.invoice-footer p{color:#64748b;font-size:9pt;margin:.25rem 0}.invoice-thank-you{color:#64748b;font-size:10pt;margin-top:2rem;text-align:center}.feedback-section{background:#eef2f7;padding:3rem 1.5rem;text-align:center}.feedback-section__inner{margin:0 auto;max-width:800px}.toast{align-items:center;background:#1e293b;border-radius:8px;bottom:2rem;box-shadow:0 4px 12px rgba(0,0,0,.2);color:#fff;display:flex;gap:.75rem;opacity:0;padding:1rem 1.5rem;position:fixed;right:2rem;transform:translateY(100px);transition:all .3s;z-index:1000}.toast.show{opacity:1;transform:translateY(0)}.toast.error{background:var(--swept-red)}.toast.success{background:var(--swept-green)}.pdf-export-overlay{align-items:center;background:rgba(0,0,0,.7);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:999998}.pdf-export-overlay .loading-text{color:#fff;font-size:1.25rem;font-weight:600;margin-top:1rem}.pdf-export-overlay .spinner{animation:pdf-spin .8s linear infinite;border:4px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;height:48px;width:48px}@keyframes pdf-spin{to{transform:rotate(1turn)}}.invoice-document-hidden{background:#fff;color:#1a1a1a;font-family:Georgia,serif;font-size:10pt;line-height:1.5;padding:.5in;width:8.5in}.preview-btn-mobile{display:none}.preview-modal{background:rgba(0,0,0,.9);display:none;inset:0;overflow-y:auto;padding:1rem;position:fixed;z-index:999999}.preview-modal.visible{align-items:center;display:flex;flex-direction:column}.preview-modal-header{align-items:center;background:rgba(0,0,0,.8);display:flex;justify-content:space-between;padding:1rem;position:sticky;top:0;width:100%;z-index:10}.preview-modal-title{color:#fff;font-weight:600}.preview-modal-close{background:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:500;padding:.5rem 1rem}.preview-modal-content{display:flex;flex:1;justify-content:center;padding:1rem}@media (max-width:1200px){.invoice-container{grid-template-columns:minmax(0,1fr)}.preview-panel{display:block;margin-top:1.5rem}.invoice-page{height:auto;min-height:11in;width:min(100%,8.5in)}.preview-btn-mobile{display:flex}}@media (max-width:768px){.app-topbar{align-items:flex-start;flex-direction:column;gap:1rem;height:auto;padding:1rem}.topbar-actions{flex-wrap:wrap;width:100%}.line-item-row{gap:.5rem;grid-template-columns:1fr}.line-items-header{display:none!important}.form-row,.form-row-3{grid-template-columns:1fr}}.invoice-tool-embed .app-topbar{border-radius:0;min-height:0;padding:.75rem 1rem;position:static;top:auto;z-index:auto}.invoice-tool-embed .app-main{min-height:0}.invoice-tool-embed .app-content{padding-top:1.25rem}.invoice-tool-embed .app-topbar .topbar-subtitle,.invoice-tool-embed .app-topbar .topbar-title,.invoice-tool-embed .topbar-left:empty{display:none}