@import url('https://fonts.googleapis.com/css2?family=Prata&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  /* Pulled live from canadamedlaser.ca (computed styles on buttons/headings) */
  --cml-bg: #ffffff;
  --cml-surface: #ffffff;
  --cml-ink: #373140;         /* real CML logo/heading ink */
  --cml-muted: #746e7d;
  --cml-accent: #9c1c3c;      /* real CML brand burgundy (button/heading color) */
  --cml-accent-dark: #7a1530;
  --cml-accent-soft: #f7e9ec;
  --cml-success: #4c8c6b;
  --cml-danger: #c15b4f;
  --cml-border: #ece5e7;
  --font-heading: 'Prata', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(55, 49, 64, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cml-bg);
  color: var(--cml-ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

.screen {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px 100px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cml-muted);
  font-weight: 600;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  margin: 4px 0 8px;
  color: var(--cml-ink);
}

.subtitle {
  color: var(--cml-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.card {
  background: var(--cml-surface);
  border: 1px solid var(--cml-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.incentive-banner {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--cml-accent-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.incentive-banner .amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--cml-accent-dark);
  white-space: nowrap;
}

.incentive-banner .text {
  font-size: 14px;
  color: var(--cml-ink);
  line-height: 1.4;
}

.step-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cml-accent-dark);
  margin-bottom: 6px;
}

button {
  font-family: inherit;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.05s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--cml-accent-dark);
  color: white;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  background: var(--cml-surface);
  color: var(--cml-accent-dark);
  border: 1.5px solid var(--cml-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--cml-muted);
  font-weight: 500;
  padding: 10px;
}

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--cml-border);
  font-size: 16px;
  background: var(--cml-surface);
  color: var(--cml-ink);
  margin-bottom: 12px;
  font-family: inherit;
}

textarea { resize: vertical; min-height: 90px; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--cml-accent);
}

label {
  font-size: 13px;
  color: var(--cml-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.selfie-frame {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cml-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}

.selfie-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selfie-frame .placeholder {
  color: var(--cml-accent-dark);
  text-align: center;
  font-size: 14px;
  padding: 20px;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cml-border);
}

.friend-row:last-child { border-bottom: none; }

.friend-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cml-accent-soft);
  color: var(--cml-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.friend-meta { flex: 1; min-width: 0; }
.friend-name { font-weight: 600; font-size: 15px; }
.friend-phone { font-size: 13px; color: var(--cml-muted); }

.status-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-sent { background: #eef1f6; color: #4a5568; }
.status-claimed { background: #fff4e0; color: #92650b; }
.status-redeemed { background: #e6f4ec; color: var(--cml-success); }

.progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}

.progress-dots .dot {
  height: 5px;
  flex: 1;
  border-radius: 3px;
  background: var(--cml-border);
}

.progress-dots .dot.active { background: var(--cml-accent-dark); }

.footer-note {
  font-size: 12px;
  color: var(--cml-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.error-box {
  background: #fbeceA;
  border: 1px solid #f0c6bf;
  color: var(--cml-danger);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}

.success-box {
  background: #eaf6ef;
  border: 1px solid #c9e8d5;
  color: var(--cml-success);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--cml-border); }
th { color: var(--cml-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
