:root {
  --green: #00b86b;
  --green-d: #039e5c;
  --blue: #1e73ff;
  --yellow: #ffc233;
  --red: #ff5470;
  --ink: #17202b;
  --muted: #6b7890;
  --line: #e6ebf2;
  --bg: #f4f7fb;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; color: var(--green); letter-spacing: .2px; }
.link-btn { background: none; border: none; color: var(--muted); font-weight: 700; font-size: 14px; }
.wrap { max-width: 520px; margin: 0 auto; padding: 20px 16px 60px; }

h1 { font-size: 24px; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.hl { color: var(--green); }
.center { text-align: center; }
.strong { font-weight: 800; }
.mt0 { margin-top: 0; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: 0 6px 18px rgba(20,40,80,.05); margin-bottom: 14px;
}

.field { margin-bottom: 12px; }
.lbl { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=password], input[type=number] {
  width: 100%; padding: 14px; font-size: 16px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; outline: none;
}
input:focus { border-color: var(--green); }
.error { color: var(--red); font-size: 13.5px; min-height: 18px; margin-top: 4px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.btn {
  width: 100%; padding: 16px; font-size: 17px; font-weight: 800; color: #fff;
  background: var(--green); border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,184,107,.28); margin-top: 6px;
}
.btn:disabled { opacity: .6; }
.btn.blue { background: var(--blue); box-shadow: 0 8px 20px rgba(30,115,255,.28); }
.btn.ghost { background: #fff; color: var(--blue); border: 2px solid var(--line); box-shadow: none; }
.btn.sec { background: #eef2f7; color: var(--ink); box-shadow: none; }

.toggle { text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.toggle a { color: var(--blue); font-weight: 700; text-decoration: none; }

/* Steps / status */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge.warn { background: #fff7e0; color: #8a6a00; }
.badge.ok { background: #e5f8ef; color: var(--green-d); }
.badge.bad { background: #ffe6ec; color: var(--red); }

/* KYC uploads */
.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 4px; }
.up-slot {
  position: relative; border: 2px dashed var(--line); border-radius: 14px;
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); overflow: hidden; background: #fff; cursor: pointer;
}
.up-slot.full { border-style: solid; border-color: var(--green); color: var(--ink); }
.up-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-slot .up-ico { font-size: 26px; }
.up-slot .up-label { font-size: 12.5px; font-weight: 700; padding: 0 8px; }
.up-slot input { display: none; }
.up-slot.wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.up-check { position: absolute; top: 8px; right: 8px; background: var(--green); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; z-index: 2; }

.steps { list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { display: flex; gap: 10px; padding: 8px 0; }
.steps li .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }

.example {
  background: #f0f9f4; border: 1px dashed var(--green); border-radius: 12px; padding: 12px; margin: 10px 0;
  font-weight: 700;
}
.spinner {
  width: 44px; height: 44px; margin: 8px auto 14px;
  border: 5px solid #e7edf6; border-top-color: var(--green); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dashboard */
.stat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.stat { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }

.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.lead-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.lead-name { font-weight: 800; font-size: 16px; }
.lead-prod { color: var(--blue); font-weight: 700; font-size: 13px; }
.copybox { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; white-space: pre-wrap; margin: 8px 0; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-btns .btn { margin-top: 0; padding: 13px; font-size: 14.5px; }
.row-btns .btn.full { grid-column: 1 / -1; }

.callout { background: #eef5ff; border: 1px solid #d5e6ff; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.share {
  display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 8px 8px 12px; margin-top: 6px;
}
.share input { border: none; padding: 6px 0; font-size: 13px; }
.share .btn { width: auto; margin: 0; padding: 10px 14px; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #17202b; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700;
  opacity: 0; transition: .25s; z-index: 50; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
