/* ── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #584A64;
  --primary-light: #2e86c1;
  --accent: #27ae60;
  --accent-dark: #1e8449;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dce3ec;
  --text: #2c3e50;
  --text-muted: #6c7a8a;
  --danger: #e74c3c;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 10px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.site-header {
  background: var(--primary);
  color: white;
  padding: 20px 24px;
  text-align: center;
}
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; font-weight: 700; }
.logo-icon { font-size: 26px; }
.logo-product { font-weight: 300; opacity: 0.85; }
.header-tagline { margin-top: 6px; font-size: 14px; opacity: 0.75; letter-spacing: 0.5px; }

.container { max-width: 820px; margin: 0 auto; padding: 24px 16px; flex: 1; }

.prospect-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.prospect-card-image {
  width: auto;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  padding:4px;
  border: 1px solid var(--border);
  background: #fff;
}

.prospect-card-content {
  min-width: 0;
}

.prospect-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.prospect-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

.site-footer { background: var(--primary); color: rgba(255,255,255,0.6); text-align: center; padding: 16px; font-size: 13px; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }

/* ── Steps ──────────────────────────────────────────────────────────────────── */
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--border); color: var(--text-muted); font-weight: 700; font-size: 14px;
  transition: all 0.2s;
}
.step-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.step.active .step-circle { background: var(--primary); color: white; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.completed .step-circle { background: var(--accent); color: white; }
.step-line { width: 60px; height: 2px; background: var(--border); margin-bottom: 22px; }

/* ── Card ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card h2 { font-size: 20px; color: var(--primary); margin-bottom: 6px; }
.sub { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* ── Loading / Error ────────────────────────────────────────────────────────── */
.loading-state { display: flex; align-items: center; gap: 12px; padding: 20px 0; color: var(--text-muted); }
.spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.slots-error { background: #fdecea; border: 1px solid #f5c6cb; border-radius: 6px; padding: 14px; color: #721c24; }

.error-banner {
  background: #fdecea; border: 1px solid var(--danger);
  color: var(--danger); border-radius: 6px; padding: 12px 16px;
  margin-bottom: 16px; font-size: 14px;
}

/* ── Calendar ───────────────────────────────────────────────────────────────── */
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.week-label { font-weight: 600; font-size: 15px; color: var(--text); }
.nav-btn {
  background: var(--primary); color: white; border: none;
  padding: 7px 16px; border-radius: 6px; cursor: pointer; font-size: 13px;
  transition: background 0.15s;
}
.nav-btn:hover:not(:disabled) { background: var(--primary-light); }
.nav-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.day-columns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.day-col { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.day-col.past { opacity: 0.45; pointer-events: none; }

.day-header {
  background: var(--primary); color: white; padding: 10px;
  text-align: center;
}
.day-name { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.day-date { font-weight: 600; font-size: 13px; margin-top: 2px; }

.slot-list { padding: 8px; display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow-y: auto; }
.slot-btn {
  width: 100%; padding: 7px 5px; border: 1px solid var(--border);
  background: white; border-radius: 5px; cursor: pointer; font-size: 13px;
  color: var(--primary); font-weight: 500; transition: all 0.15s;
  text-align: center;
}
.slot-btn:hover { background: #eaf2fb; border-color: var(--primary-light); }
.slot-btn.selected { background: var(--primary); color: white; border-color: var(--primary); }
.no-slots { text-align: center; padding: 16px 0; color: var(--text-muted); font-size: 13px; }

.no-slots-msg { text-align: center; color: var(--text-muted); padding: 12px 0; font-size: 14px; }

/* ── Selected Preview ───────────────────────────────────────────────────────── */
.selected-preview {
  display: flex; align-items: center; gap: 10px;
  background: #eafaf1; border: 1px solid #a9dfbf;
  border-radius: 6px; padding: 12px 16px; margin-top: 16px;
  font-weight: 500; color: var(--accent-dark);
}
.checkmark { font-size: 18px; }

/* ── Form ───────────────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
label { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.req { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; color: var(--text); background: white; width: 100%;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46,134,193,0.15);
}
textarea { resize: vertical; font-family: inherit; }

/* ── Review ─────────────────────────────────────────────────────────────────── */
.review-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.review-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.review-section:last-child { border-bottom: none; }
.review-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 6px; }
.review-highlight { font-size: 17px; font-weight: 600; color: var(--primary); }
.confirm-note { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.step-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.btn-primary, .btn-secondary, .btn-confirm {
  padding: 10px 22px; border-radius: 7px; font-size: 14px;
  font-weight: 600; cursor: pointer; border: none; transition: all 0.15s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-secondary:hover { background: #eaf2fb; }
.btn-confirm { background: var(--accent); color: white; padding: 12px 28px; font-size: 15px; }
.btn-confirm:hover:not(:disabled) { background: var(--accent-dark); }
.btn-confirm:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 14px; text-decoration: underline; }
.link-btn.small { font-size: 13px; }

/* ── Success ────────────────────────────────────────────────────────────────── */
.success-card { text-align: center; padding: 48px 28px; }
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-card h2 { font-size: 26px; margin-bottom: 10px; }
.success-card p { color: var(--text-muted); margin-bottom: 16px; }
.confirmation-badge {
  display: inline-block; background: #eafaf1; border: 1px solid #a9dfbf;
  color: var(--accent-dark); padding: 10px 24px; border-radius: 6px;
  font-size: 15px; margin: 12px 0;
}
.success-sub { font-size: 14px; color: var(--text-muted); margin-top: 16px; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .prospect-card { padding: 12px; }
  .prospect-card-image { width: 52px; height: 52px; }
  .form-row { grid-template-columns: 1fr; }
  .day-columns { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .day-header { padding: 7px 4px; }
  .day-name { font-size: 10px; }
  .day-date { font-size: 11px; }
  .slot-btn { font-size: 11px; padding: 6px 2px; }
  .step-line { width: 24px; }
  .card { padding: 20px 16px; }
  .step-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary, .btn-confirm { width: 100%; text-align: center; }
}
