<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Config-Audit Feature Gap Report</title>
<style>
  :root {
    --green: #22c55e; --yellow: #eab308; --orange: #f97316; --red: #ef4444;
    --blue: #3b82f6; --gray: #6b7280; --bg: #f8fafc; --card: #ffffff;
    --border: #e2e8f0; --text: #1e293b; --muted: #64748b;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; max-width: 900px; margin: 0 auto; padding: 2rem; }
  h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
  h2 { font-size: 1.2rem; margin: 2rem 0 1rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
  .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

  /* Summary cards */
  .summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
  .summary-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
  .summary-card .label { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
  .summary-card .value { font-size: 1.8rem; font-weight: 700; margin: 0.25rem 0; }
  .summary-card .sub { font-size: 0.8rem; color: var(--muted); }

  /* Grade badge */
  .grade { display: inline-block; width: 2rem; height: 2rem; line-height: 2rem; text-align: center; border-radius: 4px; font-weight: 700; font-size: 0.9rem; color: white; }
  .grade-A { background: var(--green); } .grade-B { background: #84cc16; }
  .grade-C { background: var(--yellow); color: var(--text); } .grade-D { background: var(--orange); }
  .grade-F { background: var(--red); }

  /* Area table */
  table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
  th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
  th { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }

  /* Progress bar */
  .progress-container { width: 100%; background: #e2e8f0; border-radius: 4px; height: 8px; }
  .progress-bar { height: 8px; border-radius: 4px; transition: width 0.3s; }
  .progress-bar.green { background: var(--green); } .progress-bar.yellow { background: var(--yellow); }
  .progress-bar.orange { background: var(--orange); } .progress-bar.red { background: var(--red); }

  /* Gap cards */
  .gap-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
  .gap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
  .gap-title { font-weight: 600; }
  .badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
  .badge-high { background: #fee2e2; color: #991b1b; } .badge-medium { background: #fef3c7; color: #92400e; }
  .badge-low { background: #ecfdf5; color: #065f46; } .badge-info { background: #eff6ff; color: #1e40af; }

  /* Actions */
  .action-card { background: var(--card); border-left: 4px solid var(--blue); border-radius: 0 8px 8px 0; padding: 1rem; margin-bottom: 0.75rem; }
  .action-number { font-size: 0.75rem; color: var(--blue); font-weight: 700; text-transform: uppercase; }
  .action-title { font-weight: 600; margin: 0.25rem 0; }
  .action-meta { font-size: 0.85rem; color: var(--muted); }

  /* Level-up */
  .level-path { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0; }
  .level-node { padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; }
  .level-current { background: var(--blue); color: white; }
  .level-next { background: var(--border); color: var(--text); border: 2px dashed var(--blue); }
  .level-arrow { color: var(--muted); font-size: 1.2rem; }

  .footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; text-align: center; }
</style>
</head>
<body>

<h1>Config-Audit Feature Gap Report</h1>
<div class="meta">{{DATE}} · Config-Audit v1.3.0</div>

<div class="summary">
  <div class="summary-card">
    <div class="label">Overall</div>
    <div class="value"><span class="grade grade-{{OVERALL_GRADE}}">{{OVERALL_GRADE}}</span></div>
    <div class="sub">{{OVERALL_SCORE}}/100</div>
  </div>
  <div class="summary-card">
    <div class="label">Utilization</div>
    <div class="value">{{UTILIZATION_SCORE}}%</div>
    <div class="sub">{{OVERHANG_SCORE}}% overhang</div>
  </div>
  <div class="summary-card">
    <div class="label">Maturity</div>
    <div class="value">L{{MATURITY_LEVEL}}</div>
    <div class="sub">{{MATURITY_NAME}}</div>
  </div>
  <div class="summary-card">
    <div class="label">Segment</div>
    <div class="value" style="font-size: 1.2rem;">{{SEGMENT}}</div>
    <div class="sub">{{SEGMENT_DESC}}</div>
  </div>
</div>

<h2>Area Scores</h2>
<table>
  <thead>
    <tr><th>Area</th><th>Grade</th><th>Score</th><th>Progress</th><th>Findings</th></tr>
  </thead>
  <tbody>
    {{AREA_ROWS}}
  </tbody>
</table>

<h2>Gap Analysis</h2>
{{GAP_CARDS}}

<h2>Next Best Actions</h2>
{{ACTION_CARDS}}

<h2>Level-Up Path</h2>
<div class="level-path">
  <div class="level-node level-current">Level {{MATURITY_LEVEL}}: {{MATURITY_NAME}}</div>
  <div class="level-arrow">→</div>
  <div class="level-node level-next">Level {{NEXT_LEVEL}}: {{NEXT_LEVEL_NAME}}</div>
</div>
<p>{{LEVEL_UP_REQUIREMENTS}}</p>

<div class="footer">
  Generated by Config-Audit Plugin · Claude Code Configuration Intelligence
</div>

</body>
</html>
