:root {
  --ink: #102631;
  --navy: #0d2a3a;
  --blue: #0b6383;
  --blue-soft: #dff3f7;
  --yellow: #f5bd33;
  --paper: #f3f6f5;
  --white: #ffffff;
  --line: #d9e1df;
  --muted: #607079;
  --success: #16724e;
  --danger: #b53a31;
  --shadow: 0 18px 55px rgba(16, 38, 49, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(11, 99, 131, 0.05) 0, transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.topbar {
  align-items: center;
  background: var(--navy);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1240px) / 2));
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: .01em; }
.brand small { color: #b9c8ce; font-size: .78rem; }

.brand-mark {
  align-items: center;
  background: var(--yellow);
  border-radius: 12px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  transform: rotate(-2deg);
  width: 46px;
}

.brand-mark svg { fill: none; height: 30px; stroke: var(--navy); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; width: 30px; }

.demo-badge {
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #dce8eb;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 700;
  gap: 8px;
  padding: 7px 12px;
}

.demo-badge span {
  background: var(--yellow);
  border-radius: 50%;
  height: 8px;
  box-shadow: 0 0 0 4px rgba(245,189,51,.13);
  width: 8px;
}

.shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 52px 24px 72px;
}

.intro { max-width: 820px; }
.eyebrow, .kicker {
  color: var(--blue);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .105em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.intro h1 {
  font-size: clamp(2.15rem, 4.8vw, 4.5rem);
  letter-spacing: -.055em;
  line-height: .98;
  margin: 0;
  max-width: 900px;
}

.intro > p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 20px 0 0;
  max-width: 720px;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  margin: 42px 0 28px;
}

.tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  display: inline-flex;
  font-weight: 750;
  gap: 9px;
  margin-bottom: -1px;
  padding: 14px 18px;
}

.tab svg { fill: none; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; width: 19px; }
.tab:hover { color: var(--ink); }
.tab.is-active { border-bottom-color: var(--yellow); color: var(--ink); }

.count {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: .72rem;
  height: 23px;
  justify-content: center;
  min-width: 23px;
  padding: 0 6px;
}

.view { display: none; }
.view.is-active { display: block; }

.form-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr);
}

.panel {
  background: var(--white);
  border: 1px solid rgba(16,38,49,.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.form-panel { min-height: 720px; padding: clamp(24px, 4vw, 48px); }

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 34px;
}

.panel-heading > div {
  align-items: center;
  display: flex;
  gap: 14px;
}

.panel-heading h2, .dashboard-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -.035em;
  line-height: 1.1;
  margin: 0;
}

.panel-heading .kicker { margin-bottom: 4px; }

.step-number {
  align-items: center;
  background: var(--yellow);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.step-number.dark { background: var(--navy); color: var(--white); }

.secure-note {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: .8rem;
  font-weight: 700;
  gap: 6px;
}

.secure-note svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }

.field-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field > span, .contact-time legend {
  display: block;
  font-size: .88rem;
  font-weight: 750;
  margin-bottom: 8px;
}

input, select, textarea {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,99,131,.12);
}

textarea { min-height: 112px; resize: vertical; }
::placeholder { color: #93a0a6; }

.error {
  color: var(--danger);
  display: none;
  font-size: .76rem;
  margin-top: 5px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error .error, .consent-error.is-visible { display: block; }

.contact-time {
  border: 0;
  margin: 2px 0 20px;
  padding: 0;
}

.radio-row { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.radio-row label { cursor: pointer; }
.radio-row input { opacity: 0; position: absolute; width: auto; }
.radio-row span {
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  font-size: .82rem;
  font-weight: 700;
  padding: 12px 10px;
  text-align: center;
}
.radio-row input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.radio-row input:focus-visible + span { box-shadow: 0 0 0 3px rgba(11,99,131,.2); }

.consent {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: .8rem;
  gap: 10px;
  margin-top: 4px;
}
.consent input { accent-color: var(--blue); flex: 0 0 auto; height: 18px; margin-top: 2px; width: 18px; }
.consent-error { margin-left: 28px; }

.primary-button, .secondary-button {
  align-items: center;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
}

.primary-button {
  background: var(--yellow);
  color: var(--navy);
  margin-top: 26px;
  width: 100%;
}
.primary-button:hover { background: #ffc94a; }
.primary-button svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 20px; }
.secondary-button { background: var(--blue-soft); color: var(--blue); }
.secondary-button:hover { background: #cdebf1; }

.flow-column { display: grid; gap: 24px; }
.sms-panel { background: var(--blue); color: var(--white); padding: 28px; }
.sms-panel .kicker { color: #b9e9f0; }
.sms-panel .panel-heading { margin-bottom: 20px; }
.sms-panel h2 { font-size: 1.25rem; }

.phone {
  background: #edf2f3;
  border: 7px solid var(--navy);
  border-radius: 28px;
  color: var(--ink);
  margin: 0 auto;
  max-width: 310px;
  min-height: 286px;
  padding: 16px 13px;
}
.phone-top { color: var(--muted); display: flex; font-size: .68rem; font-weight: 800; justify-content: space-between; padding: 0 5px 18px; }
.message {
  background: var(--white);
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 8px 25px rgba(13,42,58,.1);
  font-size: .82rem;
  margin-right: 22px;
  padding: 14px;
}
.message strong { display: block; margin-bottom: 5px; }
.message p { margin: 0 0 8px; }
.message a { color: var(--blue); font-weight: 800; }
.message time { color: #89979c; display: block; font-size: .68rem; margin-top: 8px; text-align: right; }
.demo-note { color: #cce5ea; font-size: .72rem; margin: 16px 0 0; text-align: center; }

.process-panel { padding: 26px 28px; }
.process-panel ol { list-style: none; margin: 18px 0 0; padding: 0; }
.process-panel li {
  align-items: center;
  display: flex;
  gap: 13px;
  min-height: 58px;
  position: relative;
}
.process-panel li:not(:last-child)::after {
  background: var(--line);
  content: "";
  height: 20px;
  left: 16px;
  position: absolute;
  top: 48px;
  width: 2px;
}
.process-panel li > span {
  align-items: center;
  background: #eef2f1;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .75rem;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.process-panel li.is-done > span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.process-panel li strong, .process-panel li small { display: block; }
.process-panel li strong { font-size: .86rem; }
.process-panel li small { color: var(--muted); font-size: .74rem; }

.success-state {
  align-items: center;
  display: none;
  flex-direction: column;
  min-height: 580px;
  justify-content: center;
  margin: 0 auto;
  max-width: 480px;
  text-align: center;
}
.success-state.is-visible { display: flex; }
.success-icon {
  align-items: center;
  background: #dff4e9;
  border-radius: 50%;
  color: var(--success);
  display: inline-flex;
  height: 76px;
  justify-content: center;
  margin-bottom: 24px;
  width: 76px;
}
.success-icon svg { fill: none; height: 36px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 36px; }
.success-state h2 { font-size: 2rem; margin: 0; }
.success-state > p:not(.kicker) { color: var(--muted); }
.success-meta {
  background: #f6f8f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin: 18px 0 24px;
  padding: 15px;
  width: 100%;
}
.success-meta span { color: var(--muted); }

.dashboard-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}
.reset-button { background: var(--white); border: 1px solid var(--line); }
.reset-button svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 18px; }

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}
.metrics article {
  background: var(--white);
  border: 1px solid rgba(16,38,49,.08);
  border-radius: 15px;
  padding: 20px;
}
.metrics span, .metrics small { color: var(--muted); display: block; }
.metrics span { font-size: .78rem; font-weight: 700; }
.metrics strong { display: block; font-size: 2rem; letter-spacing: -.04em; line-height: 1.1; margin: 5px 0 2px; }
.metrics small { font-size: .72rem; }
.metrics article.accent { background: var(--navy); color: var(--white); }
.metrics article.accent span, .metrics article.accent small { color: #b9c8ce; }

.leads-panel { overflow: hidden; }
.table-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 22px 24px;
}
.table-toolbar h3 { font-size: 1.1rem; margin: 0; }
.table-toolbar p { color: var(--muted); font-size: .76rem; margin: 3px 0 0; }
.search { max-width: 270px; position: relative; width: 100%; }
.search svg { fill: none; height: 18px; left: 12px; position: absolute; stroke: var(--muted); stroke-linecap: round; stroke-width: 2; top: 13px; width: 18px; }
.search input { padding-left: 38px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 820px; width: 100%; }
th, td { border-bottom: 1px solid #e9eeec; padding: 17px 20px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: .86rem; }
td small { color: var(--muted); display: block; font-size: .72rem; margin-top: 2px; }
.customer { align-items: center; display: flex; gap: 11px; }
.avatar {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 50%;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .74rem;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.status-select { font-size: .78rem; font-weight: 750; min-width: 140px; padding: 9px 11px; }

.empty-state {
  align-items: center;
  color: var(--muted);
  display: none;
  flex-direction: column;
  padding: 46px 20px;
}
.empty-state strong { color: var(--ink); }
.empty-state.is-visible { display: flex; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: .75rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
  padding: 24px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 940px) {
  .form-layout { grid-template-columns: 1fr; }
  .flow-column { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .topbar { min-height: 68px; padding: 10px 18px; }
  .brand small { display: none; }
  .shell { padding: 36px 16px 52px; }
  .intro h1 { font-size: 2.5rem; }
  .tabs { margin-top: 30px; }
  .tab { flex: 1; font-size: .82rem; justify-content: center; padding: 12px 6px; }
  .tab svg { display: none; }
  .form-panel { min-height: 0; padding: 24px 18px; }
  .field-grid, .radio-row, .flow-column, .metrics { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; }
  .secure-note { display: none; }
  .dashboard-header, .table-toolbar, footer { align-items: stretch; flex-direction: column; gap: 14px; }
  .dashboard-header .secondary-button { width: 100%; }
  .search { max-width: none; }
  footer { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
