{"id":1176,"date":"2026-06-07T14:52:46","date_gmt":"2026-06-07T14:52:46","guid":{"rendered":"https:\/\/360bizbrokers.com\/?page_id=1176"},"modified":"2026-06-07T15:02:27","modified_gmt":"2026-06-07T15:02:27","slug":"sba-financing-analysis-and-calculator","status":"publish","type":"page","link":"https:\/\/360bizbrokers.com\/es\/sba-financing-analysis-and-calculator\/","title":{"rendered":"SBA &#038; Financing Analysis and Calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1176\" class=\"elementor elementor-1176\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-060a48a e-flex e-con-boxed e-con e-parent\" data-id=\"060a48a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-64787cd elementor-widget elementor-widget-html\" data-id=\"64787cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>SBA & Financing Analyzer | Broker's Pro Suite\u2122<\/title>\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Anton&family=Lato:wght@300;400;700;900&family=Roboto+Mono:wght@400;600&display=swap\" rel=\"stylesheet\">\n<style>\n\/* ============================================================\n   CSS VARIABLES & RESET\n   ============================================================ *\/\n:root {\n  --gold: #B8960C;\n  --gold-light: #C9A84C;\n  --gold-pale: #e8d48a;\n  --gold-dim: rgba(184,150,12,0.15);\n  --gold-border: rgba(184,150,12,0.35);\n  --black: #111111;\n  --black-soft: #1a1a1a;\n  --black-card: #1e1e1e;\n  --black-panel: #252525;\n  --white: #ffffff;\n  --white-dim: rgba(255,255,255,0.08);\n  --white-muted: rgba(255,255,255,0.55);\n  --green: #2ecc71;\n  --green-dim: rgba(46,204,113,0.15);\n  --red: #e74c3c;\n  --red-dim: rgba(231,76,60,0.15);\n  --yellow: #f39c12;\n  --yellow-dim: rgba(243,156,18,0.15);\n  --radius: 10px;\n  --shadow: 0 4px 24px rgba(0,0,0,0.45);\n}\n\n*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }\n\nbody {\n  background: var(--black);\n  color: var(--white);\n  font-family: 'Lato', sans-serif;\n  font-size: 14px;\n  line-height: 1.6;\n  min-height: 100vh;\n}\n\n\/* ============================================================\n   HEADER\n   ============================================================ *\/\n.app-header {\n  background: linear-gradient(135deg, #0e0e0e 0%, #1a1700 100%);\n  border-bottom: 2px solid var(--gold);\n  padding: 18px 28px;\n  display: flex;\n  align-items: center;\n  gap: 16px;\n  position: sticky;\n  top: 0;\n  z-index: 100;\n}\n.app-logo {\n  width: 42px; height: 42px;\n  background: var(--gold);\n  border-radius: 8px;\n  display: flex; align-items: center; justify-content: center;\n  font-family: 'Anton', sans-serif;\n  font-size: 18px;\n  color: var(--black);\n  flex-shrink: 0;\n}\n.app-title-block h1 {\n  font-family: 'Anton', sans-serif;\n  font-size: 20px;\n  letter-spacing: 1px;\n  color: var(--white);\n  line-height: 1.1;\n}\n.app-title-block span {\n  font-size: 11px;\n  color: var(--gold-light);\n  font-weight: 700;\n  letter-spacing: 2px;\n  text-transform: uppercase;\n}\n.header-badge {\n  margin-left: auto;\n  background: var(--gold-dim);\n  border: 1px solid var(--gold-border);\n  color: var(--gold-light);\n  padding: 5px 12px;\n  border-radius: 20px;\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 1.5px;\n  text-transform: uppercase;\n}\n\n\/* ============================================================\n   LAYOUT\n   ============================================================ *\/\n.app-container {\n  max-width: 1180px;\n  margin: 0 auto;\n  padding: 24px 20px 60px;\n}\n\n\/* ============================================================\n   TABS\n   ============================================================ *\/\n.tabs-nav {\n  display: flex;\n  gap: 4px;\n  background: var(--black-soft);\n  border: 1px solid rgba(255,255,255,0.08);\n  border-radius: 12px;\n  padding: 6px;\n  margin-bottom: 28px;\n  flex-wrap: wrap;\n}\n.tab-btn {\n  flex: 1;\n  min-width: 140px;\n  background: transparent;\n  border: none;\n  color: var(--white-muted);\n  padding: 10px 14px;\n  border-radius: 8px;\n  cursor: pointer;\n  font-family: 'Lato', sans-serif;\n  font-size: 12px;\n  font-weight: 700;\n  letter-spacing: 0.8px;\n  text-transform: uppercase;\n  transition: all 0.2s;\n  display: flex;\n  align-items: center;\n  gap: 7px;\n  justify-content: center;\n  white-space: nowrap;\n}\n.tab-btn:hover { color: var(--white); background: var(--white-dim); }\n.tab-btn.active {\n  background: var(--gold);\n  color: var(--black);\n  box-shadow: 0 2px 12px rgba(184,150,12,0.4);\n}\n.tab-btn .tab-num {\n  width: 20px; height: 20px;\n  background: rgba(0,0,0,0.25);\n  border-radius: 50%;\n  display: flex; align-items: center; justify-content: center;\n  font-size: 10px;\n  flex-shrink: 0;\n}\n.tab-btn.active .tab-num { background: rgba(0,0,0,0.3); }\n\n.tab-panel { display: none; }\n.tab-panel.active { display: block; }\n\n\/* ============================================================\n   SECTION TITLES\n   ============================================================ *\/\n.section-title {\n  font-family: 'Anton', sans-serif;\n  font-size: 22px;\n  letter-spacing: 1.5px;\n  color: var(--gold-light);\n  margin-bottom: 6px;\n}\n.section-sub {\n  color: var(--white-muted);\n  font-size: 13px;\n  margin-bottom: 24px;\n}\n\n\/* ============================================================\n   CARDS & PANELS\n   ============================================================ *\/\n.card {\n  background: var(--black-card);\n  border: 1px solid rgba(255,255,255,0.07);\n  border-radius: var(--radius);\n  padding: 22px 24px;\n  margin-bottom: 20px;\n}\n.card-title {\n  font-family: 'Anton', sans-serif;\n  font-size: 14px;\n  letter-spacing: 1.5px;\n  text-transform: uppercase;\n  color: var(--gold-light);\n  margin-bottom: 16px;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n.card-title::before {\n  content: '';\n  width: 3px; height: 16px;\n  background: var(--gold);\n  border-radius: 2px;\n}\n\n\/* ============================================================\n   GRID HELPERS\n   ============================================================ *\/\n.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }\n.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }\n.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 14px; }\n@media(max-width:768px) {\n  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }\n  .tabs-nav { gap: 3px; }\n  .tab-btn { min-width: 100px; font-size: 10px; }\n}\n\n\/* ============================================================\n   FORM ELEMENTS\n   ============================================================ *\/\n.field-group { display: flex; flex-direction: column; gap: 5px; }\nlabel {\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 0.8px;\n  text-transform: uppercase;\n  color: var(--white-muted);\n}\ninput, select, textarea {\n  background: var(--black-panel);\n  border: 1px solid rgba(255,255,255,0.12);\n  border-radius: 7px;\n  color: var(--white);\n  font-family: 'Lato', sans-serif;\n  font-size: 14px;\n  padding: 9px 12px;\n  transition: border-color 0.2s;\n  width: 100%;\n}\ninput:focus, select:focus, textarea:focus {\n  outline: none;\n  border-color: var(--gold);\n  background: #1f1d11;\n}\ninput[type=\"number\"] { font-family: 'Roboto Mono', monospace; }\nselect option { background: var(--black-card); }\n.input-prefix-wrap { position: relative; }\n.input-prefix-wrap .prefix {\n  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);\n  color: var(--gold-light); font-weight: 700; pointer-events: none; font-size: 14px;\n}\n.input-prefix-wrap input { padding-left: 24px; }\n.field-hint { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }\n\n\/* ============================================================\n   BUTTONS\n   ============================================================ *\/\n.btn {\n  display: inline-flex; align-items: center; gap: 8px;\n  padding: 11px 24px;\n  border-radius: 8px;\n  border: none;\n  font-family: 'Lato', sans-serif;\n  font-size: 13px;\n  font-weight: 700;\n  letter-spacing: 0.8px;\n  cursor: pointer;\n  transition: all 0.2s;\n  text-transform: uppercase;\n}\n.btn-gold {\n  background: var(--gold);\n  color: var(--black);\n}\n.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(184,150,12,0.4); }\n.btn-outline {\n  background: transparent;\n  color: var(--gold-light);\n  border: 1px solid var(--gold-border);\n}\n.btn-outline:hover { background: var(--gold-dim); }\n.btn-sm { padding: 7px 16px; font-size: 11px; }\n.btn-block { width: 100%; justify-content: center; }\n\n\/* ============================================================\n   KPI METRIC CARDS\n   ============================================================ *\/\n.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }\n.kpi-card {\n  background: var(--black-panel);\n  border: 1px solid rgba(255,255,255,0.07);\n  border-radius: var(--radius);\n  padding: 16px 18px;\n  position: relative;\n  overflow: hidden;\n}\n.kpi-card::after {\n  content: '';\n  position: absolute; bottom: 0; left: 0; right: 0;\n  height: 2px;\n  background: var(--gold);\n}\n.kpi-card.green::after { background: var(--green); }\n.kpi-card.red::after { background: var(--red); }\n.kpi-card.yellow::after { background: var(--yellow); }\n.kpi-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--white-muted); margin-bottom: 6px; }\n.kpi-value { font-family: 'Roboto Mono', monospace; font-size: 22px; font-weight: 600; color: var(--white); line-height: 1.1; }\n.kpi-value.gold { color: var(--gold-light); }\n.kpi-value.green { color: var(--green); }\n.kpi-value.red { color: var(--red); }\n.kpi-value.yellow { color: var(--yellow); }\n.kpi-sub { font-size: 11px; color: var(--white-muted); margin-top: 4px; }\n\n\/* ============================================================\n   VERDICT BANNER\n   ============================================================ *\/\n.verdict-banner {\n  border-radius: var(--radius);\n  padding: 20px 24px;\n  display: flex;\n  align-items: center;\n  gap: 16px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n.verdict-banner.pass { background: var(--green-dim); border-color: rgba(46,204,113,0.4); }\n.verdict-banner.fail { background: var(--red-dim); border-color: rgba(231,76,60,0.4); }\n.verdict-banner.caution { background: var(--yellow-dim); border-color: rgba(243,156,18,0.4); }\n.verdict-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }\n.verdict-text h3 { font-family: 'Anton', sans-serif; font-size: 18px; letter-spacing: 1px; margin-bottom: 4px; }\n.verdict-text p { font-size: 13px; color: rgba(255,255,255,0.75); }\n.verdict-banner.pass .verdict-text h3 { color: var(--green); }\n.verdict-banner.fail .verdict-text h3 { color: var(--red); }\n.verdict-banner.caution .verdict-text h3 { color: var(--yellow); }\n\n\/* ============================================================\n   CHECKLIST\n   ============================================================ *\/\n.checklist { display: flex; flex-direction: column; gap: 8px; }\n.check-item {\n  display: flex; align-items: flex-start; gap: 10px;\n  padding: 10px 14px;\n  border-radius: 7px;\n  border: 1px solid transparent;\n  font-size: 13px;\n}\n.check-item.pass { background: var(--green-dim); border-color: rgba(46,204,113,0.25); }\n.check-item.fail { background: var(--red-dim); border-color: rgba(231,76,60,0.25); }\n.check-item.warn { background: var(--yellow-dim); border-color: rgba(243,156,18,0.25); }\n.check-item.neutral { background: var(--white-dim); border-color: rgba(255,255,255,0.1); }\n.check-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }\n.check-text { flex: 1; }\n.check-text strong { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }\n.check-text span { color: rgba(255,255,255,0.6); font-size: 12px; }\n\n\/* ============================================================\n   AMORTIZATION TABLE\n   ============================================================ *\/\n.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.07); }\ntable { width: 100%; border-collapse: collapse; }\nthead th {\n  background: var(--black-panel);\n  padding: 10px 14px;\n  font-size: 10px;\n  font-weight: 700;\n  letter-spacing: 1px;\n  text-transform: uppercase;\n  color: var(--gold-light);\n  text-align: right;\n  border-bottom: 1px solid rgba(255,255,255,0.08);\n}\nthead th:first-child { text-align: left; }\ntbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; }\ntbody tr:hover { background: rgba(255,255,255,0.03); }\ntbody td {\n  padding: 9px 14px;\n  font-family: 'Roboto Mono', monospace;\n  font-size: 12px;\n  text-align: right;\n  color: rgba(255,255,255,0.8);\n}\ntbody td:first-child { text-align: left; font-family: 'Lato', sans-serif; font-size: 12px; color: var(--white-muted); font-weight: 700; }\n.tbl-highlight { color: var(--gold-light) !important; font-weight: 600 !important; }\n\n\/* ============================================================\n   PROGRESS BAR \/ GAUGE\n   ============================================================ *\/\n.ratio-bar-wrap { margin-top: 8px; }\n.ratio-bar-track {\n  height: 8px;\n  background: rgba(255,255,255,0.08);\n  border-radius: 4px;\n  overflow: hidden;\n}\n.ratio-bar-fill {\n  height: 100%;\n  border-radius: 4px;\n  transition: width 0.6s ease;\n}\n.ratio-bar-fill.green { background: var(--green); }\n.ratio-bar-fill.yellow { background: var(--yellow); }\n.ratio-bar-fill.red { background: var(--red); }\n.ratio-bar-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--white-muted); margin-top: 4px; }\n\n\/* ============================================================\n   SCENARIO COMPARISON TABLE\n   ============================================================ *\/\n.scenario-table { width: 100%; border-collapse: collapse; }\n.scenario-table th, .scenario-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13px; }\n.scenario-table th { background: var(--black-panel); color: var(--gold-light); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; text-align: center; }\n.scenario-table th:first-child { text-align: left; }\n.scenario-table td { text-align: center; font-family: 'Roboto Mono', monospace; font-size: 13px; }\n.scenario-table td:first-child { text-align: left; font-family: 'Lato', sans-serif; font-weight: 700; font-size: 12px; color: var(--white-muted); }\n.scenario-best { background: rgba(46,204,113,0.07) !important; }\n\n\/* ============================================================\n   DIVIDER\n   ============================================================ *\/\n.divider { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 20px 0; }\n\n\/* ============================================================\n   PRINT \/ REPORT\n   ============================================================ *\/\n.report-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }\n\n\/* ============================================================\n   TOOLTIP BADGE\n   ============================================================ *\/\n.info-badge {\n  display: inline-block;\n  width: 15px; height: 15px;\n  background: rgba(255,255,255,0.1);\n  border-radius: 50%;\n  font-size: 9px;\n  text-align: center;\n  line-height: 15px;\n  color: var(--white-muted);\n  cursor: help;\n  font-weight: 700;\n  margin-left: 4px;\n  position: relative;\n}\n\n\/* ============================================================\n   ANIMATED LOADING SPINNER\n   ============================================================ *\/\n.hidden { display: none !important; }\n.calculating {\n  text-align: center;\n  padding: 40px;\n  color: var(--gold-light);\n  font-size: 13px;\n  font-weight: 700;\n  letter-spacing: 1px;\n  text-transform: uppercase;\n}\n\n\/* ============================================================\n   INTRO HERO\n   ============================================================ *\/\n.intro-hero {\n  background: linear-gradient(135deg, #1a1700 0%, #0e0e0e 60%);\n  border: 1px solid var(--gold-border);\n  border-radius: 14px;\n  padding: 30px 32px;\n  margin-bottom: 26px;\n  position: relative;\n  overflow: hidden;\n}\n.intro-hero::before {\n  content: 'SBA';\n  position: absolute;\n  right: -20px; top: -20px;\n  font-family: 'Anton', sans-serif;\n  font-size: 120px;\n  color: rgba(184,150,12,0.06);\n  line-height: 1;\n  pointer-events: none;\n}\n.intro-hero h2 {\n  font-family: 'Anton', sans-serif;\n  font-size: 26px;\n  letter-spacing: 1.5px;\n  color: var(--gold-light);\n  margin-bottom: 8px;\n}\n.intro-hero p {\n  color: rgba(255,255,255,0.65);\n  font-size: 14px;\n  max-width: 700px;\n  line-height: 1.7;\n}\n.intro-pills {\n  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px;\n}\n.intro-pill {\n  background: var(--gold-dim);\n  border: 1px solid var(--gold-border);\n  color: var(--gold-light);\n  padding: 4px 12px;\n  border-radius: 20px;\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 1px;\n  text-transform: uppercase;\n}\n<\/style>\n<\/head>\n<body>\n\n<!-- ============================================================\n     HEADER\n     ============================================================ -->\n<div class=\"app-header\">\n  <div class=\"app-logo\">SBA<\/div>\n  <div class=\"app-title-block\">\n    <h1>SBA & FINANCING ANALYZER<\/h1>\n    <span>Broker's Pro Suite\u2122 \u00b7 360 Biz Brokers<\/span>\n  <\/div>\n  <div class=\"header-badge\">v1.0<\/div>\n<\/div>\n\n<!-- ============================================================\n     MAIN CONTAINER\n     ============================================================ -->\n<div class=\"app-container\">\n\n  <!-- INTRO HERO -->\n  <div class=\"intro-hero\">\n    <h2>SBA LOAN ELIGIBILITY &amp; FINANCING ANALYSIS<\/h2>\n    <p>Enter the business financials and deal structure below to instantly calculate debt service coverage, SBA approvability, buyer cash flow, and full amortization. This tool analyzes deals against current SBA 7(a) lending standards.<\/p>\n    <div class=\"intro-pills\">\n      <span class=\"intro-pill\">SBA 7(a)<\/span>\n      <span class=\"intro-pill\">DSCR Analysis<\/span>\n      <span class=\"intro-pill\">Debt Service<\/span>\n      <span class=\"intro-pill\">Buyer Cash Flow<\/span>\n      <span class=\"intro-pill\">Amortization<\/span>\n      <span class=\"intro-pill\">Scenario Comparison<\/span>\n    <\/div>\n  <\/div>\n\n  <!-- TABS NAV -->\n  <div class=\"tabs-nav\">\n    <button class=\"tab-btn active\" onclick=\"switchTab('input')\"><span class=\"tab-num\">1<\/span> Deal Inputs<\/button>\n    <button class=\"tab-btn\" onclick=\"switchTab('sba')\"><span class=\"tab-num\">2<\/span> SBA Eligibility<\/button>\n    <button class=\"tab-btn\" onclick=\"switchTab('debt')\"><span class=\"tab-num\">3<\/span> Debt Service<\/button>\n    <button class=\"tab-btn\" onclick=\"switchTab('cashflow')\"><span class=\"tab-num\">4<\/span> Buyer Cash Flow<\/button>\n    <button class=\"tab-btn\" onclick=\"switchTab('amort')\"><span class=\"tab-num\">5<\/span> Amortization<\/button>\n    <button class=\"tab-btn\" onclick=\"switchTab('scenarios')\"><span class=\"tab-num\">6<\/span> Scenarios<\/button>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 1: DEAL INPUTS\n       ============================================================ -->\n  <div id=\"tab-input\" class=\"tab-panel active\">\n    <div class=\"section-title\">DEAL INPUTS<\/div>\n    <div class=\"section-sub\">Enter all relevant financials. All calculations update automatically when you click \"Analyze Deal\".<\/div>\n\n    <!-- BUSINESS FINANCIALS -->\n    <div class=\"card\">\n      <div class=\"card-title\">Business Financials (Most Recent Full Year)<\/div>\n      <div class=\"grid-3\">\n        <div class=\"field-group\">\n          <label>Gross Revenue<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"revenue\" value=\"1200000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Total Operating Expenses (excl. owner comp)<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"opex\" value=\"750000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Owner's Compensation \/ Draws<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"owner_comp\" value=\"120000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Depreciation & Amortization<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"da\" value=\"30000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Existing Interest Expense<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"interest\" value=\"15000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Existing Debt Payments (annual)<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"existing_debt\" value=\"0\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">Debt that will NOT be retired at closing<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Net Income (from tax return \/ P&L)<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"net_income\" value=\"135000\" min=\"0\" step=\"1000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Non-Recurring Add-Backs<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"addbacks\" value=\"20000\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">One-time expenses, personal items, etc.<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Business Type \/ Industry<\/label>\n          <select id=\"biz_type\">\n            <option value=\"service\">Service Business<\/option>\n            <option value=\"retail\">Retail<\/option>\n            <option value=\"restaurant\">Restaurant \/ Food Service<\/option>\n            <option value=\"franchise\">Franchise<\/option>\n            <option value=\"manufacturing\">Manufacturing<\/option>\n            <option value=\"distribution\">Distribution \/ Wholesale<\/option>\n            <option value=\"healthcare\">Healthcare<\/option>\n            <option value=\"construction\">Construction \/ Trades<\/option>\n            <option value=\"auto\">Auto Services<\/option>\n            <option value=\"other\">Other<\/option>\n          <\/select>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <!-- DEAL STRUCTURE -->\n    <div class=\"card\">\n      <div class=\"card-title\">Deal Structure<\/div>\n      <div class=\"grid-3\">\n        <div class=\"field-group\">\n          <label>Asking \/ Purchase Price<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"price\" value=\"650000\" min=\"0\" step=\"5000\"><\/div>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Buyer Down Payment<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"down_payment\" value=\"65000\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">Typically 10% for SBA 7(a)<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Seller Note (if any)<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"seller_note\" value=\"0\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">SBA may require standby during loan term<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Seller Note Interest Rate (%)<\/label>\n          <input type=\"number\" id=\"seller_note_rate\" value=\"6\" min=\"0\" max=\"20\" step=\"0.25\">\n        <\/div>\n        <div class=\"field-group\">\n          <label>Seller Note Term (years)<\/label>\n          <input type=\"number\" id=\"seller_note_term\" value=\"5\" min=\"1\" max=\"10\" step=\"1\">\n        <\/div>\n        <div class=\"field-group\">\n          <label>Working Capital Needed<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"working_capital\" value=\"25000\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">To be rolled into SBA loan if needed<\/span>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <!-- LOAN PARAMETERS -->\n    <div class=\"card\">\n      <div class=\"card-title\">SBA Loan Parameters<\/div>\n      <div class=\"grid-4\">\n        <div class=\"field-group\">\n          <label>SBA Interest Rate (%)<\/label>\n          <input type=\"number\" id=\"sba_rate\" value=\"11.5\" min=\"1\" max=\"20\" step=\"0.25\">\n          <span class=\"field-hint\">Prime + spread (current ~11\u201312%)<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Loan Term (years)<\/label>\n          <select id=\"loan_term\">\n            <option value=\"7\">7 Years<\/option>\n            <option value=\"10\" selected>10 Years<\/option>\n            <option value=\"15\">15 Years<\/option>\n            <option value=\"25\">25 Years (RE)<\/option>\n          <\/select>\n        <\/div>\n        <div class=\"field-group\">\n          <label>SBA Guaranty Fee (%)<\/label>\n          <input type=\"number\" id=\"sba_fee\" value=\"3.5\" min=\"0\" max=\"5\" step=\"0.1\">\n          <span class=\"field-hint\">Typically 3.5% on loans >$700k<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Include Real Estate?<\/label>\n          <select id=\"include_re\">\n            <option value=\"no\">No (Business Only)<\/option>\n            <option value=\"yes\">Yes (includes RE)<\/option>\n          <\/select>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <!-- BUYER PROFILE -->\n    <div class=\"card\">\n      <div class=\"card-title\">Buyer Profile (for Cash Flow Analysis)<\/div>\n      <div class=\"grid-3\">\n        <div class=\"field-group\">\n          <label>Buyer Required Annual Salary<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"buyer_salary\" value=\"80000\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">What the buyer needs to live on<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Buyer's Personal Debt Service (annual)<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"personal_debt\" value=\"24000\" min=\"0\" step=\"1000\"><\/div>\n          <span class=\"field-hint\">Mortgage, car loans, personal loans<\/span>\n        <\/div>\n        <div class=\"field-group\">\n          <label>Buyer's Liquid Net Worth<\/label>\n          <div class=\"input-prefix-wrap\"><span class=\"prefix\">$<\/span><input type=\"number\" id=\"buyer_networth\" value=\"200000\" min=\"0\" step=\"5000\"><\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <div style=\"text-align:center; margin-top: 10px;\">\n      <button class=\"btn btn-gold\" style=\"font-size:15px; padding:14px 48px;\" onclick=\"analyzeAll()\">\u26a1 ANALYZE DEAL<\/button>\n    <\/div>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 2: SBA ELIGIBILITY\n       ============================================================ -->\n  <div id=\"tab-sba\" class=\"tab-panel\">\n    <div class=\"section-title\">SBA 7(A) ELIGIBILITY ANALYSIS<\/div>\n    <div class=\"section-sub\">Analysis of the deal's eligibility and approvability under SBA 7(a) lending guidelines.<\/div>\n    <div id=\"sba-output\"><div class=\"calculating\">Enter inputs and click \"Analyze Deal\" to see results.<\/div><\/div>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 3: DEBT SERVICE\n       ============================================================ -->\n  <div id=\"tab-debt\" class=\"tab-panel\">\n    <div class=\"section-title\">DEBT SERVICE ANALYSIS<\/div>\n    <div class=\"section-sub\">SDE recast, Debt Service Coverage Ratio (DSCR), and loan feasibility metrics.<\/div>\n    <div id=\"debt-output\"><div class=\"calculating\">Enter inputs and click \"Analyze Deal\" to see results.<\/div><\/div>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 4: BUYER CASH FLOW\n       ============================================================ -->\n  <div id=\"tab-cashflow\" class=\"tab-panel\">\n    <div class=\"section-title\">BUYER CASH FLOW PROJECTION<\/div>\n    <div class=\"section-sub\">Post-debt-service cash available to the buyer after loan payments, salary, and obligations.<\/div>\n    <div id=\"cashflow-output\"><div class=\"calculating\">Enter inputs and click \"Analyze Deal\" to see results.<\/div><\/div>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 5: AMORTIZATION\n       ============================================================ -->\n  <div id=\"tab-amort\" class=\"tab-panel\">\n    <div class=\"section-title\">LOAN AMORTIZATION SCHEDULE<\/div>\n    <div class=\"section-sub\">Year-by-year loan balance, principal, interest, and cumulative payments.<\/div>\n    <div id=\"amort-output\"><div class=\"calculating\">Enter inputs and click \"Analyze Deal\" to see results.<\/div><\/div>\n  <\/div>\n\n  <!-- ============================================================\n       TAB 6: SCENARIOS\n       ============================================================ -->\n  <div id=\"tab-scenarios\" class=\"tab-panel\">\n    <div class=\"section-title\">SCENARIO COMPARISON<\/div>\n    <div class=\"section-sub\">Side-by-side comparison of different loan structures, down payments, and deal configurations.<\/div>\n    <div id=\"scenarios-output\"><div class=\"calculating\">Enter inputs and click \"Analyze Deal\" to see results.<\/div><\/div>\n  <\/div>\n\n<\/div><!-- \/.app-container -->\n\n<!-- ============================================================\n     JAVASCRIPT ENGINE\n     ============================================================ -->\n<script>\n\/\/ ================================================================\n\/\/  TAB SWITCHER\n\/\/ ================================================================\nfunction switchTab(id) {\n  document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));\n  document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));\n  document.getElementById('tab-' + id).classList.add('active');\n  event.currentTarget.classList.add('active');\n}\n\n\/\/ ================================================================\n\/\/  HELPERS\n\/\/ ================================================================\nconst fmt = n => '$' + Math.round(n).toLocaleString('en-US');\nconst fmtD = n => '$' + n.toLocaleString('en-US', {minimumFractionDigits:2, maximumFractionDigits:2});\nconst pct = n => (n * 100).toFixed(1) + '%';\nconst num = id => parseFloat(document.getElementById(id).value) || 0;\n\nfunction pmt(rate, nper, pv) {\n  \/\/ Monthly payment calculation\n  if (rate === 0) return pv \/ nper;\n  const r = rate \/ 12;\n  return pv * r * Math.pow(1 + r, nper) \/ (Math.pow(1 + r, nper) - 1);\n}\n\n\/\/ ================================================================\n\/\/  MAIN ANALYSIS ENGINE\n\/\/ ================================================================\nfunction analyzeAll() {\n  const D = getInputData();\n  if (!validate(D)) return;\n\n  renderSBA(D);\n  renderDebt(D);\n  renderCashFlow(D);\n  renderAmort(D);\n  renderScenarios(D);\n\n  \/\/ Auto-switch to SBA tab\n  document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));\n  document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));\n  document.getElementById('tab-sba').classList.add('active');\n  document.querySelectorAll('.tab-btn')[1].classList.add('active');\n}\n\nfunction getInputData() {\n  const price      = num('price');\n  const down       = num('down_payment');\n  const sellerNote = num('seller_note');\n  const wc         = num('working_capital');\n  const revenue    = num('revenue');\n  const opex       = num('opex');\n  const ownerComp  = num('owner_comp');\n  const da         = num('da');\n  const interest   = num('interest');\n  const netIncome  = num('net_income');\n  const addbacks   = num('addbacks');\n  const existDebt  = num('existing_debt');\n  const sbaRate    = num('sba_rate') \/ 100;\n  const loanTerm   = parseInt(document.getElementById('loan_term').value);\n  const sbaFee     = num('sba_fee') \/ 100;\n  const snRate     = num('seller_note_rate') \/ 100;\n  const snTerm     = num('seller_note_term');\n  const buyerSal   = num('buyer_salary');\n  const personalDs = num('personal_debt');\n  const networth   = num('buyer_networth');\n  const bizType    = document.getElementById('biz_type').value;\n  const includeRE  = document.getElementById('include_re').value === 'yes';\n\n  \/\/ Loan amount = Price - Down - Seller Note + WC\n  const loanAmount = price - down - sellerNote + wc;\n\n  \/\/ SDE = Net Income + DA + Interest + Owner Comp + Addbacks\n  const sde = netIncome + da + interest + ownerComp + addbacks;\n\n  \/\/ Monthly \/ Annual SBA Payment\n  const monthlyPmt = pmt(sbaRate, loanTerm * 12, loanAmount);\n  const annualSbaPmt = monthlyPmt * 12;\n\n  \/\/ Seller Note Payment\n  const monthlySnPmt = sellerNote > 0 ? pmt(snRate, snTerm * 12, sellerNote) : 0;\n  const annualSnPmt = monthlySnPmt * 12;\n\n  \/\/ Total Annual Debt Service\n  const totalAnnualDS = annualSbaPmt + annualSnPmt + existDebt;\n\n  \/\/ DSCR = SDE \/ Total Annual Debt Service\n  const dscr = totalAnnualDS > 0 ? sde \/ totalAnnualDS : 0;\n\n  \/\/ Down payment % of price\n  const downPct = price > 0 ? down \/ price : 0;\n\n  \/\/ SBA Guaranty Fee (applied to loan amount above $350k)\n  const guarantyFee = loanAmount * sbaFee;\n\n  \/\/ Price \/ SDE multiple (valuation sanity check)\n  const sdeMultiple = sde > 0 ? price \/ sde : 0;\n\n  \/\/ Post-debt-service cash\n  const postDSCash = sde - totalAnnualDS;\n  const buyerNetCash = postDSCash - buyerSal - personalDs;\n\n  \/\/ Effective yield on buyer's down payment (cash-on-cash)\n  const coc = down > 0 ? postDSCash \/ down : 0;\n\n  \/\/ Payback period\n  const payback = down > 0 && postDSCash > 0 ? down \/ postDSCash : 0;\n\n  return {\n    price, down, sellerNote, wc, revenue, opex, ownerComp, da, interest,\n    netIncome, addbacks, existDebt, sbaRate, loanTerm, sbaFee, snRate, snTerm,\n    buyerSal, personalDs, networth, bizType, includeRE,\n    loanAmount, sde, monthlyPmt, annualSbaPmt, annualSnPmt, totalAnnualDS,\n    dscr, downPct, guarantyFee, sdeMultiple, postDSCash, buyerNetCash, coc, payback\n  };\n}\n\nfunction validate(D) {\n  if (D.price <= 0) { alert('Please enter a valid Purchase Price.'); return false; }\n  if (D.loanAmount <= 0) { alert('Down payment + seller note exceeds purchase price. Please check inputs.'); return false; }\n  return true;\n}\n\n\/\/ ================================================================\n\/\/  TAB 2 \u2014 SBA ELIGIBILITY\n\/\/ ================================================================\nfunction renderSBA(D) {\n  const checks = [];\n\n  \/\/ 1. DSCR\n  const dscrPass = D.dscr >= 1.25;\n  const dscrWarn = D.dscr >= 1.10 && D.dscr < 1.25;\n  checks.push({\n    status: dscrPass ? 'pass' : (dscrWarn ? 'warn' : 'fail'),\n    icon: dscrPass ? '\u2705' : (dscrWarn ? '\u26a0\ufe0f' : '\u274c'),\n    title: 'Debt Service Coverage Ratio (DSCR)',\n    detail: `DSCR = ${D.dscr.toFixed(2)}x \u2014 SBA minimum is 1.25x. ${dscrPass ? 'PASSES.' : dscrWarn ? 'Marginal. Lender may still approve with strong collateral\/buyer.' : 'FAILS minimum threshold. Restructuring required.'}`\n  });\n\n  \/\/ 2. Down payment\n  const dpPct = D.downPct * 100;\n  const dpPass = D.downPct >= 0.10;\n  checks.push({\n    status: dpPass ? 'pass' : 'fail',\n    icon: dpPass ? '\u2705' : '\u274c',\n    title: 'Buyer Down Payment',\n    detail: `${dpPct.toFixed(1)}% equity injection \u2014 SBA 7(a) typically requires minimum 10%. ${dpPass ? 'Meets requirement.' : 'Below 10% \u2014 seller carryback or additional injection may be needed.'}`\n  });\n\n  \/\/ 3. Loan size\n  const loanPass = D.loanAmount <= 5000000;\n  checks.push({\n    status: loanPass ? 'pass' : 'fail',\n    icon: loanPass ? '\u2705' : '\u274c',\n    title: 'SBA 7(a) Loan Size Limit',\n    detail: `Requested loan: ${fmt(D.loanAmount)} \u2014 Maximum SBA 7(a) loan: $5,000,000. ${loanPass ? 'Within limits.' : 'Exceeds SBA limit. Consider SBA 504 or conventional financing.'}`\n  });\n\n  \/\/ 4. Seller note standby\n  const snIssue = D.sellerNote > 0 && D.sellerNote > D.price * 0.3;\n  checks.push({\n    status: snIssue ? 'warn' : 'pass',\n    icon: snIssue ? '\u26a0\ufe0f' : '\u2705',\n    title: 'Seller Note \/ Standby Requirement',\n    detail: D.sellerNote > 0\n      ? `Seller note of ${fmt(D.sellerNote)} (${(D.sellerNote\/D.price*100).toFixed(1)}% of price). SBA may require seller note to be on standby (interest-only or deferred) during SBA loan term. ${snIssue ? 'Note exceeds 30% \u2014 confirm standby agreement.' : 'Acceptable structure.'}`\n      : 'No seller note. Clean structure.'\n  });\n\n  \/\/ 5. SDE multiple \/ valuation\n  const multOk = D.sdeMultiple <= 4.5;\n  const multWarn = D.sdeMultiple > 4.5 && D.sdeMultiple <= 5.5;\n  checks.push({\n    status: multOk ? 'pass' : (multWarn ? 'warn' : 'fail'),\n    icon: multOk ? '\u2705' : (multWarn ? '\u26a0\ufe0f' : '\u274c'),\n    title: 'Price-to-SDE Valuation Multiple',\n    detail: `${D.sdeMultiple.toFixed(2)}x SDE. Lenders prefer \u22644.0\u20134.5x. ${multOk ? 'Within acceptable range.' : multWarn ? 'Elevated multiple \u2014 appraisal and strong financials needed.' : 'High multiple \u2014 full business appraisal required, lender may discount.'}`\n  });\n\n  \/\/ 6. Industry eligibility\n  const ineligible = ['gambling','cannabis','life insurance','pyramid'].includes(D.bizType);\n  checks.push({\n    status: 'pass',\n    icon: '\u2705',\n    title: 'SBA Industry Eligibility',\n    detail: 'Business type appears eligible for SBA financing. Note: SBA excludes certain industries (speculation, gambling, lending, cannabis federally, etc.). Confirm with lender.'\n  });\n\n  \/\/ 7. Liquidity check\n  const liqPass = D.networth >= D.down * 1.5;\n  checks.push({\n    status: liqPass ? 'pass' : 'warn',\n    icon: liqPass ? '\u2705' : '\u26a0\ufe0f',\n    title: 'Buyer Liquidity & Net Worth',\n    detail: `Buyer liquid net worth: ${fmt(D.networth)} vs. required injection: ${fmt(D.down)}. ${liqPass ? 'Adequate liquidity.' : 'Buyer may need to document additional assets or co-borrower.'}`\n  });\n\n  \/\/ 8. Collateral (general guidance)\n  checks.push({\n    status: 'neutral',\n    icon: '\u2139\ufe0f',\n    title: 'Collateral Requirements',\n    detail: 'SBA 7(a) lenders are not required to decline a loan solely for lack of collateral, but will take all available collateral including business assets, buyer\\'s personal real estate (if >25% equity), and equipment. If loan >$350,000, personal guarantee from all 20%+ owners is required.'\n  });\n\n  \/\/ Overall verdict\n  const failCount = checks.filter(c => c.status === 'fail').length;\n  const warnCount = checks.filter(c => c.status === 'warn').length;\n  let overallStatus, overallIcon, overallTitle, overallText;\n  if (failCount === 0 && warnCount <= 1) {\n    overallStatus = 'pass'; overallIcon = '\ud83c\udfe6';\n    overallTitle = 'LIKELY SBA APPROVABLE';\n    overallText = `This deal structure meets SBA 7(a) underwriting guidelines. DSCR of ${D.dscr.toFixed(2)}x is above the 1.25x minimum. Recommend submitting to 2-3 SBA preferred lenders for pre-qualification.`;\n  } else if (failCount <= 1) {\n    overallStatus = 'caution'; overallIcon = '\u26a1';\n    overallTitle = 'CONDITIONALLY APPROVABLE \u2014 RESTRUCTURING RECOMMENDED';\n    overallText = `Deal may be approvable with adjustments. ${failCount} critical issue(s) and ${warnCount} caution(s) identified. Review checklist items and consider restructuring the deal structure or loan amount.`;\n  } else {\n    overallStatus = 'fail'; overallIcon = '\ud83d\udeab';\n    overallTitle = 'NOT SBA APPROVABLE IN CURRENT FORM';\n    overallText = `${failCount} critical criteria fail. The deal requires significant restructuring \u2014 consider higher down payment, lower purchase price, or seller financing to bridge the gap.`;\n  }\n\n  let html = `\n  <div class=\"verdict-banner ${overallStatus}\">\n    <div class=\"verdict-icon\">${overallIcon}<\/div>\n    <div class=\"verdict-text\">\n      <h3>${overallTitle}<\/h3>\n      <p>${overallText}<\/p>\n    <\/div>\n  <\/div>\n\n  <div class=\"kpi-grid\">\n    <div class=\"kpi-card ${D.dscr >= 1.25 ? 'green' : D.dscr >= 1.10 ? 'yellow' : 'red'}\">\n      <div class=\"kpi-label\">DSCR<\/div>\n      <div class=\"kpi-value ${D.dscr >= 1.25 ? 'green' : D.dscr >= 1.10 ? 'yellow' : 'red'}\">${D.dscr.toFixed(2)}x<\/div>\n      <div class=\"kpi-sub\">Min Required: 1.25x<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Loan Amount<\/div>\n      <div class=\"kpi-value gold\">${fmt(D.loanAmount)}<\/div>\n      <div class=\"kpi-sub\">Max SBA: $5,000,000<\/div>\n    <\/div>\n    <div class=\"kpi-card ${D.downPct >= 0.10 ? 'green' : 'red'}\">\n      <div class=\"kpi-label\">Down Payment %<\/div>\n      <div class=\"kpi-value ${D.downPct >= 0.10 ? 'green' : 'red'}\">${pct(D.downPct)}<\/div>\n      <div class=\"kpi-sub\">Min Required: 10%<\/div>\n    <\/div>\n    <div class=\"kpi-card ${D.sdeMultiple <= 4.5 ? 'green' : 'yellow'}\">\n      <div class=\"kpi-label\">Price \/ SDE<\/div>\n      <div class=\"kpi-value ${D.sdeMultiple <= 4.5 ? 'green' : 'yellow'}\">${D.sdeMultiple.toFixed(2)}x<\/div>\n      <div class=\"kpi-sub\">Preferred: \u22644.0x<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Annual SDE<\/div>\n      <div class=\"kpi-value gold\">${fmt(D.sde)}<\/div>\n      <div class=\"kpi-sub\">Recast earnings<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">SBA Guaranty Fee<\/div>\n      <div class=\"kpi-value\">${fmt(D.guarantyFee)}<\/div>\n      <div class=\"kpi-sub\">Financed or paid upfront<\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">SBA ELIGIBILITY CHECKLIST<\/div>\n    <div class=\"checklist\">\n      ${checks.map(c => `\n      <div class=\"check-item ${c.status}\">\n        <span class=\"check-icon\">${c.icon}<\/span>\n        <div class=\"check-text\">\n          <strong>${c.title}<\/strong>\n          <span>${c.detail}<\/span>\n        <\/div>\n      <\/div>`).join('')}\n    <\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">KEY SBA 7(A) PARAMETERS AT A GLANCE<\/div>\n    <div class=\"grid-2\">\n      <div>\n        <table style=\"width:100%; font-size:12px;\">\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Maximum Loan Amount<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">$5,000,000<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Min. Down Payment<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">10% (typically)<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Required DSCR<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">1.25x minimum<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Standard Term (biz)<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">10 years<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; color:var(--white-muted);\">Standard Term (RE)<\/td><td style=\"text-align:right; padding:7px 0; font-family:Roboto Mono,monospace;\">25 years<\/td><\/tr>\n        <\/table>\n      <\/div>\n      <div>\n        <table style=\"width:100%; font-size:12px;\">\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Personal Guarantee<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">Required \u226520% owners<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Prepayment Penalty<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">Yes (1st 3 yrs, 7(a))<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Guaranty Fee (>$700k)<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">3.5%<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Rate Type<\/td><td style=\"text-align:right; padding:7px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">Variable (Prime + spread)<\/td><\/tr>\n          <tr><td style=\"padding:7px 0; color:var(--white-muted);\">Business Appraisal<\/td><td style=\"text-align:right; padding:7px 0; font-family:Roboto Mono,monospace;\">Required >$250k change of ownership<\/td><\/tr>\n        <\/table>\n      <\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"report-actions\">\n    <button class=\"btn btn-outline btn-sm\" onclick=\"window.print()\">\ud83d\udda8\ufe0f Print \/ Save PDF<\/button>\n  <\/div>`;\n\n  document.getElementById('sba-output').innerHTML = html;\n}\n\n\/\/ ================================================================\n\/\/  TAB 3 \u2014 DEBT SERVICE\n\/\/ ================================================================\nfunction renderDebt(D) {\n  const dscrColor = D.dscr >= 1.25 ? 'green' : D.dscr >= 1.10 ? 'yellow' : 'red';\n  const dscrPct = Math.min(D.dscr \/ 2 * 100, 100);\n\n  let html = `\n  <div class=\"kpi-grid\">\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Seller's Discretionary Earnings (SDE)<\/div>\n      <div class=\"kpi-value gold\">${fmt(D.sde)}<\/div>\n      <div class=\"kpi-sub\">Recast annual cash flow<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Annual SBA Debt Service<\/div>\n      <div class=\"kpi-value\">${fmt(D.annualSbaPmt)}<\/div>\n      <div class=\"kpi-sub\">${fmtD(D.monthlyPmt)}\/mo<\/div>\n    <\/div>\n    ${D.sellerNote > 0 ? `\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Annual Seller Note Payment<\/div>\n      <div class=\"kpi-value\">${fmt(D.annualSnPmt)}<\/div>\n      <div class=\"kpi-sub\">${fmtD(D.annualSnPmt\/12)}\/mo<\/div>\n    <\/div>` : ''}\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Total Annual Debt Service<\/div>\n      <div class=\"kpi-value\">${fmt(D.totalAnnualDS)}<\/div>\n      <div class=\"kpi-sub\">${fmtD(D.totalAnnualDS\/12)}\/mo<\/div>\n    <\/div>\n    <div class=\"kpi-card ${dscrColor}\">\n      <div class=\"kpi-label\">DSCR<\/div>\n      <div class=\"kpi-value ${dscrColor}\">${D.dscr.toFixed(2)}x<\/div>\n      <div class=\"kpi-sub\">${D.dscr >= 1.25 ? '\u2705 Meets SBA 1.25x min' : '\u274c Below 1.25x minimum'}<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Post-DS Remaining Cash<\/div>\n      <div class=\"kpi-value ${D.postDSCash > 0 ? 'green' : 'red'}\">${fmt(D.postDSCash)}<\/div>\n      <div class=\"kpi-sub\">SDE minus all debt service<\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">DSCR GAUGE<\/div>\n    <div style=\"margin-bottom:16px;\">\n      <div style=\"display:flex; justify-content:space-between; margin-bottom:6px;\">\n        <span style=\"font-family:Roboto Mono,monospace; font-size:28px; font-weight:600; color:${D.dscr >= 1.25 ? 'var(--green)' : D.dscr >= 1.10 ? 'var(--yellow)' : 'var(--red)'};\">${D.dscr.toFixed(2)}x<\/span>\n        <span style=\"font-size:12px; color:var(--white-muted); align-self:flex-end; margin-bottom:6px;\">Minimum Required: 1.25x<\/span>\n      <\/div>\n      <div class=\"ratio-bar-track\">\n        <div class=\"ratio-bar-fill ${dscrColor}\" style=\"width:${dscrPct}%\"><\/div>\n      <\/div>\n      <div class=\"ratio-bar-label\"><span>0x<\/span><span style=\"color:var(--yellow)\">1.10x Marginal<\/span><span style=\"color:var(--green)\">1.25x SBA Min<\/span><span>2.0x+<\/span><\/div>\n    <\/div>\n    <p style=\"font-size:12px; color:var(--white-muted); margin-top:8px;\">\n      DSCR = SDE \u00f7 Total Annual Debt Service = ${fmt(D.sde)} \u00f7 ${fmt(D.totalAnnualDS)} = <strong style=\"color:var(--white)\">${D.dscr.toFixed(2)}x<\/strong>.\n      ${D.dscr >= 1.25 ? 'This deal has sufficient cash flow to cover all debt obligations.' :\n        D.dscr >= 1.10 ? 'Marginal coverage \u2014 strong buyer profile and collateral will be critical.' :\n        'Insufficient cash flow. Consider: lower price, higher down payment, or renegotiated terms.'}\n    <\/p>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">SDE RECAST WATERFALL<\/div>\n    <table style=\"width:100%; font-size:13px;\">\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">Net Income (as reported)<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace;\">${fmt(D.netIncome)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">+ Depreciation & Amortization<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--green);\">+ ${fmt(D.da)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">+ Interest Expense<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--green);\">+ ${fmt(D.interest)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">+ Owner's Compensation<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--green);\">+ ${fmt(D.ownerComp)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">+ Non-Recurring Add-Backs<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--green);\">+ ${fmt(D.addbacks)}<\/td><\/tr>\n      <tr style=\"background:rgba(184,150,12,0.1);\"><td style=\"padding:10px 0; font-weight:700; font-size:14px;\">= SELLER'S DISCRETIONARY EARNINGS (SDE)<\/td><td style=\"text-align:right; padding:10px 0; font-family:Roboto Mono,monospace; font-size:16px; color:var(--gold-light); font-weight:700;\">${fmt(D.sde)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted); padding-top:16px;\">- SBA Annual Debt Service<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red); padding-top:16px;\">- ${fmt(D.annualSbaPmt)}<\/td><\/tr>\n      ${D.annualSnPmt > 0 ? `<tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">- Seller Note Payments<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red);\">- ${fmt(D.annualSnPmt)}<\/td><\/tr>` : ''}\n      ${D.existDebt > 0 ? `<tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">- Existing Retained Debt<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red);\">- ${fmt(D.existDebt)}<\/td><\/tr>` : ''}\n      <tr style=\"background:rgba(46,204,113,0.07);\"><td style=\"padding:10px 0; font-weight:700; font-size:14px;\">= POST-DEBT SERVICE CASH<\/td><td style=\"text-align:right; padding:10px 0; font-family:Roboto Mono,monospace; font-size:16px; color:${D.postDSCash >= 0 ? 'var(--green)' : 'var(--red)'}; font-weight:700;\">${fmt(D.postDSCash)}<\/td><\/tr>\n    <\/table>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">LOAN SUMMARY<\/div>\n    <div class=\"grid-3\">\n      <div>\n        <div class=\"kpi-label\">Loan Amount<\/div>\n        <div style=\"font-family:Roboto Mono,monospace; font-size:18px; color:var(--white); margin:4px 0;\">${fmt(D.loanAmount)}<\/div>\n        <div class=\"field-hint\">Price - Down - Seller Note + WC<\/div>\n      <\/div>\n      <div>\n        <div class=\"kpi-label\">Monthly Payment<\/div>\n        <div style=\"font-family:Roboto Mono,monospace; font-size:18px; color:var(--gold-light); margin:4px 0;\">${fmtD(D.monthlyPmt)}<\/div>\n        <div class=\"field-hint\">${D.loanTerm}-yr at ${(D.sbaRate*100).toFixed(2)}%<\/div>\n      <\/div>\n      <div>\n        <div class=\"kpi-label\">Total Interest Paid<\/div>\n        <div style=\"font-family:Roboto Mono,monospace; font-size:18px; color:var(--white); margin:4px 0;\">${fmt(D.annualSbaPmt * D.loanTerm - D.loanAmount)}<\/div>\n        <div class=\"field-hint\">Over full loan term<\/div>\n      <\/div>\n    <\/div>\n  <\/div>`;\n\n  document.getElementById('debt-output').innerHTML = html;\n}\n\n\/\/ ================================================================\n\/\/  TAB 4 \u2014 BUYER CASH FLOW\n\/\/ ================================================================\nfunction renderCashFlow(D) {\n  const cocPct = D.coc * 100;\n  const buyerNetOk = D.buyerNetCash > 0;\n\n  let html = `\n  <div class=\"kpi-grid\">\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">SDE Available<\/div>\n      <div class=\"kpi-value gold\">${fmt(D.sde)}<\/div>\n      <div class=\"kpi-sub\">Pre-debt annual earnings<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Post-DS Cash<\/div>\n      <div class=\"kpi-value ${D.postDSCash > 0 ? 'green' : 'red'}\">${fmt(D.postDSCash)}<\/div>\n      <div class=\"kpi-sub\">After all debt service<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Buyer Net Cash (after salary & personal debt)<\/div>\n      <div class=\"kpi-value ${buyerNetOk ? 'green' : 'red'}\">${fmt(D.buyerNetCash)}<\/div>\n      <div class=\"kpi-sub\">${buyerNetOk ? '\u2705 Positive' : '\u274c Shortfall'}<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Cash-on-Cash Return<\/div>\n      <div class=\"kpi-value ${cocPct >= 15 ? 'green' : cocPct >= 8 ? 'yellow' : 'red'}\">${cocPct.toFixed(1)}%<\/div>\n      <div class=\"kpi-sub\">On ${fmt(D.down)} down<\/div>\n    <\/div>\n    <div class=\"kpi-card\">\n      <div class=\"kpi-label\">Down Payment Payback<\/div>\n      <div class=\"kpi-value\">${D.payback > 0 ? D.payback.toFixed(1) + ' yrs' : 'N\/A'}<\/div>\n      <div class=\"kpi-sub\">Recovery of equity injection<\/div>\n    <\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">BUYER CASH FLOW WATERFALL<\/div>\n    <table style=\"width:100%; font-size:13px;\">\n      <tr style=\"background:rgba(184,150,12,0.08);\"><td style=\"padding:10px 0; font-weight:700;\">SDE (Recast Business Cash Flow)<\/td><td style=\"text-align:right; padding:10px 0; font-family:Roboto Mono,monospace; font-size:15px; color:var(--gold-light); font-weight:700;\">${fmt(D.sde)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">- Total Annual Debt Service<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red);\">- ${fmt(D.totalAnnualDS)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-weight:600;\">= Post-Debt Service Cash<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; font-weight:600; color:${D.postDSCash >= 0 ? 'var(--green)' : 'var(--red)'};\">${fmt(D.postDSCash)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">- Buyer's Required Salary<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red);\">- ${fmt(D.buyerSal)}<\/td><\/tr>\n      <tr><td style=\"padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--white-muted);\">- Buyer's Personal Debt Service<\/td><td style=\"text-align:right; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-family:Roboto Mono,monospace; color:var(--red);\">- ${fmt(D.personalDs)}<\/td><\/tr>\n      <tr style=\"background:${D.buyerNetCash >= 0 ? 'rgba(46,204,113,0.08)' : 'rgba(231,76,60,0.08)'};\"><td style=\"padding:10px 0; font-weight:700; font-size:14px;\">= NET BUYER RESIDUAL CASH<\/td><td style=\"text-align:right; padding:10px 0; font-family:Roboto Mono,monospace; font-size:16px; color:${D.buyerNetCash >= 0 ? 'var(--green)' : 'var(--red)'}; font-weight:700;\">${fmt(D.buyerNetCash)}<\/td><\/tr>\n    <\/table>\n  <\/div>\n\n  <div class=\"grid-2\">\n    <div class=\"card\">\n      <div class=\"card-title\">RETURN ON INVESTMENT<\/div>\n      <div style=\"margin-bottom:12px;\">\n        <div class=\"kpi-label\">Cash-on-Cash Return<\/div>\n        <div style=\"font-family:Roboto Mono,monospace; font-size:32px; font-weight:600; color:${cocPct >= 15 ? 'var(--green)' : cocPct >= 8 ? 'var(--yellow)' : 'var(--red)'}; margin:6px 0;\">${cocPct.toFixed(1)}%<\/div>\n        <div class=\"ratio-bar-track\">\n          <div class=\"ratio-bar-fill ${cocPct >= 15 ? 'green' : cocPct >= 8 ? 'yellow' : 'red'}\" style=\"width:${Math.min(cocPct * 2, 100)}%\"><\/div>\n        <\/div>\n        <div class=\"ratio-bar-label\"><span>0%<\/span><span style=\"color:var(--yellow)\">8% Acceptable<\/span><span style=\"color:var(--green)\">15%+ Excellent<\/span><\/div>\n      <\/div>\n      <p style=\"font-size:12px; color:var(--white-muted); margin-top:8px;\">\n        Post-DS cash ${fmt(D.postDSCash)} \u00f7 Down payment ${fmt(D.down)} = ${cocPct.toFixed(1)}%.\n        ${cocPct >= 20 ? 'Excellent return on equity injection.' : cocPct >= 12 ? 'Good return \u2014 typical for business acquisitions.' : cocPct >= 6 ? 'Marginal \u2014 buyer should evaluate lifestyle & growth upside.' : 'Low ROI on down payment \u2014 deal structure may need adjustment.'}\n      <\/p>\n    <\/div>\n\n    <div class=\"card\">\n      <div class=\"card-title\">DEAL FEASIBILITY SUMMARY<\/div>\n      <div class=\"checklist\">\n        <div class=\"check-item ${D.dscr >= 1.25 ? 'pass' : 'fail'}\">\n          <span class=\"check-icon\">${D.dscr >= 1.25 ? '\u2705' : '\u274c'}<\/span>\n          <div class=\"check-text\"><strong>DSCR Passes SBA Test<\/strong><span>${D.dscr.toFixed(2)}x (min 1.25x)<\/span><\/div>\n        <\/div>\n        <div class=\"check-item ${D.postDSCash > 0 ? 'pass' : 'fail'}\">\n          <span class=\"check-icon\">${D.postDSCash > 0 ? '\u2705' : '\u274c'}<\/span>\n          <div class=\"check-text\"><strong>Positive Post-DS Cash<\/strong><span>${fmt(D.postDSCash)}\/year<\/span><\/div>\n        <\/div>\n        <div class=\"check-item ${D.buyerNetCash > 0 ? 'pass' : 'fail'}\">\n          <span class=\"check-icon\">${D.buyerNetCash > 0 ? '\u2705' : '\u274c'}<\/span>\n          <div class=\"check-text\"><strong>Buyer Can Meet Salary + Personal Debt<\/strong><span>Residual: ${fmt(D.buyerNetCash)}<\/span><\/div>\n        <\/div>\n        <div class=\"check-item ${cocPct >= 10 ? 'pass' : 'warn'}\">\n          <span class=\"check-icon\">${cocPct >= 10 ? '\u2705' : '\u26a0\ufe0f'}<\/span>\n          <div class=\"check-text\"><strong>Acceptable ROI on Down Payment<\/strong><span>${cocPct.toFixed(1)}% cash-on-cash return<\/span><\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/div>`;\n\n  document.getElementById('cashflow-output').innerHTML = html;\n}\n\n\/\/ ================================================================\n\/\/  TAB 5 \u2014 AMORTIZATION (Annual Summary)\n\/\/ ================================================================\nfunction renderAmort(D) {\n  const r = D.sbaRate \/ 12;\n  const n = D.loanTerm * 12;\n  const mp = D.monthlyPmt;\n  let balance = D.loanAmount;\n  let totalInterest = 0;\n  let totalPrincipal = 0;\n\n  let rows = '';\n  for (let yr = 1; yr <= D.loanTerm; yr++) {\n    let yearPrincipal = 0, yearInterest = 0;\n    for (let mo = 0; mo < 12; mo++) {\n      const intPmt = balance * r;\n      const prinPmt = mp - intPmt;\n      yearInterest += intPmt;\n      yearPrincipal += prinPmt;\n      balance -= prinPmt;\n      if (balance < 0) balance = 0;\n    }\n    totalInterest += yearInterest;\n    totalPrincipal += yearPrincipal;\n    const highlight = yr === 1 || yr === D.loanTerm || yr % 5 === 0;\n    rows += `\n    <tr ${highlight ? 'style=\"background:rgba(184,150,12,0.05)\"' : ''}>\n      <td>Year ${yr}<\/td>\n      <td class=\"${highlight ? 'tbl-highlight' : ''}\">${fmtD(mp * 12)}<\/td>\n      <td>${fmtD(yearPrincipal)}<\/td>\n      <td>${fmtD(yearInterest)}<\/td>\n      <td class=\"${highlight ? 'tbl-highlight' : ''}\">${fmtD(Math.max(balance, 0))}<\/td>\n      <td>${pct(Math.max(balance,0) \/ D.loanAmount)}<\/td>\n    <\/tr>`;\n  }\n\n  let html = `\n  <div class=\"kpi-grid\">\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Loan Amount<\/div><div class=\"kpi-value gold\">${fmt(D.loanAmount)}<\/div><\/div>\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Monthly Payment<\/div><div class=\"kpi-value\">${fmtD(D.monthlyPmt)}<\/div><\/div>\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Total Payments<\/div><div class=\"kpi-value\">${fmt(D.monthlyPmt * D.loanTerm * 12)}<\/div><\/div>\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Total Interest Cost<\/div><div class=\"kpi-value red\">${fmt(D.annualSbaPmt * D.loanTerm - D.loanAmount)}<\/div><\/div>\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Rate<\/div><div class=\"kpi-value\">${(D.sbaRate*100).toFixed(2)}%<\/div><\/div>\n    <div class=\"kpi-card\"><div class=\"kpi-label\">Term<\/div><div class=\"kpi-value\">${D.loanTerm} yrs<\/div><\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">ANNUAL AMORTIZATION SCHEDULE \u2014 SBA LOAN<\/div>\n    <div class=\"table-wrap\">\n      <table>\n        <thead>\n          <tr>\n            <th style=\"text-align:left;\">Period<\/th>\n            <th>Annual Payment<\/th>\n            <th>Principal<\/th>\n            <th>Interest<\/th>\n            <th>Ending Balance<\/th>\n            <th>% Remaining<\/th>\n          <\/tr>\n        <\/thead>\n        <tbody>${rows}<\/tbody>\n      <\/table>\n    <\/div>\n  <\/div>\n\n  ${D.sellerNote > 0 ? renderSellerNoteAmort(D) : ''}`;\n\n  document.getElementById('amort-output').innerHTML = html;\n}\n\nfunction renderSellerNoteAmort(D) {\n  const r = D.snRate \/ 12;\n  const n = D.snTerm * 12;\n  const mp = pmt(D.snRate, n, D.sellerNote);\n  let balance = D.sellerNote;\n  let rows = '';\n  for (let yr = 1; yr <= D.snTerm; yr++) {\n    let yp = 0, yi = 0;\n    for (let mo = 0; mo < 12; mo++) {\n      const intPmt = balance * r;\n      const prinPmt = mp - intPmt;\n      yi += intPmt; yp += prinPmt;\n      balance -= prinPmt;\n      if (balance < 0) balance = 0;\n    }\n    rows += `<tr><td>Year ${yr}<\/td><td>${fmtD(mp*12)}<\/td><td>${fmtD(yp)}<\/td><td>${fmtD(yi)}<\/td><td>${fmtD(Math.max(balance,0))}<\/td><\/tr>`;\n  }\n  return `\n  <div class=\"card\">\n    <div class=\"card-title\">SELLER NOTE AMORTIZATION (${D.snTerm} YRS @ ${(D.snRate*100).toFixed(2)}%)<\/div>\n    <div class=\"table-wrap\">\n      <table>\n        <thead><tr><th style=\"text-align:left;\">Period<\/th><th>Annual Payment<\/th><th>Principal<\/th><th>Interest<\/th><th>Ending Balance<\/th><\/tr><\/thead>\n        <tbody>${rows}<\/tbody>\n      <\/table>\n    <\/div>\n  <\/div>`;\n}\n\n\/\/ ================================================================\n\/\/  TAB 6 \u2014 SCENARIOS\n\/\/ ================================================================\nfunction renderScenarios(D) {\n  \/\/ Generate 5 scenarios: current deal + 4 alternatives\n  const scenarios = [\n    { label: 'Current Deal', down: D.down, term: D.loanTerm, rate: D.sbaRate, sn: D.sellerNote },\n    { label: '20% Down', down: D.price * 0.20, term: D.loanTerm, rate: D.sbaRate, sn: D.sellerNote },\n    { label: '15% Down', down: D.price * 0.15, term: D.loanTerm, rate: D.sbaRate, sn: D.sellerNote },\n    { label: '10% Down + Seller Note 10%', down: D.price * 0.10, term: D.loanTerm, rate: D.sbaRate, sn: D.price * 0.10 },\n    { label: '25-Yr Term (RE component)', down: D.down, term: 25, rate: D.sbaRate, sn: D.sellerNote },\n    { label: 'Rate -1% (rate buydown)', down: D.down, term: D.loanTerm, rate: Math.max(D.sbaRate - 0.01, 0.05), sn: D.sellerNote },\n  ];\n\n  let bestDSCR = 0;\n  const scenData = scenarios.map(s => {\n    const loan = D.price - s.down - s.sn + D.wc;\n    const mp = pmt(s.rate, s.term * 12, loan);\n    const annDS = mp * 12;\n    const snDs = s.sn > 0 ? pmt(D.snRate, D.snTerm * 12, s.sn) * 12 : 0;\n    const totalDS = annDS + snDs + D.existDebt;\n    const dscr = totalDS > 0 ? D.sde \/ totalDS : 0;\n    const postDS = D.sde - totalDS;\n    const coc = s.down > 0 ? postDS \/ s.down * 100 : 0;\n    if (dscr > bestDSCR) bestDSCR = dscr;\n    return { ...s, loan, mp, annDS, totalDS, dscr, postDS, coc };\n  });\n\n  let rows = scenData.map((s, i) => {\n    const isBest = s.dscr === bestDSCR && s.dscr >= 1.25;\n    const dscrColor = s.dscr >= 1.25 ? '#2ecc71' : s.dscr >= 1.10 ? '#f39c12' : '#e74c3c';\n    return `<tr class=\"${isBest ? 'scenario-best' : ''}\">\n      <td>${s.label}${isBest ? ' \u2b50' : ''}<\/td>\n      <td>${fmt(s.down)}<br><span style=\"font-size:10px;color:var(--white-muted)\">${pct(s.down\/D.price)}<\/span><\/td>\n      <td>${fmt(s.loan)}<\/td>\n      <td>${fmtD(s.mp)}\/mo<\/td>\n      <td>${fmt(s.totalDS)}<\/td>\n      <td style=\"color:${dscrColor}; font-weight:700;\">${s.dscr.toFixed(2)}x<\/td>\n      <td style=\"color:${s.postDS > 0 ? 'var(--green)' : 'var(--red)'};\">${fmt(s.postDS)}<\/td>\n      <td>${s.coc.toFixed(1)}%<\/td>\n      <td style=\"color:${s.dscr >= 1.25 ? 'var(--green)' : 'var(--red)'};\">${s.dscr >= 1.25 ? '\u2705 Yes' : '\u274c No'}<\/td>\n    <\/tr>`;\n  }).join('');\n\n  let html = `\n  <div class=\"card\">\n    <div class=\"card-title\">SIDE-BY-SIDE SCENARIO COMPARISON<\/div>\n    <p style=\"font-size:12px; color:var(--white-muted); margin-bottom:16px;\">All scenarios use same business financials (SDE: ${fmt(D.sde)}). \u2b50 = Best DSCR passing SBA threshold.<\/p>\n    <div class=\"table-wrap\">\n      <table class=\"scenario-table\">\n        <thead>\n          <tr>\n            <th style=\"text-align:left;\">Scenario<\/th>\n            <th>Down Payment<\/th>\n            <th>Loan Amount<\/th>\n            <th>Monthly Pmt<\/th>\n            <th>Annual DS<\/th>\n            <th>DSCR<\/th>\n            <th>Post-DS Cash<\/th>\n            <th>CoC Return<\/th>\n            <th>SBA OK?<\/th>\n          <\/tr>\n        <\/thead>\n        <tbody>${rows}<\/tbody>\n      <\/table>\n    <\/div>\n  <\/div>\n\n  <div class=\"card\">\n    <div class=\"card-title\">HOW TO USE SCENARIOS<\/div>\n    <div style=\"font-size:13px; color:rgba(255,255,255,0.7); line-height:1.8;\">\n      <p>\ud83c\udfaf <strong style=\"color:var(--white)\">Identify the Best Structure:<\/strong> Look for the scenario that maximizes DSCR while minimizing buyer's required cash injection.<\/p>\n      <p style=\"margin-top:8px;\">\ud83d\udca1 <strong style=\"color:var(--white)\">Restructuring Levers:<\/strong> If current deal fails DSCR, try: (1) increase down payment, (2) add seller note to reduce bank loan, (3) negotiate lower price, (4) extend loan term if RE is included, (5) present strong add-back documentation.<\/p>\n      <p style=\"margin-top:8px;\">\ud83d\udccb <strong style=\"color:var(--white)\">Present to Lenders:<\/strong> Share the best-performing scenario with your SBA lender for pre-qualification. Always submit to 2-3 Preferred Lender Program (PLP) banks for best terms.<\/p>\n    <\/div>\n  <\/div>\n\n  <div class=\"report-actions\">\n    <button class=\"btn btn-outline btn-sm\" onclick=\"window.print()\">\ud83d\udda8\ufe0f Print Report<\/button>\n  <\/div>`;\n\n  document.getElementById('scenarios-output').innerHTML = html;\n}\n<\/script>\n\n<!-- PRINT STYLES -->\n<style>\n@media print {\n  .app-header { position: relative; }\n  .tabs-nav, .btn, .report-actions { display: none !important; }\n  .tab-panel { display: block !important; page-break-after: always; }\n  body { background: white; color: black; }\n  .card, .kpi-card, .verdict-banner { border: 1px solid #ccc !important; background: #f9f9f9 !important; }\n  .kpi-value, .tbl-highlight { color: #111 !important; }\n  .kpi-value.gold, .kpi-value.green { color: #2a7a2a !important; }\n  .kpi-value.red { color: #aa0000 !important; }\n}\n<\/style>\n\n<\/body>\n<\/html>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>SBA &#038; Financing Analyzer | Broker&#8217;s Pro Suite\u2122 SBA SBA &#038; FINANCING ANALYZER Broker&#8217;s Pro Suite\u2122 \u00b7 360 Biz Brokers v1.0 SBA LOAN ELIGIBILITY &amp;&#8230;<\/p>","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1176","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v26.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SBA &amp; Financing Analysis and Calculator - 360 Biz Brokers<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/360bizbrokers.com\/es\/sba-financing-analysis-and-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SBA &amp; Financing Analysis and Calculator\" \/>\n<meta property=\"og:description\" content=\"SBA &#038; Financing Analyzer | Broker&#8217;s Pro Suite\u2122 SBA SBA &#038; FINANCING ANALYZER Broker&#8217;s Pro Suite\u2122 \u00b7 360 Biz Brokers v1.0 SBA LOAN ELIGIBILITY &amp;...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/360bizbrokers.com\/es\/sba-financing-analysis-and-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"360 Biz Brokers\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-07T15:02:27+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"17 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/\",\"url\":\"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/\",\"name\":\"SBA & Financing Analysis and Calculator - 360 Biz Brokers\",\"isPartOf\":{\"@id\":\"https:\/\/360bizbrokers.com\/#website\"},\"datePublished\":\"2026-06-07T14:52:46+00:00\",\"dateModified\":\"2026-06-07T15:02:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/360bizbrokers.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SBA &#038; Financing Analysis and Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/360bizbrokers.com\/#website\",\"url\":\"https:\/\/360bizbrokers.com\/\",\"name\":\"Florida 360 Business Brokers\",\"description\":\"Buy &amp; Sell Businesses Advisory\",\"publisher\":{\"@id\":\"https:\/\/360bizbrokers.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/360bizbrokers.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/360bizbrokers.com\/#organization\",\"name\":\"Florida 360 Business Brokers\",\"url\":\"https:\/\/360bizbrokers.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg\",\"contentUrl\":\"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg\",\"width\":1080,\"height\":1080,\"caption\":\"Florida 360 Business Brokers\"},\"image\":{\"@id\":\"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SBA & Financing Analysis and Calculator - 360 Biz Brokers","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/360bizbrokers.com\/es\/sba-financing-analysis-and-calculator\/","og_locale":"es_ES","og_type":"article","og_title":"SBA & Financing Analysis and Calculator","og_description":"SBA &#038; Financing Analyzer | Broker&#8217;s Pro Suite\u2122 SBA SBA &#038; FINANCING ANALYZER Broker&#8217;s Pro Suite\u2122 \u00b7 360 Biz Brokers v1.0 SBA LOAN ELIGIBILITY &amp;...","og_url":"https:\/\/360bizbrokers.com\/es\/sba-financing-analysis-and-calculator\/","og_site_name":"360 Biz Brokers","article_modified_time":"2026-06-07T15:02:27+00:00","twitter_card":"summary_large_image","twitter_misc":{"Tiempo de lectura":"17 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/","url":"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/","name":"SBA & Financing Analysis and Calculator - 360 Biz Brokers","isPartOf":{"@id":"https:\/\/360bizbrokers.com\/#website"},"datePublished":"2026-06-07T14:52:46+00:00","dateModified":"2026-06-07T15:02:27+00:00","breadcrumb":{"@id":"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/360bizbrokers.com\/sba-financing-analysis-and-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/360bizbrokers.com\/"},{"@type":"ListItem","position":2,"name":"SBA &#038; Financing Analysis and Calculator"}]},{"@type":"WebSite","@id":"https:\/\/360bizbrokers.com\/#website","url":"https:\/\/360bizbrokers.com\/","name":"Florida 360 Business Brokers","description":"Buy &amp; Sell Businesses Advisory","publisher":{"@id":"https:\/\/360bizbrokers.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/360bizbrokers.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/360bizbrokers.com\/#organization","name":"Florida 360 Business Brokers","url":"https:\/\/360bizbrokers.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/","url":"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg","contentUrl":"https:\/\/360bizbrokers.com\/wp-content\/uploads\/2025\/12\/LOGO-FLORIDA-360-BUSINESS-BROKERS.jpg","width":1080,"height":1080,"caption":"Florida 360 Business Brokers"},"image":{"@id":"https:\/\/360bizbrokers.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages\/1176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/comments?post=1176"}],"version-history":[{"count":0,"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/pages\/1176\/revisions"}],"wp:attachment":[{"href":"https:\/\/360bizbrokers.com\/es\/wp-json\/wp\/v2\/media?parent=1176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}