.tool-content{--primary-color: #11c28a;--font-main: 'Space Grotesk', sans-serif}
.tool-content *{ box-sizing: border-box; }
.tool-content [hidden]{ display: none !important; }
.tool-content .top-header{ margin-bottom: 24px; }
.tool-content .top-header .container{ max-width: 1000px; margin: 0 auto; text-align: center; }
.tool-content .top-header h1{ margin: 0 0 12px; }
.tool-content .top-header p{ max-width: 65ch; margin: auto; color: var(--cx-muted); }
.tool-content .editor-options{ width: min(calc(100% - 32px), 1000px); margin: 0 auto 24px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.tool-content .editor-options > div{ min-width: 0; }
.tool-content .editor-options label{ display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.tool-content .editor-options input[type=file]{ width: 100%; color: var(--cx-muted); font-size: 12px; }
.tool-content .editor-options input::file-selector-button{ padding: 9px; border: 1px solid var(--cx-border); border-radius: 6px; color: var(--cx-text); background: var(--cx-surface); cursor: pointer; }
.tool-content .editor-options button,.tool-content .editor-options select{ padding: 9px 12px; border: 1px solid var(--cx-border); border-radius: 8px; color: var(--cx-text); background: var(--cx-surface); font: inherit; cursor: pointer; }
.tool-content .editor-options button{ font-size: 13px; margin-top: 8px; }
.tool-content .editor-options select{ width: 100%; }
.tool-content .editor-options .conversion-choice{ display: flex; align-items: center; gap: 8px; margin: 16px 0; font-weight: 400; }
.tool-content .image-help,.tool-content #imageStatus{ grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--cx-muted); }
.tool-content #imageStatus:empty{ display: none; }
.tool-content #imageStatus[data-error=true]{ color: var(--cx-danger); }
.tool-content .invoice-container{ width: 210mm; max-width: calc(100% - 32px); min-height: 297mm; padding: 10mm; margin: 0 auto; background: #fff; color: #222; border: 1px solid #d7e2dc; font-size: 12px; line-height: 1.5; }
.tool-content #invoice [contenteditable=true]{ outline-offset: 2px; border: 1px dashed #b9c7bf; padding: 3px 5px; min-height: 1.8em; overflow-wrap: anywhere; white-space: pre-wrap; }
.tool-content #invoice [contenteditable=true]:focus{ outline: 2px solid #087c56; border-color: transparent; }
.tool-content #invoice [contenteditable=true]:empty::before{ content: attr(data-placeholder); color: #59695f; pointer-events: none; }
.tool-content #invoice .editable-field{ margin: 4px 0; }
.tool-content #invoice h2,.tool-content #invoice h3{ font-family: inherit; font-size: 14px; line-height: 1.4; letter-spacing: 0; }
.tool-content #invoice h2{ margin: 0 0 10px; }
.tool-content #invoice .section-label{ font-size: 12px; font-weight: 500; color: #59695f; }
.tool-content #invoice .invoice-title-top{ text-align: right; font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.tool-content #invoiceDeclaration{ font-size: 12px; margin-bottom: 24px !important; }
.tool-content .header{ display: flex; align-items: flex-start; gap: 24px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #d7e2dc; }
.tool-content .company-details{ min-width: 0; flex: 1; }
.tool-content #invoice #issuerName{ font-size: 21px; font-weight: 600; }
.tool-content .logo-section{ flex: 0 0 100px; }
.tool-content .invoice-logo{ display: block; width: 100px; max-height: 120px; object-fit: contain; }
.tool-content .bill-details-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.tool-content .bill-to,.tool-content .invoice-meta-group{ min-width: 0; }
.tool-content .bill-to h3{ font-weight: 600; }
.tool-content .meta-row{ display: grid; grid-template-columns: 40% 60%; gap: 8px; align-items: center; margin-bottom: 8px; }
.tool-content .meta-row .editable-field{ margin: 0 !important; }
.tool-content .bank-details{ margin-top: 24px; }
.tool-content .invoice-table-wrap{ position: relative; max-width: 100%; overflow-x: auto; }
.tool-content .invoice-table{ width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.tool-content .invoice-table th,.tool-content .invoice-table td{ border: 1px solid #c7d4cc; padding: 8px; text-align: right; vertical-align: top; overflow-wrap: anywhere; }
.tool-content .invoice-table th{ background: #eef4f0; color: #18342b; font-weight: 600; }
.tool-content .invoice-table th:first-child,.tool-content .invoice-table td:first-child{ text-align: left; }
.tool-content #invoice .invoice-table th [contenteditable=true]{ display: inline-block; padding: 0; min-height: 0; }
.tool-content .btn-remove{ border: 0; background: transparent; color: #a11d2b; cursor: pointer; font-size: 18px; }
.tool-content .add-btn-container{ margin: 12px 0 24px; }
.tool-content .add-btn-container button,.tool-content .controls button{ border: 0; border-radius: 8px; background: #11c28a; color: #092f21; padding: 12px 18px; font: 600 14px var(--font-main); cursor: pointer; }
.tool-content .add-btn-container button{ background: #edf3f0; border: 1px solid #c7d4cc; }
.tool-content .footer-section{ display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.tool-content .notes-container{ min-width: 0; }
.tool-content .amount-in-words{ font-size: 12px; padding: 10px 0; }
.tool-content .exchange-rate-display{ margin-top: 16px; font-size: 12px; }
.tool-content #exchangeRateInput{ display: inline-block; min-width: 48px; }
.tool-content .total-row{ display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid #d7e2dc; }
.tool-content .total-row > span:last-child{ white-space: nowrap; }
.tool-content #taxRate{ display: inline-block; min-width: 28px; text-align: center; }
.tool-content .final-total{ font-weight: 700; border-bottom: 2px solid #18342b; font-size: 15px; }
.tool-content .terms-section{ display: grid; grid-template-columns: 2fr 1fr; gap: 32px; border-top: 1px solid #d7e2dc; padding-top: 20px; margin-top: 32px; }
.tool-content .terms,.tool-content .signature-box{ min-width: 0; }
.tool-content #invoiceTerms{ min-height: 80px; }
.tool-content .sig-title{ font-weight: 600; margin: 0 0 12px; }
.tool-content .auth-sign{ display: block; max-width: 100%; max-height: 80px; object-fit: contain; margin: 8px 0; }
.tool-content .controls{ display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 24px 16px; }
.tool-content .sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.exporting .tool-content .no-print,.exporting .tool-content .btn-remove{ display: none !important; }
.exporting .tool-content #invoice [contenteditable=true]{ border-color: transparent !important; background: transparent !important; outline: none !important; }
.exporting .tool-content #invoice [data-empty=true],.exporting .tool-content #invoice [data-optional-group][data-empty=true]{ display: none !important; }
.exporting .tool-content #invoice [contenteditable=true]:empty::before{ content: none !important; }
.exporting .tool-content #invoice .invoice-table td[contenteditable]{ display: table-cell !important; }
@media (max-width: 700px){.tool-content .editor-options{ grid-template-columns: 1fr; gap: 20px; }
.tool-content .invoice-container{ max-width: calc(100% - 24px); padding: 20px 14px; min-height: 0; }
.tool-content .header{ flex-wrap: wrap; }
.tool-content .bill-details-row,.tool-content .footer-section,.tool-content .terms-section{ grid-template-columns: 1fr; gap: 24px; }
.tool-content .invoice-table{ min-width: 620px; }
.tool-content .meta-row{ grid-template-columns: 38% minmax(0,1fr); }}
@media print{@page{ size: A4; margin: 12mm; }
.tool-content .no-print,.tool-content .btn-remove{ display: none !important; }
.tool-content .invoice-container{ width: 100%; max-width: none; min-height: 0; padding: 0; margin: 0; border: 0; color: #222; background: #fff; }
.tool-content #invoice [contenteditable=true]{ border-color: transparent !important; background: transparent !important; outline: none !important; }
.tool-content #invoice [data-empty=true],.tool-content #invoice [data-optional-group][data-empty=true]{ display: none !important; }
.tool-content #invoice [contenteditable=true]:empty::before{ content: none !important; }
.tool-content #invoice .invoice-table td[contenteditable]{ display: table-cell !important; }
.tool-content .invoice-table-wrap{ overflow: visible; }
.tool-content .invoice-table thead{ display: table-header-group; }
.tool-content .invoice-table tr,.tool-content .header,.tool-content .terms-section,.tool-content .footer-section{ break-inside: avoid; }}