/* ═══════════════════════════════════════════════════════
   SME Financial Health — Styles v1.0
   Font: Outfit (display) + Inter (body)
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --sfh-navy:    #0f172a;
  --sfh-blue:    #1e40af;
  --sfh-accent:  #3b82f6;
  --sfh-green:   #16a34a;
  --sfh-yellow:  #d97706;
  --sfh-red:     #dc2626;
  --sfh-bg:      #f8fafc;
  --sfh-border:  #e2e8f0;
  --sfh-text:    #1e293b;
  --sfh-muted:   #64748b;
  --sfh-radius:  12px;
  --sfh-shadow:  0 2px 16px rgba(15,23,42,.08);
}

/* ── Base ───────────────────────────────────────────── */
.sfh-wrap, .sfh-report-wrap {
  font-family: 'DM Sans', sans-serif;
  color: var(--sfh-text);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ── Progress ───────────────────────────────────────── */
.sfh-progress-wrap { margin: 24px 0 32px; }

.sfh-steps-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sfh-step-ind {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  opacity: .4;
  transition: opacity .3s;
}
.sfh-step-ind.active { opacity: 1; }
.sfh-step-ind.done   { opacity: .7; }

.sfh-step-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background .3s, transform .3s;
}
.sfh-step-ind.active .sfh-step-circle {
  background: var(--sfh-blue);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(59,130,246,.2);
}
.sfh-step-ind.done .sfh-step-circle { background: var(--sfh-green); }
.sfh-step-ind span { font-size: 11px; color: var(--sfh-muted); font-weight: 500; text-align: center; }

.sfh-bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.sfh-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sfh-blue), var(--sfh-accent));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  width: 25%;
}

/* ── Card ───────────────────────────────────────────── */
.sfh-card {
  background: white;
  border: 1px solid var(--sfh-border);
  border-radius: var(--sfh-radius);
  padding: 28px 32px;
  box-shadow: var(--sfh-shadow);
  animation: sfh-fadein .3s ease;
}
@keyframes sfh-fadein { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }

.sfh-card-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sfh-border);
}
.sfh-card-icon {
  font-size: 32px;
  width: 56px; height: 56px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sfh-card-head h2 { margin: 0 0 4px; font-family: 'Outfit', sans-serif; font-size: 20px; color: var(--sfh-navy); }
.sfh-card-head p  { margin: 0; color: var(--sfh-muted); font-size: 14px; }

/* ── Fields ─────────────────────────────────────────── */
.sfh-fields { display: flex; flex-direction: column; gap: 16px; }
.sfh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px){ .sfh-row { grid-template-columns: 1fr; } }

.sfh-field { display: flex; flex-direction: column; gap: 6px; }
.sfh-field label {
  font-size: 13px; font-weight: 600; color: var(--sfh-navy);
}
.sfh-field small { font-size: 11px; color: var(--sfh-muted); }
.sfh-req { color: var(--sfh-red); }

.sfh-field input,
.sfh-field select,
.sfh-field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--sfh-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--sfh-text);
  background: white;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}
.sfh-field input:focus,
.sfh-field select:focus {
  outline: none;
  border-color: var(--sfh-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.sfh-field input.sfh-err,
.sfh-field select.sfh-err { border-color: var(--sfh-red); }

.sfh-input-icon { position: relative; }
.sfh-input-icon span {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--sfh-muted); font-size: 13px; pointer-events: none;
}
.sfh-input-icon input { padding-left: 30px; }

.sfh-err-msg { font-size: 12px; color: var(--sfh-red); min-height: 16px; }

.sfh-section-head {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--sfh-navy);
  margin: 8px 0 4px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  letter-spacing: .4px;
}

.sfh-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1e40af;
}

.sfh-consent { font-size: 12px; color: var(--sfh-muted); }
.sfh-consent label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }

.sfh-trust-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--sfh-green);
  padding: 10px 0; border-bottom: 1px solid var(--sfh-border);
  margin-bottom: 8px;
}

/* ── Live Preview ────────────────────────────────────── */
.sfh-preview-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 4px;
}
.sfh-preview-box h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--sfh-green); }
.sfh-preview-row {
  display: flex; justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid #dcfce7;
}
.sfh-preview-row:last-child { border-bottom: none; }
.sfh-preview-row strong { font-weight: 700; }

/* ── Navigation ─────────────────────────────────────── */
.sfh-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--sfh-border);
}
.sfh-nav-right { display: flex; align-items: center; gap: 12px; }
.sfh-step-counter { font-size: 12px; color: var(--sfh-muted); }

/* ── Buttons ─────────────────────────────────────────── */
.sfh-btn {
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.sfh-btn-primary  { background: var(--sfh-blue); color: white; }
.sfh-btn-primary:hover  { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,.3); }
.sfh-btn-success  { background: var(--sfh-green); color: white; }
.sfh-btn-success:hover  { background: #15803d; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,.3); }
.sfh-btn-ghost    { background: transparent; color: var(--sfh-muted); border: 1.5px solid var(--sfh-border); }
.sfh-btn-ghost:hover    { background: #f8fafc; color: var(--sfh-text); }
.sfh-btn-outline  { background: transparent; color: var(--sfh-navy); border: 1.5px solid var(--sfh-navy); }
.sfh-btn-outline:hover  { background: var(--sfh-navy); color: white; }
.sfh-btn-dark     { background: var(--sfh-navy); color: white; }
.sfh-btn-dark:hover     { background: #1e3a5f; }
.sfh-btn-cta      { background: white; color: var(--sfh-navy); font-weight: 700; font-size: 15px; padding: 13px 28px; }
.sfh-btn-call     { background: transparent; color: white; border: 2px solid rgba(255,255,255,.5); }
.sfh-btn-micro    { background: transparent; color: var(--sfh-accent); border: 1.5px solid var(--sfh-accent); font-size: 12px; padding: 7px 14px; }

/* ── Error Banner ────────────────────────────────────── */
.sfh-error-banner {
  background: #fef2f2; color: var(--sfh-red);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
}
.sfh-error-box {
  background: #fef2f2; color: var(--sfh-red);
  border: 1px solid #fecaca;
  padding: 16px 20px;
  border-radius: 8px;
}

/* ── Loader ──────────────────────────────────────────── */
.sfh-loading-screen {
  text-align: center;
  padding: 48px 24px;
  background: white;
  border-radius: var(--sfh-radius);
  border: 1px solid var(--sfh-border);
}
.sfh-spinner {
  width: 52px; height: 52px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--sfh-blue);
  border-radius: 50%;
  animation: sfh-spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes sfh-spin { to{ transform: rotate(360deg); } }
.sfh-loading-screen h3 { font-family: 'Outfit', sans-serif; margin: 0 0 20px; color: var(--sfh-navy); }
.sfh-loader-steps { display: flex; flex-direction: column; gap: 8px; max-width: 280px; margin: 0 auto; }
.sfh-ls {
  font-size: 13px; text-align: left;
  padding: 8px 12px; border-radius: 6px;
  background: #f8fafc; color: var(--sfh-muted);
  transition: all .3s;
}
.sfh-ls.sfh-ls-active  { background: #eff6ff; color: var(--sfh-blue); font-weight: 600; }
.sfh-ls.sfh-ls-done    { background: #f0fdf4; color: var(--sfh-green); }

/* ════════════════════════════════════════════════════
   REPORT STYLES
════════════════════════════════════════════════════ */

/* Hero */
.sfh-report-hero {
  border-radius: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}
.sfh-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 40px;
  gap: 24px;
}
@media(max-width:640px){
  .sfh-hero-inner { flex-direction: column; text-align: center; }
}
.sfh-hero-left { color: white; }
.sfh-biz-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 13px; color: white;
}
.sfh-biz-badge strong { display: block; font-weight: 700; }
.sfh-biz-badge small  { color: rgba(255,255,255,.6); }
.sfh-hero-left h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px; font-weight: 800;
  margin: 0 0 4px; color: white;
}
.sfh-hero-sub { color: rgba(255,255,255,.6); font-size: 13px; margin: 0 0 12px; }
.sfh-hero-revenue { font-size: 14px; color: rgba(255,255,255,.8); }
.sfh-hero-revenue strong { color: white; }

.sfh-score-circle-wrap { text-align: center; flex-shrink: 0; }
.sfh-score-ring { width: 120px; height: 120px; }
.sfh-grade-badge { margin-top: 8px; }
.sfh-grade-letter {
  font-family: 'Outfit', sans-serif;
  font-size: 28px; font-weight: 800;
  display: block;
}
.sfh-grade-label { font-size: 12px; color: rgba(255,255,255,.7); }

/* Diagnosis */
.sfh-diagnosis-box {
  display: flex; gap: 16px;
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--sfh-shadow);
}
.sfh-diag-icon { font-size: 28px; flex-shrink: 0; }
.sfh-diagnosis-box h3 { margin: 0 0 6px; font-family: 'Outfit', sans-serif; font-size: 16px; color: var(--sfh-navy); }
.sfh-diagnosis-box p  { margin: 0 0 4px; font-size: 13px; color: var(--sfh-muted); }
.sfh-diag-fix { color: var(--sfh-text) !important; font-size: 13px !important; }

/* Primary CTA */
.sfh-cta-primary {
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.sfh-cta-red    { background: linear-gradient(135deg, #7f1d1d, #dc2626); color: white; }
.sfh-cta-yellow { background: linear-gradient(135deg, #78350f, #d97706); color: white; }
.sfh-cta-green  { background: linear-gradient(135deg, #14532d, #16a34a); color: white; }
.sfh-cta-text h3 { margin: 0 0 6px; font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; }
.sfh-cta-text p  { margin: 0 0 4px; font-size: 13px; opacity: .85; }
.sfh-cta-phone   { font-weight: 700; font-size: 14px !important; opacity: 1 !important; }
.sfh-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* Section Title */
.sfh-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--sfh-navy);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sfh-border);
}

/* Module Grid */
.sfh-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.sfh-module-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--sfh-border);
  padding: 20px 22px;
  box-shadow: var(--sfh-shadow);
  transition: transform .2s, box-shadow .2s;
}
.sfh-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,.1);
}

.sfh-mod-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.sfh-mod-head h3 { margin: 0 0 2px; font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; }
.sfh-mod-head small { color: var(--sfh-muted); font-size: 11px; }

.sfh-mod-score-pill {
  color: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sfh-mod-value  { font-size: 24px; font-weight: 700; font-family: 'Outfit', sans-serif; margin-bottom: 2px; }
.sfh-mod-detail { font-size: 12px; color: var(--sfh-muted); margin-bottom: 10px; }
.sfh-status-label { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.sfh-mod-insight { font-size: 12px; color: var(--sfh-text); margin-bottom: 12px; line-height: 1.5; }

.sfh-score-bar-wrap {
  height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 12px;
}
.sfh-score-bar-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }

.sfh-mod-breakdown {
  background: #f8fafc; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.sfh-breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px solid #e2e8f0;
}
.sfh-breakdown-row:last-child { border-bottom: none; }
.sfh-breakdown-row strong { font-weight: 600; }

.sfh-mod-bench  { font-size: 11px; color: var(--sfh-muted); font-style: italic; margin-bottom: 6px; }
.sfh-mod-action {
  font-size: 12px; color: #1e40af;
  background: #eff6ff; border-radius: 6px; padding: 7px 10px;
  margin-bottom: 10px;
}

.sfh-micro-cta {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: 10px 12px;
  margin-top: 8px;
}
.sfh-micro-cta p { margin: 0 0 6px; font-size: 12px; color: var(--sfh-text); }

/* Summary Table */
.sfh-summary-table-wrap { margin-bottom: 32px; }
.sfh-table-scroll { overflow-x: auto; }
.sfh-summary-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--sfh-shadow);
}
.sfh-summary-table th {
  background: var(--sfh-navy); color: white;
  text-align: left; padding: 10px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.sfh-summary-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.sfh-summary-table tr:last-child td { border-bottom: none; }
.sfh-summary-table tr:hover td { background: #f8fafc; }
.sfh-td-bench { color: var(--sfh-muted); font-size: 12px; }

/* Bottom CTAs */
.sfh-bottom-ctas {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 28px;
}
@media(max-width:600px){ .sfh-bottom-ctas { grid-template-columns: 1fr; } }

.sfh-bottom-cta-card {
  border-radius: 14px; padding: 24px;
  text-align: center;
  border: 1px solid var(--sfh-border);
}
.sfh-cta-advisory { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.sfh-cta-loans    { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.sfh-bcta-icon    { font-size: 36px; margin-bottom: 10px; }
.sfh-bottom-cta-card h3 { font-family: 'Outfit', sans-serif; font-size: 17px; margin: 0 0 8px; }
.sfh-bottom-cta-card p  { font-size: 13px; color: var(--sfh-muted); margin: 0 0 16px; }

/* Actions */
.sfh-report-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Footer */
.sfh-report-footer {
  font-size: 11px; color: var(--sfh-muted);
  border-top: 1px solid var(--sfh-border);
  padding-top: 16px;
  line-height: 1.6;
}
