:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --primary-bg: #d8f3dc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.header {
  text-align: center;
  padding: 24px 0;
}

.header-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
}

.header p {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Progress Steps */
.progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.progress-dot.completed {
  background: var(--primary-light);
}

/* Step Container */
.step {
  display: none;
  animation: fadeIn 0.3s ease;
  flex: 1;
}

.step.active {
  display: block;
}

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

.step-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-800);
}

/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--gray-700); }

.back-btn svg { width: 16px; height: 16px; }

/* Service Cards */
.service-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.service-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.service-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
}

.service-price {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.975rem;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-500);
  font-size: 0.813rem;
  margin-bottom: 8px;
}

.service-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

.service-description {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Calendar */
.calendar {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.calendar-nav h3 {
  font-size: 1rem;
  font-weight: 600;
}

.calendar-nav button {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.2s;
}

.calendar-nav button:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.calendar-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 8px 12px;
  gap: 2px;
}

.calendar-day-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  padding: 8px 0;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.calendar-day:hover:not(.disabled):not(.empty) {
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.calendar-day.today {
  font-weight: 700;
  color: var(--primary);
}

.calendar-day.selected {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.calendar-day.disabled {
  color: var(--gray-400);
  cursor: not-allowed;
  position: relative;
}

/* Blue diagonal line across blocked dates */
.calendar-day.disabled:not(.empty)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  height: 1.5px;
  background: #4a90d9;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  opacity: 0.5;
  pointer-events: none;
}

.calendar-day.empty {
  cursor: default;
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.time-slot {
  padding: 12px;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.time-slot.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.no-slots {
  text-align: center;
  color: var(--gray-500);
  padding: 40px 20px;
  font-size: 0.875rem;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.938rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Confirmation */
.confirmation {
  text-align: center;
  padding: 20px 0;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.confirmation-icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.confirmation h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.confirmation p {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.booking-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: left;
  margin-bottom: 24px;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
}

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

.booking-summary-label { color: var(--gray-500); }
.booking-summary-value { font-weight: 500; }

.calendar-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.calendar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.813rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s;
}

.calendar-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 12px; }
  .time-slots { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .header h1 { font-size: 1.25rem; }
}
