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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f7ff;
  color: #1a1a2e;
  min-height: 100vh;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.app-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.app-header h1 { font-size: 1.8rem; color: #1a1a2e; }
.app-header .subtitle { color: #666; margin-top: 0.3rem; }

/* Steps */
.step { display: none; animation: fadeIn 0.3s ease; }
.step.active { display: block; }
.step h2 { margin-bottom: 1.2rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Step indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 1rem;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.3s;
}
.dot.active { background: #4361ee; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.service-card {
  background: #fff;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.service-card:hover { border-color: #4361ee; box-shadow: 0 2px 12px rgba(67,97,238,0.15); }
.service-card.selected { border-color: #4361ee; background: #eef0ff; }
.svc-name { font-weight: 600; margin-bottom: 0.3rem; }
.svc-meta { color: #4361ee; font-size: 0.85rem; }
.svc-desc { color: #666; font-size: 0.82rem; margin-top: 0.5rem; }

/* Slot grid */
.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.slot-btn {
  background: #fff;
  border: 2px solid #e0e7ff;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  min-width: 180px;
}
.slot-btn:hover { border-color: #4361ee; background: #eef0ff; }
.slot-date { display: block; font-weight: 600; font-size: 0.9rem; }
.slot-time { display: block; color: #4361ee; font-size: 1rem; font-weight: 700; }

/* Date nav */
.date-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
#date-range-label { font-weight: 600; color: #333; }

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  padding: 1.5rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #333;
}
input[type="text"], input[type="tel"], input[type="email"], input[type="date"],
input[type="number"], select, textarea {
  border: 1.5px solid #d0d7ff;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #4361ee; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  border: 1.5px solid #d0d7ff;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  color: #333;
}
.btn:hover { background: #f0f4ff; border-color: #4361ee; }
.btn-primary { background: #4361ee; color: #fff; border-color: #4361ee; }
.btn-primary:hover { background: #3451d1; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f0f4ff; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; width: 100%; margin-top: 0.75rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Summary */
.summary-card {
  background: #fff;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  padding: 1.2rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f0f4ff;
  font-size: 0.93rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total { font-weight: 700; font-size: 1rem; color: #4361ee; }

/* Confirm */
.confirm-box { text-align: center; padding: 2rem; }
.confirm-icon { font-size: 3.5rem; color: #22c55e; margin-bottom: 1rem; }
.confirm-box h2 { color: #155724; margin-bottom: 1rem; }
.ref { font-size: 1.1rem; margin: 1rem 0; }

/* States */
.loading { color: #666; font-style: italic; }
.error   { color: #dc3545; font-size: 0.9rem; margin-top: 0.5rem; }
.empty   { color: #999; }
.hint    { color: #888; font-size: 0.82rem; text-align: center; margin-top: 0.5rem; }
.mt-1    { margin-top: 1rem; }
