.sfr-einv{--ei-blue:#1e3a8a;--ei-blue2:#3b82f6;--ei-green:#10b981;--ei-amber:#f59e0b;--ei-red:#ef4444;--ei-bg:#f8fafc;--ei-card:#fff;--ei-text:#0f172a;--ei-muted:#64748b;--ei-line:#e2e8f0;--ei-soft:#eff6ff;color:var(--ei-text);font-family:Tajawal,Arial,sans-serif;container-type:inline-size}.sfr-einv *{box-sizing:border-box}.sfr-einv button,.sfr-einv input,.sfr-einv select,.sfr-einv textarea{font:inherit}.sfr-einv button{cursor:pointer}.sfr-einv-view{display:none}.sfr-einv-view.is-active{display:block}.sfr-einv-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 18px;padding:20px 22px;border:1px solid var(--ei-line);border-radius:18px;background:linear-gradient(135deg,#fff,#f8fbff);box-shadow:0 8px 28px rgba(15,23,42,.05)}.sfr-einv-page-head>div:first-child{min-width:0}.sfr-einv-page-head span{display:block;color:var(--ei-blue2);font-size:12px;font-weight:800;letter-spacing:.04em}.sfr-einv-page-head h1{margin:5px 0 6px;font-size:clamp(24px,3cqi,34px);line-height:1.2}.sfr-einv-page-head p{margin:0;color:var(--ei-muted);max-width:780px;line-height:1.75}.sfr-einv-head-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.sfr-einv-btn{border:0;border-radius:11px;padding:11px 16px;font-weight:800;color:#fff;background:var(--ei-blue);box-shadow:0 5px 14px rgba(30,58,138,.18);transition:.18s transform,.18s box-shadow,.18s background}.sfr-einv-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(30,58,138,.22)}.sfr-einv-btn.primary{background:linear-gradient(135deg,var(--ei-blue),var(--ei-blue2))}.sfr-einv-btn.secondary{color:var(--ei-blue);background:#fff;border:1px solid #bfdbfe;box-shadow:none}.sfr-einv-btn.compact{padding:8px 12px;font-size:13px}.sfr-einv-btn.danger{background:var(--ei-red)}.sfr-einv-panel{background:var(--ei-card);border:1px solid var(--ei-line);border-radius:17px;padding:18px;box-shadow:0 8px 24px rgba(15,23,42,.045)}.sfr-einv-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:13px;margin-bottom:15px;border-bottom:1px solid var(--ei-line)}.sfr-einv-panel>header span{display:block;color:var(--ei-blue2);font-size:11px;font-weight:800}.sfr-einv-panel>header h2{margin:3px 0 0;font-size:18px}.sfr-einv-panel>header small{color:var(--ei-muted);font-size:12px}.sfr-einv-panel>header button:not(.sfr-einv-btn){border:0;background:transparent;color:var(--ei-blue2);font-weight:800}.sfr-einv-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.sfr-einv-kpis article,.sfr-einv-register-summary article{background:#fff;border:1px solid var(--ei-line);border-radius:15px;padding:15px}.sfr-einv-kpis span,.sfr-einv-register-summary span{display:block;color:var(--ei-muted);font-size:12px}.sfr-einv-kpis strong,.sfr-einv-register-summary strong{display:block;margin:7px 0 2px;font:800 21px/1.2 'JetBrains Mono',monospace;direction:ltr;text-align:right}.sfr-einv-kpis small,.sfr-einv-register-summary small{color:var(--ei-muted);font-size:11px}.sfr-einv-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.sfr-einv-dashboard-grid .span-2{grid-column:span 2}.sfr-einv-chart{height:220px;display:flex;align-items:flex-end;gap:10px;padding:15px 4px 2px;border-bottom:1px solid var(--ei-line)}.sfr-einv-chart article{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.sfr-einv-chart b{width:min(52px,82%);min-height:4px;border-radius:8px 8px 2px 2px;background:linear-gradient(180deg,var(--ei-blue2),var(--ei-blue));transition:.25s height}.sfr-einv-chart span{color:var(--ei-muted);font-size:11px;white-space:nowrap}.sfr-einv-chart small{font:700 10px 'JetBrains Mono',monospace;color:var(--ei-text);direction:ltr}.sfr-einv-collection-meter{display:grid;gap:14px}.sfr-einv-collection-meter .ring{--p:0;width:148px;height:148px;margin:4px auto;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--ei-green) calc(var(--p)*1%),#e2e8f0 0);position:relative}.sfr-einv-collection-meter .ring:before{content:"";position:absolute;inset:15px;background:#fff;border-radius:50%}.sfr-einv-collection-meter .ring strong{position:relative;font:800 22px 'JetBrains Mono',monospace;direction:ltr}.sfr-einv-collection-meter dl{margin:0;display:grid;gap:8px}.sfr-einv-collection-meter dl div{display:flex;justify-content:space-between;gap:10px;color:var(--ei-muted)}.sfr-einv-collection-meter dd{margin:0;color:var(--ei-text);font:700 12px 'JetBrains Mono',monospace;direction:ltr}.sfr-einv-recent{display:grid;gap:9px}.sfr-einv-recent article{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--ei-line);border-radius:12px}.sfr-einv-recent b{display:block}.sfr-einv-recent span{color:var(--ei-muted);font-size:12px}.sfr-einv-recent strong{font:700 12px 'JetBrains Mono',monospace;direction:ltr}.sfr-einv-status{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;white-space:nowrap}.sfr-einv-status.paid{background:#ecfdf5;color:#047857}.sfr-einv-status.partial{background:#fffbeb;color:#b45309}.sfr-einv-status.unpaid{background:#fef2f2;color:#b91c1c}.sfr-einv-status.local{background:#eff6ff;color:#1d4ed8}.sfr-einv-readiness{display:grid;gap:10px}.sfr-einv-readiness div{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--ei-line);border-radius:11px;color:var(--ei-muted)}.sfr-einv-readiness i{width:9px;height:9px;border-radius:50%;background:var(--ei-red)}.sfr-einv-readiness .ok i{background:var(--ei-green)}.sfr-einv-readiness b{color:var(--ei-text)}.sfr-einv-progress{margin-bottom:14px;padding:13px 16px;background:#fff;border:1px solid var(--ei-line);border-radius:14px}.sfr-einv-progress>div{display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px;font-weight:800}.sfr-einv-progress strong{font-family:'JetBrains Mono',monospace;direction:ltr}.sfr-einv-progress>i{display:block;height:8px;border-radius:999px;background:#e2e8f0;overflow:hidden}.sfr-einv-progress b{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--ei-green),var(--ei-blue2));transition:.25s width}.sfr-einv-data-tabs{display:flex;gap:8px;overflow:auto;padding:6px;margin-bottom:14px;border:1px solid var(--ei-line);border-radius:14px;background:#fff}.sfr-einv-data-tabs button{border:0;border-radius:10px;padding:10px 16px;background:transparent;color:var(--ei-muted);font-weight:800;white-space:nowrap}.sfr-einv-data-tabs button.is-active{background:var(--ei-blue);color:#fff;box-shadow:0 5px 13px rgba(30,58,138,.2)}.sfr-einv-data-panel{display:none}.sfr-einv-data-panel.is-active{display:block}.sfr-einv-form-grid{display:grid;gap:13px}.sfr-einv-form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sfr-einv-form-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-form-grid label{display:grid;gap:6px;min-width:0}.sfr-einv-form-grid label>span{color:#334155;font-size:12px;font-weight:800}.sfr-einv-form-grid input,.sfr-einv-form-grid select,.sfr-einv-form-grid textarea,.sfr-einv-filters input,.sfr-einv-filters select{width:100%;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:var(--ei-text);padding:10px 11px;outline:none;transition:.15s border,.15s box-shadow}.sfr-einv-form-grid input:focus,.sfr-einv-form-grid select:focus,.sfr-einv-form-grid textarea:focus,.sfr-einv-filters input:focus,.sfr-einv-filters select:focus{border-color:var(--ei-blue2);box-shadow:0 0 0 3px rgba(59,130,246,.12)}.sfr-einv-form-grid input[type=number],.sfr-einv-lines-table input[type=number]{direction:ltr;text-align:right;font-family:'JetBrains Mono',monospace}.sfr-einv-form-grid .span-2{grid-column:span 2}.sfr-einv-form-grid .span-4{grid-column:span 4}.sfr-einv-party-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sfr-einv-party-summary article{padding:12px;border:1px solid var(--ei-line);border-radius:12px;background:var(--ei-bg)}.sfr-einv-party-summary span{display:block;color:var(--ei-muted);font-size:11px}.sfr-einv-party-summary strong{display:block;margin-top:5px;word-break:break-word}.sfr-einv-table-wrap{width:100%;overflow:auto;border:1px solid var(--ei-line);border-radius:13px}.sfr-einv table{width:100%;border-collapse:collapse}.sfr-einv th{padding:10px;background:#f1f5f9;color:#334155;font-size:11px;text-align:right;white-space:nowrap}.sfr-einv td{padding:9px;border-top:1px solid var(--ei-line);vertical-align:middle}.sfr-einv-lines-table{min-width:1120px}.sfr-einv-lines-table input,.sfr-einv-lines-table select{width:100%;min-width:76px;border:1px solid #cbd5e1;border-radius:8px;padding:8px;background:#fff}.sfr-einv-lines-table .line-name{min-width:220px}.sfr-einv-lines-table td[data-money]{font:700 11px 'JetBrains Mono',monospace;direction:ltr;text-align:right}.sfr-einv-remove{border:0;background:#fef2f2;color:#b91c1c;border-radius:8px;width:31px;height:31px;font-weight:900}.sfr-einv-line-note{margin-top:10px;color:var(--ei-muted);font-size:11px;line-height:1.7}.sfr-einv-review-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,.6fr);gap:14px;margin-bottom:14px}.sfr-einv-totals-panel dl{margin:0;display:grid;gap:9px}.sfr-einv-totals-panel dl div{display:flex;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px dashed var(--ei-line)}.sfr-einv-totals-panel dt{color:var(--ei-muted)}.sfr-einv-totals-panel dd{margin:0;font:700 13px 'JetBrains Mono',monospace;direction:ltr}.sfr-einv-totals-panel .grand{padding:12px;border:0;border-radius:11px;background:var(--ei-blue);color:#fff}.sfr-einv-totals-panel .grand dt{color:#dbeafe}.sfr-einv-totals-panel .grand dd{font-size:16px}.sfr-einv-validation{display:grid;gap:8px}.sfr-einv-validation p,.sfr-einv-validation ul{margin:0}.sfr-einv-validation ul{padding-right:20px;color:#b91c1c}.sfr-einv-validation .ok{padding:12px;border-radius:11px;background:#ecfdf5;color:#047857;font-weight:800}.sfr-einv-validation .warn{padding:12px;border-radius:11px;background:#fffbeb;color:#92400e}.sfr-einv-final-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px}.sfr-einv-register-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:14px}.sfr-einv-filters{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:10px;margin-bottom:14px}.sfr-einv-filters label{display:grid;gap:5px}.sfr-einv-filters span{font-size:11px;font-weight:800;color:var(--ei-muted)}.sfr-einv-register-table{min-width:1080px}.sfr-einv-register-table td{font-size:12px}.sfr-einv-register-table .money{font-family:'JetBrains Mono',monospace;direction:ltr;text-align:right}.sfr-einv-row-actions{display:flex;gap:5px}.sfr-einv-row-actions button{border:1px solid var(--ei-line);background:#fff;color:var(--ei-blue);border-radius:7px;padding:6px 8px;font-size:11px;font-weight:800}.sfr-einv-empty{padding:28px!important;text-align:center;color:var(--ei-muted)}.sfr-einv-report-paper{max-width:930px;margin:0 auto;background:#fff;color:#0f172a;border:1px solid #dbe3ee;border-radius:4px;padding:28px 32px;box-shadow:0 12px 34px rgba(15,23,42,.08);font-family:Tajawal,Arial,sans-serif}.sfr-einv-report-paper .report-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:18px;border-bottom:3px solid #1e3a8a}.sfr-einv-report-paper .report-brand{display:flex;gap:12px;align-items:center}.sfr-einv-report-paper .report-logo{width:54px;height:54px;border-radius:12px;background:#1e3a8a;color:#fff;display:grid;place-items:center;font-weight:900}.sfr-einv-report-paper h1{margin:0;font-size:25px}.sfr-einv-report-paper .report-head p{margin:4px 0 0;color:#64748b}.sfr-einv-report-paper .report-number{flex:0 0 250px;min-width:0;text-align:left;padding-left:6px}.sfr-einv-report-paper .report-number span{display:block;color:#64748b;font-size:11px;direction:rtl}.sfr-einv-report-paper .report-number strong{display:block;overflow-wrap:anywhere;font:800 15px 'JetBrains Mono',monospace;direction:ltr}.sfr-einv-report-paper .report-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.sfr-einv-report-paper .report-meta article{padding:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px}.sfr-einv-report-paper .report-meta span{display:block;color:#64748b;font-size:10px}.sfr-einv-report-paper .report-meta strong{display:block;margin-top:4px;font-size:12px;word-break:break-word}.sfr-einv-report-paper .report-parties{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.sfr-einv-report-paper .report-parties article{padding:13px;border:1px solid #e2e8f0;border-radius:10px}.sfr-einv-report-paper .report-parties h2{margin:0 0 8px;color:#1e3a8a;font-size:14px}.sfr-einv-report-paper .report-parties p{margin:3px 0;font-size:11px}.sfr-einv-report-paper table{font-size:11px}.sfr-einv-report-paper th{background:#1e3a8a;color:#fff}.sfr-einv-report-paper td,.sfr-einv-report-paper th{padding:8px;border:1px solid #e2e8f0}.sfr-einv-report-paper .report-totals{width:min(370px,100%);margin:16px 0 0 auto}.sfr-einv-report-paper .report-totals div{display:flex;justify-content:space-between;padding:7px 10px;border-bottom:1px solid #e2e8f0}.sfr-einv-report-paper .report-totals strong{font-family:'JetBrains Mono',monospace;direction:ltr}.sfr-einv-report-paper .report-totals .total{background:#1e3a8a;color:#fff;border:0;border-radius:8px;margin-top:5px;font-size:14px}.sfr-einv-report-paper .report-footer{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-top:26px;padding-top:14px;border-top:1px solid #e2e8f0;color:#64748b;font-size:10px}.sfr-einv-report-paper .qr{width:82px;height:82px;border:2px dashed #94a3b8;display:grid;place-items:center;text-align:center;color:#64748b}.sfr-einv-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sfr-einv-help-grid ol,.sfr-einv-help-grid ul{margin:0;padding-right:22px;line-height:2;color:#334155}.sfr-einv-help-grid p{margin:0;color:#334155;line-height:1.9}.sfr-einv-integration-card{margin-top:14px}.sfr-einv-pill{display:inline-flex!important;padding:5px 9px;border-radius:999px;background:#fff7ed;color:#c2410c!important;font-size:10px!important}.sfr-einv-integration-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sfr-einv-integration-grid article{padding:13px;border:1px solid var(--ei-line);border-radius:12px;background:var(--ei-bg)}.sfr-einv-integration-grid b,.sfr-einv-integration-grid span{display:block}.sfr-einv-integration-grid span{margin-top:6px;color:var(--ei-muted);font-size:11px}.sfr-einv-data-actions{display:flex;gap:10px;flex-wrap:wrap}.danger-zone{margin-top:14px;border-color:#fecaca}.sfr-einv-toast{position:fixed;z-index:99999;left:24px;bottom:24px;max-width:360px;display:grid;gap:2px;padding:13px 16px;border-radius:12px;background:#0f172a;color:#fff;box-shadow:0 12px 30px rgba(15,23,42,.28);opacity:0;transform:translateY(15px);pointer-events:none;transition:.22s}.sfr-einv-toast.show{opacity:1;transform:none}.sfr-einv-toast span{color:#cbd5e1;font-size:12px}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv{--ei-bg:#0f172a;--ei-card:#111c2e;--ei-text:#f8fafc;--ei-muted:#94a3b8;--ei-line:#293548;--ei-soft:#172554}.dark .sfr-einv-page-head,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-page-head{background:linear-gradient(135deg,#111c2e,#0f1a2b)}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-panel,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-kpis article,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-register-summary article,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-progress,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-data-tabs{background:var(--ei-card)}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-form-grid input,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-form-grid select,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-form-grid textarea,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table input,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table select,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-filters input,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-filters select{background:#0b1423;color:#f8fafc;border-color:#334155}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-form-grid label>span,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-panel>header h2{color:#f8fafc}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv th{background:#172033;color:#cbd5e1}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-collection-meter .ring:before{background:#111c2e}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-btn.secondary,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-row-actions button{background:#111c2e;color:#93c5fd;border-color:#334155}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-party-summary article,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-integration-grid article{background:#0b1423}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper{background:#fff;color:#0f172a}
@container (max-width:1050px){.sfr-einv-kpis,.sfr-einv-register-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.sfr-einv-form-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-form-grid .span-4{grid-column:span 2}.sfr-einv-party-summary,.sfr-einv-integration-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (max-width:760px){.sfr-einv-page-head{align-items:flex-start;flex-direction:column}.sfr-einv-head-actions{width:100%;justify-content:flex-start}.sfr-einv-kpis,.sfr-einv-register-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-dashboard-grid{grid-template-columns:1fr}.sfr-einv-dashboard-grid .span-2{grid-column:auto}.sfr-einv-review-grid,.sfr-einv-help-grid{grid-template-columns:1fr}.sfr-einv-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-report-paper .report-meta{grid-template-columns:repeat(2,1fr)}}
@container (max-width:520px){.sfr-einv-page-head{padding:16px}.sfr-einv-btn{width:100%;justify-content:center}.sfr-einv-head-actions,.sfr-einv-final-actions{display:grid;grid-template-columns:1fr;width:100%}.sfr-einv-kpis,.sfr-einv-register-summary,.sfr-einv-form-grid.cols-4,.sfr-einv-form-grid.cols-2,.sfr-einv-party-summary,.sfr-einv-integration-grid,.sfr-einv-filters{grid-template-columns:1fr}.sfr-einv-form-grid .span-2,.sfr-einv-form-grid .span-4{grid-column:auto}.sfr-einv-recent article{grid-template-columns:1fr}.sfr-einv-report-paper{padding:18px 14px}.sfr-einv-report-paper .report-head,.sfr-einv-report-paper .report-parties,.sfr-einv-report-paper .report-footer{display:grid;grid-template-columns:1fr}.sfr-einv-report-paper .report-number{text-align:right}}
@media print{@page{size:A4;margin:12mm}body.sfr-platform-phase4-page{background:#fff!important}.sfr-einv-no-print,.sfr-einv-view:not([data-einv-view="report"]),.sfr-einv-toast{display:none!important}.sfr-einv-view[data-einv-view="report"]{display:block!important}.sfr-einv-report-paper{max-width:none;margin:0;padding:0;border:0;box-shadow:none}.sfr-einv-report-paper tr,.sfr-einv-report-paper article,.sfr-einv-report-paper .report-parties{break-inside:avoid;page-break-inside:avoid}}

/* Phase 4.9.3 — Keyboard confirmation, isolated printing and QR raster hardening */
.sfr-einv-panel-copy,.sfr-einv-catalog-card>p{margin:0 0 14px;color:var(--ei-muted);line-height:1.8}
.sfr-einv-section-actions{display:flex;justify-content:flex-start;margin-top:16px;padding-top:14px;border-top:1px solid var(--ei-line)}
.sfr-einv-lines-finish{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding:14px 16px;border:1px solid #86efac;border-radius:13px;background:#f0fdf4}
.sfr-einv-lines-finish[hidden]{display:none}
.sfr-einv-lines-finish strong,.sfr-einv-lines-finish span{display:block}.sfr-einv-lines-finish strong{color:#166534}.sfr-einv-lines-finish span{margin-top:3px;color:#15803d;font-size:12px}
.sfr-einv-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sfr-einv-mode-grid label{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--ei-line);border-radius:13px;background:var(--ei-bg);cursor:pointer}.sfr-einv-mode-grid input{margin-top:4px;accent-color:var(--ei-blue)}.sfr-einv-mode-grid span,.sfr-einv-mode-grid b,.sfr-einv-mode-grid small{display:block}.sfr-einv-mode-grid small{margin-top:6px;color:var(--ei-muted);line-height:1.7}.sfr-einv-sales-mode-intro{margin-bottom:12px;color:var(--ei-muted);line-height:1.8}.sfr-einv-policy-note{margin-top:12px;padding:12px 14px;border-inline-start:4px solid var(--ei-amber);border-radius:10px;background:#fffbeb;color:#92400e;line-height:1.8}
.sfr-einv-catalog-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.sfr-einv-catalog-preview>span{display:grid;gap:2px;padding:9px 11px;border:1px solid var(--ei-line);border-radius:10px;background:var(--ei-bg)}.sfr-einv-catalog-preview small{color:var(--ei-muted)}.sfr-einv-catalog-table{margin-top:14px}.sfr-einv-catalog-table>small{display:block;margin-top:8px;color:var(--ei-muted)}
.sfr-einv-name-cell{position:relative}.sfr-einv-name-cell small{display:block;margin-top:3px;color:var(--ei-muted);font-size:10px}.sfr-einv-lines-table{min-width:1320px}.sfr-einv-lines-table tr.is-incomplete{background:#fff7ed}.sfr-einv-lines-table tr.is-empty{background:#f8fafc}.sfr-einv-lines-table tr.is-complete{background:#fff}.sfr-einv-lines-table input.has-error,.sfr-einv-form-grid input.has-error{border-color:var(--ei-red)!important;box-shadow:0 0 0 3px rgba(239,68,68,.12)!important}
.sfr-einv-autocomplete{position:fixed;z-index:100000;max-height:310px;overflow:auto;border:1px solid #bfdbfe;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.22);padding:6px}.sfr-einv-autocomplete[hidden]{display:none}.sfr-einv-autocomplete button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;border:0;border-radius:9px;background:transparent;padding:10px 11px;text-align:right;color:#0f172a}.sfr-einv-autocomplete button:hover,.sfr-einv-autocomplete button.is-active{background:#eff6ff}.sfr-einv-autocomplete button span{color:#64748b;font-size:11px;white-space:nowrap}
.sfr-einv-doc-type{display:inline-flex;margin-top:5px;margin-inline-start:5px;padding:3px 7px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:800}.sfr-einv-doc-type.credit-note{background:#ecfdf5;color:#047857}.sfr-einv-doc-type.debit-note{background:#fff7ed;color:#c2410c}.sfr-einv-status.credit{background:#ecfdf5;color:#047857}.sfr-einv .negative{color:#b91c1c!important}.sfr-einv-chart b.negative{background:linear-gradient(180deg,#fb7185,#be123c)}.sfr-einv-row-actions{flex-wrap:wrap}.sfr-einv-row-actions button{white-space:nowrap}
.sfr-einv-report-paper .report-reference{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 16px;padding:11px 13px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;color:#1e3a8a}.sfr-einv-report-paper .report-reference b{width:100%}.sfr-einv-report-paper .report-note{margin:18px 0 0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc}.sfr-einv-report-paper .qr-wrap{flex:0 0 176px;display:grid;justify-items:center;gap:5px;text-align:center;color:#475569}.sfr-einv-report-paper .sfr-einv-qr-svg{display:block;width:156px;height:156px;background:#fff;border:1px solid #cbd5e1;padding:4px}.sfr-einv-report-paper .qr-wrap small{font-size:9px;line-height:1.45}.sfr-einv-qr-error{width:156px;height:156px;display:grid;place-items:center;border:1px solid #ef4444;color:#b91c1c;background:#fff}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-mode-grid label,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-catalog-preview>span{background:#0b1423}.dark .sfr-einv-policy-note,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-policy-note{background:#2a210d;color:#fde68a;border-color:#f59e0b}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-finish{background:#0d2a20;border-color:#166534}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-finish strong{color:#bbf7d0}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-finish span{color:#86efac}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table tr.is-incomplete{background:#2a210d}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table tr.is-empty{background:#0b1423}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table tr.is-complete{background:#111c2e}
/* The invoice/report remains a white, print-like document in dark mode with explicit high contrast. */
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper *{color:#0f172a}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper{background:#fff!important;border-color:#94a3b8!important;box-shadow:0 14px 42px rgba(0,0,0,.42)}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-head p,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-number span,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-meta span,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-footer{color:#475569!important}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-meta article,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-note{background:#f8fafc!important;border-color:#cbd5e1!important}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper td,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper th,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-parties article{border-color:#94a3b8!important}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper th,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-totals .total,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-report-paper .report-logo{background:#1e3a8a!important;color:#fff!important}
@container (max-width:760px){.sfr-einv-mode-grid{grid-template-columns:1fr}.sfr-einv-lines-finish{align-items:stretch;flex-direction:column}.sfr-einv-report-paper .qr-wrap{justify-self:start}.sfr-einv-autocomplete{max-width:calc(100vw - 16px)}}
@media print{.sfr-einv-autocomplete{display:none!important}.sfr-einv-report-paper .sfr-einv-qr-svg{width:34mm;height:34mm}.sfr-einv-report-paper,.sfr-einv-report-paper *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}}

/* Phase 4.9.3 invoice paper and QR contrast hardening. */
.sfr-einv-report-paper,.sfr-einv-report-paper *{color:#0f172a!important}
.sfr-einv-report-paper{background:#fff!important;border-color:#94a3b8!important}
.sfr-einv-report-paper .report-head p,.sfr-einv-report-paper .report-number span,.sfr-einv-report-paper .report-meta span,.sfr-einv-report-paper .report-footer,.sfr-einv-report-paper .qr-wrap{color:#475569!important}
.sfr-einv-report-paper .report-meta article,.sfr-einv-report-paper .report-note{background:#f8fafc!important;border-color:#cbd5e1!important}
.sfr-einv-report-paper td,.sfr-einv-report-paper th,.sfr-einv-report-paper .report-parties article{border-color:#94a3b8!important}
.sfr-einv-report-paper th,.sfr-einv-report-paper .report-totals .total,.sfr-einv-report-paper .report-logo{background:#1e3a8a!important;color:#fff!important}
.sfr-einv-report-paper .qr-wrap{flex-basis:220px}
.sfr-einv-report-paper .sfr-einv-qr-svg,.sfr-einv-qr-error{width:200px;height:200px;background:#fff!important}
@media print{.sfr-einv-report-paper .sfr-einv-qr-svg{width:38mm;height:38mm}}
/* Highest-specificity report text rules: the invoice remains a readable white document in every platform theme. */
#sfrElectronicInvoicing .sfr-einv-report-paper,
#sfrElectronicInvoicing .sfr-einv-report-paper h1,
#sfrElectronicInvoicing .sfr-einv-report-paper h2,
#sfrElectronicInvoicing .sfr-einv-report-paper h3,
#sfrElectronicInvoicing .sfr-einv-report-paper p,
#sfrElectronicInvoicing .sfr-einv-report-paper span,
#sfrElectronicInvoicing .sfr-einv-report-paper b,
#sfrElectronicInvoicing .sfr-einv-report-paper strong,
#sfrElectronicInvoicing .sfr-einv-report-paper td {
  color:#0f172a!important;
}
#sfrElectronicInvoicing .sfr-einv-report-paper .report-head p,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-number span,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-meta span,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-footer,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-footer p,
#sfrElectronicInvoicing .sfr-einv-report-paper .qr-wrap,
#sfrElectronicInvoicing .sfr-einv-report-paper .qr-wrap small {
  color:#475569!important;
}
#sfrElectronicInvoicing .sfr-einv-report-paper th,
#sfrElectronicInvoicing .sfr-einv-report-paper th *,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-totals .total,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-totals .total *,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-logo,
#sfrElectronicInvoicing .sfr-einv-report-paper .report-logo * {
  color:#fff!important;
}
/* Override the platform-wide dark audit palette only inside the white invoice sheet. */
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper h1,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper h2,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper h3,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper p,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper span,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper b,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper strong,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper td {
  color:#0f172a!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-head p,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-number span,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-meta span,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-footer,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-footer p,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .qr-wrap,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .qr-wrap small {
  color:#475569!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper th,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper th *,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-totals .total,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-totals .total *,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-logo,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing[data-sfr-module-root] .sfr-einv-report-paper .report-logo * {
  color:#fff!important;
}


/* Phase 4.9.3 focused workflow and print fixes. */
.sfr-einv-lines-finish-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sfr-einv-lines-table input.has-error{border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.14)!important}
.sfr-einv-report-paper .sfr-einv-qr-image{display:block;width:200px;height:200px;object-fit:contain;background:#fff!important;border:1px solid #cbd5e1;padding:6px;image-rendering:pixelated}
.sfr-einv-print-frame{display:block}
@container (max-width:760px){.sfr-einv-lines-finish-actions{width:100%}.sfr-einv-lines-finish-actions .sfr-einv-btn{flex:1}}
@media print{.sfr-einv-print-frame,.sfr-einv-autocomplete{display:none!important}.sfr-einv-report-paper .sfr-einv-qr-image{width:38mm!important;height:38mm!important}}


/* Phase 4.9.3 — compact lines, dark autocomplete, final workflow and reporting. */
.sfr-einv-lines-table{min-width:900px;table-layout:fixed}
.sfr-einv-lines-table th:nth-child(1){width:42px}.sfr-einv-lines-table th:nth-child(2){width:250px}.sfr-einv-lines-table th:nth-child(3){width:92px}.sfr-einv-lines-table th:nth-child(4){width:88px}.sfr-einv-lines-table th:nth-child(5){width:110px}.sfr-einv-lines-table th:nth-child(6){width:100px}.sfr-einv-lines-table th:nth-child(7){width:165px}.sfr-einv-lines-table th:nth-child(8){width:150px}.sfr-einv-lines-table th:nth-child(9){width:46px}
.sfr-einv-lines-table td{padding:9px 7px;vertical-align:middle}.sfr-einv-name-cell{display:grid;gap:6px}.sfr-einv-name-cell .line-name{font-weight:800}.sfr-einv-name-cell .line-category{font-size:12px;min-height:32px;color:var(--ei-muted)}.sfr-einv-tax-cell{display:grid;grid-template-columns:minmax(88px,1fr) 62px;gap:6px}.sfr-einv-line-total strong{display:block;color:var(--ei-text);font-size:14px}.sfr-einv-line-total small{display:block;margin-top:4px;color:var(--ei-muted);font-size:10px;white-space:nowrap}.sfr-einv-line-index{text-align:center;font-weight:900}
.sfr-einv-autocomplete{background:#fff!important;color:#0f172a!important;border:1px solid #94a3b8!important;box-shadow:0 18px 45px rgba(15,23,42,.24)!important}.sfr-einv-autocomplete button{background:#fff!important;color:#0f172a!important;border-bottom:1px solid #e2e8f0!important}.sfr-einv-autocomplete button strong{color:#0f172a!important}.sfr-einv-autocomplete button span{color:#475569!important}.sfr-einv-autocomplete button:hover,.sfr-einv-autocomplete button.is-active{background:#dbeafe!important;color:#1e3a8a!important}
.sfr-einv-reporting-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.sfr-einv-reporting-kpis article{background:var(--ei-card);border:1px solid var(--ei-line);border-radius:15px;padding:15px}.sfr-einv-reporting-kpis span{display:block;color:var(--ei-muted);font-size:12px}.sfr-einv-reporting-kpis strong{display:block;margin-top:7px;font-family:"JetBrains Mono",monospace;font-size:19px}.sfr-einv-reporting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sfr-einv-report-list{display:grid;gap:8px}.sfr-einv-report-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--ei-line);border-radius:10px;background:var(--ei-bg)}.sfr-einv-report-list span{color:var(--ei-muted)}.sfr-einv-report-list strong{font-family:"JetBrains Mono",monospace}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete{background:#f8fafc!important;color:#0f172a!important;border-color:#60a5fa!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete button{background:#f8fafc!important;color:#0f172a!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete button strong{color:#0f172a!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete button span{color:#334155!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete button:hover,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-autocomplete button.is-active{background:#bfdbfe!important;color:#1e3a8a!important}
@container (max-width:900px){.sfr-einv-reporting-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sfr-einv-reporting-grid{grid-template-columns:1fr}.sfr-einv-lines-table{min-width:780px}}
@container (max-width:520px){.sfr-einv-reporting-kpis{grid-template-columns:1fr}.sfr-einv-lines-table{min-width:720px}}


/* Phase 4.9.4 — professional invoice line editor and guided validation. */
.sfr-einv-lines-table{min-width:1040px!important;table-layout:fixed!important}
.sfr-einv-lines-table th:nth-child(1){width:38px!important}.sfr-einv-lines-table th:nth-child(2){width:210px!important}.sfr-einv-lines-table th:nth-child(3){width:120px!important}.sfr-einv-lines-table th:nth-child(4){width:88px!important}.sfr-einv-lines-table th:nth-child(5){width:82px!important}.sfr-einv-lines-table th:nth-child(6){width:105px!important}.sfr-einv-lines-table th:nth-child(7){width:94px!important}.sfr-einv-lines-table th:nth-child(8){width:154px!important}.sfr-einv-lines-table th:nth-child(9){width:135px!important}.sfr-einv-lines-table th:nth-child(10){width:42px!important}
.sfr-einv-lines-table td{padding:8px 6px!important;vertical-align:middle!important;background:var(--ei-card)!important}
.sfr-einv-lines-table tr.is-incomplete td{background:#fff7ed!important}.sfr-einv-lines-table tr.is-complete td{background:var(--ei-card)!important}.sfr-einv-lines-table tr.is-empty td{background:var(--ei-bg)!important}
.sfr-einv-lines-table input,.sfr-einv-lines-table select{min-width:0!important;height:40px!important;padding:8px 9px!important;border-color:#94a3b8!important;background:var(--ei-card)!important;color:var(--ei-text)!important}
.sfr-einv-lines-table .line-name{min-width:0!important;font-weight:800!important}.sfr-einv-lines-table .line-category{min-width:0!important;color:var(--ei-text)!important;font-size:13px!important}
.sfr-einv-tax-cell{display:grid!important;grid-template-columns:minmax(82px,1fr) 58px!important;gap:5px!important}
.sfr-einv-line-total{white-space:normal!important}.sfr-einv-line-total strong{font-size:13px!important}.sfr-einv-line-total small{white-space:normal!important;line-height:1.35!important}
.sfr-einv-lines-table .has-error,.sfr-einv-form-grid .has-error{border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.18)!important;background:#fff7f7!important}
.sfr-einv-error-summary{display:grid;gap:8px;padding:12px;border:1px solid #fecaca;border-radius:12px;background:#fff7f7;color:#991b1b}.sfr-einv-error-summary>strong{font-size:13px}.sfr-einv-error-summary button{width:100%;border:0;border-radius:9px;padding:9px 11px;text-align:right;background:#fff;color:#b91c1c;font-weight:800;cursor:pointer}.sfr-einv-error-summary button:hover,.sfr-einv-error-summary button:focus{background:#fee2e2;outline:2px solid #ef4444}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table td{background:#0f1c2e!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table tr.is-empty td{background:#132238!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table tr.is-incomplete td{background:#2a2112!important}:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table input,:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],.dark) .sfr-einv-lines-table select{background:#091626!important;color:#f8fafc!important;border-color:#47617f!important}
@container (max-width:900px){.sfr-einv-lines-table{min-width:980px!important}}


/* Phase 4.9.5 — restore single-line invoice rows and dark validation contrast. */
.sfr-einv-lines-table{
  min-width:1120px!important;
  table-layout:fixed!important;
}
.sfr-einv-lines-table th:nth-child(1){width:38px!important}
.sfr-einv-lines-table th:nth-child(2){width:230px!important}
.sfr-einv-lines-table th:nth-child(3){width:125px!important}
.sfr-einv-lines-table th:nth-child(4){width:92px!important}
.sfr-einv-lines-table th:nth-child(5){width:90px!important}
.sfr-einv-lines-table th:nth-child(6){width:112px!important}
.sfr-einv-lines-table th:nth-child(7){width:96px!important}
.sfr-einv-lines-table th:nth-child(8){width:176px!important}
.sfr-einv-lines-table th:nth-child(9){width:132px!important}
.sfr-einv-lines-table th:nth-child(10){width:44px!important}
.sfr-einv-lines-table tr{height:58px!important}
.sfr-einv-lines-table td{
  height:58px!important;
  padding:7px 6px!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
.sfr-einv-lines-table input,
.sfr-einv-lines-table select{
  display:block!important;
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  line-height:1.2!important;
}
.sfr-einv-name-cell{display:table-cell!important}
.sfr-einv-tax-cell{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  height:58px!important;
}
.sfr-einv-tax-cell select{flex:1 1 auto!important;min-width:0!important}
.sfr-einv-tax-cell input{flex:0 0 60px!important;width:60px!important}
.sfr-einv-line-total{
  white-space:nowrap!important;
  text-align:right!important;
}
.sfr-einv-line-total strong{
  display:inline!important;
  font-size:13px!important;
}
.sfr-einv-line-total small{
  display:none!important;
}
.sfr-einv-lines-table tr.is-incomplete td,
.sfr-einv-lines-table tr.is-empty td,
.sfr-einv-lines-table tr.is-complete td{
  background:var(--ei-card)!important;
}

/* The platform uses body.dark-platform in production; include it explicitly. */
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary{
  background:#32171c!important;
  border-color:#7f1d1d!important;
  color:#fecaca!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary>strong,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary>strong,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary>strong{
  color:#fee2e2!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button{
  background:#461d24!important;
  color:#fecaca!important;
  border:1px solid #7f1d1d!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:hover,
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:focus,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:hover,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:focus,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:hover,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .sfr-einv-error-summary button:focus{
  background:#5f2029!important;
  color:#fff!important;
  outline-color:#f87171!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .warn,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .warn,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .warn{
  background:#332611!important;
  border:1px solid #854d0e!important;
  color:#fde68a!important;
}
body.dark-platform #sfr-platform-root #sfrElectronicInvoicing .sfr-einv-validation .ok,
body.dark-platform #sfrElectronicInvoicing .sfr-einv-validation .ok,
#sfr-platform-root[data-theme="dark"] #sfrElectronicInvoicing .sfr-einv-validation .ok{
  background:#0d2f25!important;
  border:1px solid #047857!important;
  color:#a7f3d0!important;
}
@container (max-width:900px){
  .sfr-einv-lines-table{min-width:1040px!important}
}

/* SFR 5.4.1.3 — electronic invoice guided workflow, compact progress and smart directories. */
.sfr-einv-stepper-shell{margin:0 0 12px;padding:10px 12px 12px;border:1px solid var(--ei-line);border-radius:16px;background:var(--ei-card);box-shadow:0 6px 20px rgba(15,23,42,.045)}
.sfr-einv-progress.sfr-einv-progress-compact{display:grid;grid-template-columns:auto minmax(80px,1fr) auto;align-items:center;gap:10px;margin:0 2px 9px;padding:0;border:0;border-radius:0;background:transparent}
.sfr-einv-progress-compact>span{color:var(--ei-muted);font-size:10px;font-weight:800;white-space:nowrap}
.sfr-einv-progress-compact>i{display:block;height:3px;border-radius:999px;background:var(--ei-line);overflow:hidden}
.sfr-einv-progress-compact>i>b{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,var(--ei-green),var(--ei-blue2));transition:width .25s ease}
.sfr-einv-progress-compact>strong{font:800 11px/1 'JetBrains Mono',monospace;direction:ltr;color:var(--ei-blue)}
.sfr-einv-data-tabs.sfr-einv-stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:visible}
.sfr-einv-stepper button{position:relative;display:flex;align-items:center;gap:9px;min-width:0;padding:10px 11px;border:1px solid var(--ei-line);border-radius:12px;background:var(--ei-bg);color:var(--ei-muted);text-align:right;box-shadow:none;transition:border-color .18s,background .18s,transform .18s,box-shadow .18s}
.sfr-einv-stepper button:not(:last-child):after{content:"";position:absolute;top:50%;left:-9px;width:9px;height:2px;background:var(--ei-line);transform:translateY(-50%);pointer-events:none}
.sfr-einv-stepper button:hover:not(.is-locked){transform:translateY(-1px);border-color:#93c5fd;background:#eff6ff}
.sfr-einv-step-number{flex:0 0 28px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--ei-line);color:#475569;font:900 12px/1 'JetBrains Mono',monospace;direction:ltr}
.sfr-einv-step-copy{display:grid;gap:2px;min-width:0}
.sfr-einv-step-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;font-size:12px}
.sfr-einv-step-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;font-size:9px;font-weight:600;opacity:.82}
.sfr-einv-stepper button.is-active{border-color:var(--ei-blue2);background:linear-gradient(135deg,var(--ei-blue),var(--ei-blue2));color:#fff;box-shadow:0 7px 17px rgba(30,58,138,.2)}
.sfr-einv-stepper button.is-active .sfr-einv-step-number{background:#fff;color:var(--ei-blue)}
.sfr-einv-stepper button.is-complete:not(.is-active){border-color:#6ee7b7;background:#ecfdf5;color:#047857}
.sfr-einv-stepper button.is-complete:not(.is-active) .sfr-einv-step-number{background:var(--ei-green);color:#fff;font-size:0}
.sfr-einv-stepper button.is-complete:not(.is-active) .sfr-einv-step-number:after{content:"✓";font-size:13px}
.sfr-einv-stepper button.is-locked{opacity:.52;cursor:not-allowed}
.sfr-einv-seller-strip{display:grid;gap:10px;margin:0 0 14px;padding:10px 12px;border:1px solid #bfdbfe;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#eff6ff)}
.sfr-einv-seller-main{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sfr-einv-seller-state{display:flex;align-items:center;gap:10px;min-width:0}
.sfr-einv-seller-state>div{min-width:0}
.sfr-einv-seller-state strong{display:block;color:var(--ei-text);font-size:12px}
.sfr-einv-seller-state small{display:block;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ei-muted);font-size:10px}
.sfr-einv-seller-icon{flex:0 0 27px;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:var(--ei-green);color:#fff;font-weight:900}
.sfr-einv-seller-state.warning .sfr-einv-seller-icon{background:var(--ei-amber)}
.sfr-einv-seller-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.sfr-einv-seller-details{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-top:9px;border-top:1px dashed #bfdbfe}
.sfr-einv-seller-details[hidden]{display:none}
.sfr-einv-seller-details article{padding:8px 9px;border:1px solid var(--ei-line);border-radius:9px;background:var(--ei-card)}
.sfr-einv-seller-details span{display:block;color:var(--ei-muted);font-size:9px}
.sfr-einv-seller-details strong{display:block;margin-top:3px;overflow-wrap:anywhere;font-size:11px}
.sfr-einv-settings-ready{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;padding:13px 15px;border:1px solid #6ee7b7;border-radius:14px;background:#ecfdf5;color:#065f46}
.sfr-einv-settings-ready[hidden]{display:none}
.sfr-einv-settings-ready>div:first-child{display:grid;gap:3px}
.sfr-einv-settings-ready strong{font-size:13px}.sfr-einv-settings-ready span{font-size:11px}
.sfr-einv-settings-ready>div:last-child{display:flex;gap:8px;flex-wrap:wrap}
.sfr-einv-customer-autocomplete{max-height:360px}
.sfr-einv-customer-autocomplete button{align-items:center}
.sfr-einv-customer-option,.sfr-einv-customer-new>span{display:grid;gap:3px;min-width:0;text-align:right}
.sfr-einv-customer-option b,.sfr-einv-customer-new b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.sfr-einv-customer-option small,.sfr-einv-customer-new small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:10px}
.sfr-einv-customer-autocomplete em{flex:0 0 auto;border-radius:999px;padding:4px 7px;background:#eff6ff;color:#1d4ed8;font-size:9px;font-style:normal;font-weight:900}
.sfr-einv-customer-new{margin-top:5px;border-top:1px solid var(--ei-line)!important;color:var(--ei-blue)!important}
.sfr-einv-lines-table tr.is-catalog-item .line-category,.sfr-einv-lines-table tr.is-catalog-item select[data-einv-line="unit"]{background:var(--ei-bg)!important;color:var(--ei-muted)!important;border-style:dashed!important;cursor:default}
.sfr-einv-form-grid input[readonly]{background:var(--ei-bg);color:#475569;border-style:dashed}

:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-stepper-shell{background:#0f1c2e;border-color:#334155}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-stepper button{background:#132238;border-color:#334155;color:#94a3b8}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-stepper button.is-complete:not(.is-active){background:#0d2f25;border-color:#047857;color:#a7f3d0}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-seller-strip{background:#10233c;border-color:#315b8f}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-seller-details article{background:#0b1728;border-color:#334155}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-settings-ready{background:#0d2f25;border-color:#047857;color:#a7f3d0}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-form-grid input[readonly]{background:#132238;color:#cbd5e1}

@container (max-width:900px){
  .sfr-einv-step-copy small{display:none}
  .sfr-einv-stepper button{padding:9px 8px}
  .sfr-einv-seller-details{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container (max-width:650px){
  .sfr-einv-data-tabs.sfr-einv-stepper{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sfr-einv-stepper button:nth-child(2):after{display:none}
  .sfr-einv-seller-main,.sfr-einv-settings-ready{align-items:stretch;flex-direction:column}
  .sfr-einv-seller-state small{white-space:normal;line-height:1.5}
  .sfr-einv-seller-actions,.sfr-einv-settings-ready>div:last-child{justify-content:stretch}
  .sfr-einv-seller-actions .sfr-einv-btn,.sfr-einv-settings-ready .sfr-einv-btn{flex:1}
}
@container (max-width:420px){
  .sfr-einv-step-copy small{display:none}
  .sfr-einv-step-copy b{font-size:11px}
  .sfr-einv-step-number{flex-basis:25px;width:25px;height:25px}
  .sfr-einv-seller-details{grid-template-columns:1fr}
  .sfr-einv-progress-compact>span{display:none}
  .sfr-einv-progress.sfr-einv-progress-compact{grid-template-columns:minmax(80px,1fr) auto}
}
@media print{.sfr-einv-stepper-shell,.sfr-einv-seller-strip,.sfr-einv-customer-autocomplete{display:none!important}}

/* SFR 5.4.1.5 — Smart export HS assistant, compliance checker and calm button alignment. */
.sfr-einv-head-actions,
.sfr-einv-data-actions,
.sfr-einv-final-actions,
.sfr-einv-section-actions,
.sfr-einv-lines-finish-actions,
.sfr-einv-settings-ready>div:last-child{
  display:flex;
  align-items:stretch;
  flex-wrap:wrap;
  gap:8px;
}
.sfr-einv-head-actions{justify-content:flex-end;max-width:520px}
.sfr-einv-final-actions{justify-content:flex-end}
.sfr-einv-data-actions,.sfr-einv-section-actions{justify-content:flex-start}
.sfr-einv-head-actions .sfr-einv-btn,
.sfr-einv-data-actions .sfr-einv-btn,
.sfr-einv-final-actions .sfr-einv-btn,
.sfr-einv-section-actions .sfr-einv-btn,
.sfr-einv-lines-finish-actions .sfr-einv-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 1 158px;
  min-width:118px;
  min-height:40px;
  padding:9px 14px;
  border-radius:10px;
  line-height:1.25;
  text-align:center;
  white-space:normal;
}
.sfr-einv-btn{box-shadow:0 3px 9px rgba(30,58,138,.12);transform:none!important}
.sfr-einv-btn:hover{box-shadow:0 5px 12px rgba(30,58,138,.16)}
.sfr-einv-btn.primary{background:var(--ei-blue2);border:1px solid var(--ei-blue2)}
.sfr-einv-btn.secondary{background:var(--ei-card);border:1px solid #bfdbfe}
.sfr-einv-btn.danger{border:1px solid var(--ei-red)}
.sfr-einv-lines-table.is-export,
.sfr-einv.is-export-invoice .sfr-einv-lines-table{min-width:1280px}
.sfr-einv-hs-cell{min-width:170px}
.sfr-einv-hs-cell input{
  min-width:130px!important;
  direction:ltr;
  text-align:center;
  font:800 12px/1.2 'JetBrains Mono',monospace!important;
  letter-spacing:.04em;
}
.sfr-einv-hs-cell small{
  display:block;
  max-width:180px;
  margin-top:5px;
  color:var(--ei-amber);
  font-size:9px;
  line-height:1.4;
  white-space:normal;
}
.sfr-einv-hs-cell small.is-confirmed{color:#047857}
.sfr-einv-hs-code{font:800 12px/1.2 'JetBrains Mono',monospace;direction:ltr;color:var(--ei-blue)}
.sfr-einv-catalog-table td small{display:block;margin-top:4px;color:var(--ei-muted);font-size:9px;line-height:1.45}
.sfr-einv-autocomplete button>span{display:grid;gap:3px;min-width:0;text-align:right}
.sfr-einv-autocomplete button>span b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.sfr-einv-autocomplete button>span small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:10px}
.sfr-einv-autocomplete button>em{
  flex:0 0 auto;
  padding:4px 7px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font:900 9px/1.2 'JetBrains Mono',monospace;
  font-style:normal;
  direction:ltr;
}
.sfr-einv-autocomplete .sfr-einv-hs-option>em{background:#ecfdf5;color:#047857}
.sfr-einv-compliance{display:grid;gap:10px;margin-bottom:12px}
.sfr-einv-compliance-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border:1px solid var(--ei-line);
  border-radius:12px;
  background:var(--ei-bg);
}
.sfr-einv-compliance-head>div{display:grid;gap:2px}
.sfr-einv-compliance-head span{color:var(--ei-muted);font-size:10px;font-weight:800}
.sfr-einv-compliance-head strong{font-size:14px}
.sfr-einv-compliance-head small{color:var(--ei-muted);font-size:10px}
.sfr-einv-compliance-head>b{
  flex:0 0 52px;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--ei-card);
  border:4px solid var(--ei-line);
  font:900 12px/1 'JetBrains Mono',monospace;
  direction:ltr;
}
.sfr-einv-compliance-head.is-ready{border-color:#6ee7b7;background:#ecfdf5}
.sfr-einv-compliance-head.is-ready>b{border-color:var(--ei-green);color:#047857}
.sfr-einv-compliance-head.has-warnings{border-color:#fcd34d;background:#fffbeb}
.sfr-einv-compliance-head.has-warnings>b{border-color:var(--ei-amber);color:#b45309}
.sfr-einv-compliance-head.is-blocked{border-color:#fecaca;background:#fef2f2}
.sfr-einv-compliance-head.is-blocked>b{border-color:var(--ei-red);color:#b91c1c}
.sfr-einv-compliance-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.sfr-einv-compliance-items article{display:flex;align-items:center;gap:8px;min-width:0;padding:9px 10px;border:1px solid var(--ei-line);border-radius:10px;background:var(--ei-card)}
.sfr-einv-compliance-items article>i{flex:0 0 22px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#fef2f2;color:#b91c1c;font-style:normal;font-weight:900}
.sfr-einv-compliance-items article.is-ok>i{background:#ecfdf5;color:#047857}
.sfr-einv-compliance-items article.is-warning>i{background:#fffbeb;color:#b45309}
.sfr-einv-compliance-items span{display:grid;gap:2px;min-width:0}
.sfr-einv-compliance-items b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.sfr-einv-compliance-items small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ei-muted);font-size:9px}
.sfr-einv-hs-guide-card{margin-top:14px}
.sfr-einv-hs-meta{display:grid;gap:3px;text-align:left}
.sfr-einv-hs-meta small{font-size:10px!important}
.sfr-einv-hs-table{margin-top:14px}
.sfr-einv-hs-table table{min-width:880px}
.sfr-einv-report-paper .report-export{border-color:#6ee7b7;background:#ecfdf5;color:#065f46}
.sfr-einv-report-paper .report-export small{width:100%;color:#047857;font-size:9px}
.sfr-einv-report-paper .report-hs-description{display:block;margin-top:3px;color:#64748b;font-size:8px;line-height:1.35}

:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-compliance-head,
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-compliance-items article{
  background:#0f1c2e;
  border-color:#334155;
}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-compliance-head.is-ready{background:#0d2f25;border-color:#047857}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-compliance-head.has-warnings{background:#332611;border-color:#854d0e}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-compliance-head.is-blocked{background:#3b1820;border-color:#991b1b}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-hs-cell small.is-confirmed{color:#6ee7b7}
:is(#sfr-platform-root[data-theme="dark"],html[data-theme="dark"],body[data-theme="dark"],body.dark-platform,.dark) .sfr-einv-hs-code{color:#93c5fd}

@container (max-width:900px){
  .sfr-einv-compliance-items{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sfr-einv-head-actions{max-width:100%}
}
@container (max-width:650px){
  .sfr-einv-page-head{align-items:stretch}
  .sfr-einv-head-actions,.sfr-einv-data-actions,.sfr-einv-final-actions,.sfr-einv-section-actions,.sfr-einv-lines-finish-actions{width:100%}
  .sfr-einv-head-actions .sfr-einv-btn,.sfr-einv-data-actions .sfr-einv-btn,.sfr-einv-final-actions .sfr-einv-btn,.sfr-einv-section-actions .sfr-einv-btn,.sfr-einv-lines-finish-actions .sfr-einv-btn{flex:1 1 calc(50% - 8px);max-width:none;min-width:0}
  .sfr-einv-compliance-items{grid-template-columns:1fr}
}
@container (max-width:420px){
  .sfr-einv-head-actions .sfr-einv-btn,.sfr-einv-data-actions .sfr-einv-btn,.sfr-einv-final-actions .sfr-einv-btn,.sfr-einv-section-actions .sfr-einv-btn,.sfr-einv-lines-finish-actions .sfr-einv-btn{flex-basis:100%}
  .sfr-einv-compliance-head{align-items:flex-start}
}
@media print{
  .sfr-einv-compliance,.sfr-einv-hs-guide-card{display:none!important}
}
.sfr-einv-status.overdue{background:#fff7ed;color:#c2410c;border:1px solid #fed7aa}

/* 5.4.1.5 professional action geometry — calm, aligned and predictable. */
@container (min-width:761px){
  .sfr-einv-page-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(360px,420px);
    align-items:center;
  }
  .sfr-einv-page-head>.sfr-einv-head-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
    max-width:none;
    min-width:0;
  }
  .sfr-einv-page-head>.sfr-einv-head-actions .sfr-einv-btn{
    width:100%;
    min-width:0;
    max-width:none;
  }
}
@container (max-width:760px){
  .sfr-einv-page-head>.sfr-einv-head-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    max-width:none;
  }
  .sfr-einv-page-head>.sfr-einv-head-actions .sfr-einv-btn{width:100%;min-width:0;max-width:none}
}
@container (max-width:420px){
  .sfr-einv-page-head>.sfr-einv-head-actions{grid-template-columns:1fr}
}

/* ============================================================
   SFR Electronic Invoicing 1.7.0 — export visibility, readable
   line geometry, calm action alignment and artistic print title.
   ============================================================ */
.sfr-einv-export-mode{
  display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;
  margin-top:14px;padding:12px 14px;border:1px solid #86efac;border-radius:13px;
  background:linear-gradient(135deg,#ecfdf5,#f8fffc);color:#065f46
}
.sfr-einv-export-mode[hidden]{display:none!important}
.sfr-einv-export-mode-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:#10b981;color:#fff;font:900 12px "JetBrains Mono",monospace}
.sfr-einv-export-mode strong,.sfr-einv-export-mode span{display:block}.sfr-einv-export-mode span{margin-top:3px;font-size:11px;line-height:1.6;color:#047857}
body.dark-platform .sfr-einv-export-mode{background:#0d2f25;border-color:#047857;color:#d1fae5}body.dark-platform .sfr-einv-export-mode span{color:#a7f3d0}

.sfr-einv-btn{min-height:42px;padding:9px 15px;border-radius:10px;font-size:12px;line-height:1.25;box-shadow:none!important}
.sfr-einv-btn:hover{transform:none!important;box-shadow:0 4px 11px rgba(30,58,138,.13)!important}
.sfr-einv-btn.primary{font-weight:900;background:#2563eb;border-color:#2563eb}
.sfr-einv-btn.secondary{font-weight:850;background:#fff;color:#1e3a8a;border-color:#bfdbfe}
.sfr-einv-head-actions,.sfr-einv-final-actions,.sfr-einv-data-actions,.sfr-einv-section-actions,.sfr-einv-lines-finish-actions{align-items:stretch!important;gap:8px!important}
.sfr-einv-head-actions .sfr-einv-btn,.sfr-einv-final-actions .sfr-einv-btn,.sfr-einv-data-actions .sfr-einv-btn,.sfr-einv-section-actions .sfr-einv-btn,.sfr-einv-lines-finish-actions .sfr-einv-btn{min-width:142px;min-height:42px;margin:0}
.sfr-einv-final-actions{display:grid!important;grid-template-columns:repeat(4,minmax(145px,1fr));max-width:860px;margin-inline-start:auto}
.sfr-einv-final-actions .sfr-einv-btn.primary{grid-column:auto}

.sfr-einv-table-wrap:has(.sfr-einv-lines-table){scrollbar-gutter:stable both-edges;overscroll-behavior-inline:contain}
.sfr-einv-lines-table{width:max-content!important;min-width:1430px!important;table-layout:fixed}
.sfr-einv.is-export-invoice .sfr-einv-lines-table{min-width:1630px!important}
.sfr-einv-lines-table col.col-index{width:46px}.sfr-einv-lines-table col.col-name{width:270px}.sfr-einv-lines-table col.col-category{width:160px}.sfr-einv-lines-table col.col-unit{width:125px}.sfr-einv-lines-table col.col-hs{width:205px}.sfr-einv-lines-table col.col-quantity{width:110px}.sfr-einv-lines-table col.col-price{width:145px}.sfr-einv-lines-table col.col-discount{width:135px}.sfr-einv-lines-table col.col-tax{width:190px}.sfr-einv-lines-table col.col-total{width:180px}.sfr-einv-lines-table col.col-action{width:52px}
.sfr-einv-lines-table th,.sfr-einv-lines-table td{overflow:hidden}.sfr-einv-lines-table th{text-align:center;padding:10px 7px}.sfr-einv-lines-table td{padding:8px 7px}
.sfr-einv-lines-table input,.sfr-einv-lines-table select{min-width:0!important;height:42px;padding:8px 9px;border-radius:9px;font-size:12px}
.sfr-einv-lines-table .line-name{min-width:0!important}.sfr-einv-lines-table .col-name input,.sfr-einv-lines-table .col-category input{text-align:right}
.sfr-einv-lines-table .col-quantity input,.sfr-einv-lines-table .col-price input,.sfr-einv-lines-table .col-discount input,.sfr-einv-lines-table .sfr-einv-hs-cell input{direction:ltr;text-align:center;font-family:"JetBrains Mono",monospace;font-variant-numeric:tabular-nums}
.sfr-einv-lines-table .sfr-einv-tax-cell{display:grid;grid-template-columns:minmax(92px,1fr) 72px;gap:6px;align-items:center}
.sfr-einv-lines-table .sfr-einv-line-total{direction:ltr;text-align:center;white-space:normal;font-variant-numeric:tabular-nums}
.sfr-einv-lines-table .sfr-einv-line-total strong{display:block;font:900 13px/1.25 "JetBrains Mono",monospace;color:#0f172a;white-space:nowrap}
.sfr-einv-lines-table .sfr-einv-line-total small{display:block;margin-top:4px;color:#64748b;font-size:9px;line-height:1.35;direction:rtl}
.sfr-einv-hs-cell{min-width:0!important}.sfr-einv-hs-cell input{min-width:0!important;width:100%!important}.sfr-einv-hs-cell small{max-width:none!important;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sfr-einv-remove{width:34px;height:34px;margin:auto;display:grid;place-items:center}
body.dark-platform .sfr-einv-lines-table .sfr-einv-line-total strong{color:#e5eefb}

.sfr-einv-lines-finish{border-color:#93c5fd!important;background:#eff6ff!important}.sfr-einv-lines-finish>div:first-child strong{color:#1e3a8a}.sfr-einv-lines-finish>div:first-child span{color:#475569}
body.dark-platform .sfr-einv-lines-finish{background:#102742!important;border-color:#315f9c!important}body.dark-platform .sfr-einv-lines-finish>div:first-child strong{color:#bfdbfe}body.dark-platform .sfr-einv-lines-finish>div:first-child span{color:#a9b9cc}

.sfr-einv-report-paper .report-document-title{display:flex;align-items:baseline;gap:8px;margin-top:5px}.sfr-einv-report-paper .report-document-title>span{color:#475569;font-size:13px;font-weight:800}.sfr-einv-report-paper .report-document-title>strong{position:relative;color:#1e3a8a;font-size:20px;font-weight:950;line-height:1}.sfr-einv-report-paper .report-document-title>strong:after{content:"";position:absolute;inset-inline:0;bottom:-6px;height:3px;border-radius:999px;background:#3b82f6}.sfr-einv-report-paper .report-document-title>strong.is-export{color:#047857}.sfr-einv-report-paper .report-document-title>strong.is-export:after{background:#10b981}.sfr-einv-report-paper .report-document-title>strong.is-local{color:#1e3a8a}

@container(max-width:760px){.sfr-einv-final-actions{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none}.sfr-einv-export-mode{grid-template-columns:42px minmax(0,1fr)}.sfr-einv-export-mode .sfr-einv-btn{grid-column:1/-1;width:100%}}
@container(max-width:440px){.sfr-einv-final-actions{grid-template-columns:1fr}.sfr-einv-head-actions .sfr-einv-btn,.sfr-einv-final-actions .sfr-einv-btn,.sfr-einv-data-actions .sfr-einv-btn,.sfr-einv-section-actions .sfr-einv-btn,.sfr-einv-lines-finish-actions .sfr-einv-btn{min-width:0;width:100%}}
@media print{.sfr-einv-report-paper .report-document-title>strong:after{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* SFR 5.4.1.9 — print-safe A4 geometry and full-width invoice lines */
.sfr-einv-report-paper,.sfr-einv-report-paper *{box-sizing:border-box}
.sfr-einv-report-paper{overflow:visible}
.sfr-einv-report-paper .report-head{min-width:0}
.sfr-einv-report-paper .report-brand{min-width:0;flex:1 1 auto}
.sfr-einv-report-paper .report-brand>div:last-child{min-width:0}
.sfr-einv-report-paper .report-number{flex:0 1 42%;max-width:42%;padding-inline:0;min-width:0;text-align:start}
.sfr-einv-report-paper .report-number strong{max-width:100%;font-size:11px;line-height:1.35;word-break:break-all;overflow-wrap:anywhere}
.sfr-einv-report-paper .report-lines-table{width:100%;max-width:100%;table-layout:fixed;border-collapse:collapse;margin-inline:0}
.sfr-einv-report-paper .report-lines-table th,.sfr-einv-report-paper .report-lines-table td{padding:6px 4px;vertical-align:middle;overflow-wrap:anywhere;word-break:normal}
.sfr-einv-report-paper .report-lines-table th{font-size:9px;line-height:1.3;white-space:normal}
.sfr-einv-report-paper .report-lines-table td{font-size:9px;line-height:1.4}
.sfr-einv-report-paper .report-lines-table td:first-child{text-align:center}
.sfr-einv-report-paper .report-lines-table td:nth-last-child(-n+5){direction:ltr;text-align:center;font-family:'JetBrains Mono',monospace;white-space:nowrap}
.sfr-einv-report-paper .report-lines-table.has-hs td:nth-last-child(-n+5){direction:ltr;text-align:center}
.sfr-einv-report-paper .report-footer{display:grid;grid-template-columns:minmax(0,1fr) 38mm;align-items:end;gap:12mm;min-width:0}
.sfr-einv-report-paper .report-footer>div:first-child{min-width:0}
.sfr-einv-report-paper .qr-wrap{width:38mm;max-width:38mm;min-width:0;justify-self:end;overflow:visible}
.sfr-einv-report-paper .sfr-einv-qr-image,.sfr-einv-report-paper .sfr-einv-qr-svg,.sfr-einv-report-paper .sfr-einv-qr-error{width:34mm!important;height:34mm!important;max-width:100%!important}
@media print{
  .sfr-einv-report-paper{width:100%!important;max-width:none!important;margin:0!important;padding:7mm 8mm!important;border:0!important;box-shadow:none!important;overflow:visible!important}
  .sfr-einv-report-paper .report-head{gap:8mm}
  .sfr-einv-report-paper .report-number{flex-basis:42%;max-width:42%}
  .sfr-einv-report-paper .report-lines-table{width:100%!important;table-layout:fixed!important}
  .sfr-einv-report-paper .report-footer{grid-template-columns:minmax(0,1fr) 38mm;gap:10mm}
}

/* SFR 5.4.9.13 — invoice workflow typography alignment and one-row continuity. */
.sfr-einv-stepper-shell{
  font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif;
}
.sfr-einv-progress-compact>span{
  font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif;
  font-size:12px;
  font-weight:800;
  line-height:1.45;
}
.sfr-einv-progress-compact>strong{font:800 12px/1.2 Inter,"JetBrains Mono",monospace}
.sfr-einv-data-tabs.sfr-einv-stepper{
  grid-template-columns:repeat(4,minmax(0,1fr));
  direction:rtl;
}
.sfr-einv-stepper button{
  min-height:64px;
  font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif;
}
.sfr-einv-step-copy{align-content:center;gap:3px}
.sfr-einv-step-copy b{
  display:-webkit-box;
  white-space:normal;
  text-overflow:ellipsis;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif;
  font-size:13.25px;
  font-weight:800;
  line-height:1.45;
}
.sfr-einv-step-copy small{
  font-family:"Cairo","Tajawal",Tahoma,Arial,sans-serif;
  font-size:10.75px;
  font-weight:600;
  line-height:1.45;
  opacity:.86;
}
.sfr-einv-step-number{font:800 12px/1 Inter,"JetBrains Mono",monospace}
@container (max-width:680px){
  .sfr-einv-data-tabs.sfr-einv-stepper{
    display:flex;
    flex-wrap:nowrap;
    grid-template-columns:none;
    overflow-x:auto;
    overflow-y:visible;
    overscroll-behavior-inline:contain;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    padding-bottom:2px;
  }
  .sfr-einv-data-tabs.sfr-einv-stepper::-webkit-scrollbar{display:none}
  .sfr-einv-stepper button{
    flex:0 0 min(78cqi,260px);
    width:min(78cqi,260px);
    min-height:62px;
    scroll-snap-align:center;
  }
  .sfr-einv-stepper button:nth-child(2):after{display:block}
}
@container (max-width:420px){
  .sfr-einv-step-copy b{font-size:12.5px}
  .sfr-einv-step-copy small{font-size:10.25px}
  .sfr-einv-step-number{flex-basis:27px;width:27px;height:27px}
}
