/* Easy2Africa UAT validation — Stripe-influenced clean style */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --soft: #9ca3af;
  --border: #e5e7eb;
  --line: #f3f4f6;
  --brand: #10b981;
  --brand-dark: #059669;
  --ink: #0f172a;
  --danger: #dc2626;
  --warn: #d97706;
  --success: #047857;
  --code-bg: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.shell { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }
.shell--narrow { max-width: 820px; }

header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; background: #ffffff; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; letter-spacing: 0.05em; }
.brand .name { font-weight: 800; font-size: 13px; letter-spacing: 0.16em; }
.brand .tag { display: block; font-weight: 400; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }

.top .nav { font-size: 13px; color: var(--muted); display: flex; gap: 16px; }
.top .nav a { color: var(--muted); }

/* Landing hero */
.hero { margin: 24px 0 40px; }
.hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.hero p.lead { font-size: 16px; color: var(--muted); margin: 0 0 18px; max-width: 720px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 32px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat-card .n { font-size: 24px; font-weight: 800; color: var(--ink); display: block; }
.stat-card .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Categories on landing */
.category { margin: 36px 0; }
.category h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; margin: 0 0 14px; }

.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.flow-card {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px 14px; transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  color: var(--text); text-decoration: none;
}
.flow-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.flow-card .id { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; font-size: 11px; color: var(--soft); }
.flow-card .title { font-weight: 700; font-size: 15px; margin: 4px 0 6px; }
.flow-card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.flow-card .pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--code-bg); color: var(--text); font-weight: 600; }
.flow-card .progress { margin-top: 12px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.flow-card .progress > span { display: block; height: 100%; background: var(--brand); transition: width 240ms ease; }
.flow-card.done { border-color: var(--brand); }
.flow-card.done .check { color: var(--brand-dark); }

/* Flow page */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.flow-head h1 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.flow-head .meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); align-items: center; margin-bottom: 18px; }
.flow-head .meta .pill { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--code-bg); color: var(--text); font-weight: 600; }
.flow-head .meta .id { font-family: ui-monospace, monospace; color: var(--soft); }
.flow-head .summary { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; font-size: 15px; color: var(--text); }

.flow-progress { position: sticky; top: 0; background: var(--bg); padding: 12px 0 8px; z-index: 5; }
.flow-progress .bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.flow-progress .bar > span { display: block; height: 100%; background: var(--brand); transition: width 240ms ease; }
.flow-progress .label { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }

section.block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin: 18px 0; }
section.block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; margin: 0 0 12px; }

ul.pre { list-style: none; padding: 0; margin: 0; }
ul.pre li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--text); }
ul.pre li:last-child { border-bottom: 0; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
ol.steps > li {
  counter-increment: step;
  display: grid; grid-template-columns: 28px 28px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
ol.steps > li:last-child { border-bottom: 0; }
ol.steps > li .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: white;
  font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
ol.steps > li .chk { display: flex; align-items: flex-start; padding-top: 4px; }
ol.steps > li .chk input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; margin: 0; }
ol.steps > li .body { font-size: 15px; }
ol.steps > li .body .title { font-weight: 600; }
ol.steps > li .body .detail { color: var(--muted); margin-top: 4px; font-size: 14px; }
ol.steps > li.done .body .title { color: var(--soft); text-decoration: line-through; }

table.emails { width: 100%; border-collapse: collapse; }
table.emails th, table.emails td { padding: 8px 0; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
table.emails th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
table.emails td.template { font-family: ui-monospace, monospace; font-size: 12px; color: var(--brand-dark); }
table.emails tr:last-child td { border-bottom: 0; }

ul.edge { list-style: none; padding: 0; margin: 0; }
ul.edge li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--text); display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
ul.edge li:last-child { border-bottom: 0; }
ul.edge li input { width: 20px; height: 20px; accent-color: var(--warn); cursor: pointer; margin: 0; }

.signoff { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin: 24px 0; }
.signoff .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.signoff input[type="text"], .signoff input[type="date"], .signoff select {
  width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: 8px; background: white;
}
.signoff input:focus, .signoff select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.signoff .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; display: block; }
.signoff .note { font-size: 12px; color: var(--muted); margin-top: 6px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; border: 0; }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #1f2937; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f9fafb; }

.flow-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 14px; }

/* Responsive */
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .signoff .row { grid-template-columns: 1fr; }
  .flow-head h1 { font-size: 22px; }
}

@media print {
  body { background: white; }
  .top .nav, .flow-progress, .signoff .btn, .flow-foot { display: none; }
  section.block, .signoff, .flow-head .summary { box-shadow: none; border: 1px solid #ccc; }
}
