:root {
  --bg: #f4f2fb;
  --surface: #fff;
  --text: #14111f;
  --muted: #5c5a6e;
  --primary: #7c4dff;
  --primary-text: #fff;
  --accent: #0f9d8e;
  --border: #e4e0f0;
  --header-bg: #090c18;
  --header-text: #f6f5fc;
  --danger: #b42318;
  --ok: #0f7a4c;
  --shadow: 0 16px 40px rgba(20, 17, 31, 0.08);
  --radius: 18px;
  --font: Inter, "Source Sans Pro", "Noto Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.45;
}

.preview-banner {
  background: #3b2a14;
  color: #f8e3c2;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  text-align: center;
  padding: 8px 14px;
}
.preview-banner strong { color: #fff; }

.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 14px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}
.brand img, .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 16px;
}
.brand img[hidden], .brand-mark[hidden] { display: none !important; }
.brand-name { font-weight: 800; letter-spacing: -.03em; font-size: 18px; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; opacity: .75; font-size: 11px; letter-spacing: 0; margin-top: 2px; }

main { padding: 22px 16px 48px; }
.card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 24px;
}

.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.steps .pip {
  height: 6px;
  flex: 1;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.steps .pip > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.steps .pip.on > span { width: 100%; }
.steps .pip.half > span { width: 50%; }

h1 { font-size: 1.55rem; letter-spacing: -.03em; line-height: 1.2; margin: 0 0 8px; }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 15px; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; }
label.field input {
  appearance: none;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px;
  font: inherit;
  font-size: 16px;
  background: #fafafa;
  color: var(--text);
}
label.field input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, white);
  border-color: var(--primary);
  background: #fff;
}
.hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.hint.ok { color: var(--ok); }
.err { color: var(--danger); font-size: 12px; font-weight: 650; min-height: 0; }

.geo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, white);
}
.geo p { margin: 0; font-size: 13px; color: var(--muted); }
.btn-quiet, .btn, .btn-text {
  font: inherit;
  font-weight: 750;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
}
.btn {
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 16px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 32%, transparent);
}
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-quiet {
  align-self: start;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
.btn-text {
  background: none;
  color: var(--muted);
  padding: 8px 0 0;
  font-size: 13px;
  text-decoration: underline;
}

.consents { display: grid; gap: 12px; margin-top: 8px; }
.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}
.consent a { color: var(--primary); }
.legal-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, white);
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 14px;
}

footer.app-foot {
  max-width: 560px;
  margin: 22px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  padding: 0 8px 24px;
}

/* admin */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 18px 16px 48px; }
.admin-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-top h1 { margin: 0; font-size: 1.4rem; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions a, .admin-actions button {
  display: inline-flex; align-items: center; padding: 8px 12px;
  border-radius: 10px; border: 1px solid var(--border); background: #fff;
  color: var(--text); text-decoration: none; font-weight: 650; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
#map { height: 340px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 16px; background: #dfe7ef; }
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fafafa; }
.tag { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tag.example { background: #fff4d6; color: #7a4d00; }
.tag.live { background: #e5f8ee; color: #0f7a4c; }
.login-card { max-width: 400px; }

.hidden { display: none !important; }
/* Lead cards for the admin list (readable on a phone; the table is a wide fallback). */
.lead-list { display: grid; gap: 10px; }
.lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 12px;
}
.lead-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.lead-card h3 { margin: 0; font-size: 15px; }
.lead-card dl { display: grid; grid-template-columns: 86px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.lead-card dt { color: var(--muted); font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.lead-card dd { margin: 0; }
.table-wrap { display: none; }

@media (max-width: 560px) {
  .card { padding: 22px 16px 20px; }
  h1 { font-size: 1.4rem; }
  #map { height: 280px; }
  label.field input { padding: 12px 12px; }
}
