:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #0ea5e9;
  --surface: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-light: #dcfce7;
}

body {
  background: var(--surface);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.site-navbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%, #ecfeff 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}

.hero-section.hero-compact {
  padding: 2.5rem 0 2rem;
}

.hero-badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Form section */
.form-section {
  padding: 0 0 4rem;
  margin-top: -1.5rem;
}

.wizard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 2rem 2.5rem 1.5rem;
  overflow: hidden;
}

/* Progress stepper */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 90px;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.wizard-step.active,
.wizard-step.completed {
  opacity: 1;
}

.wizard-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--muted);
  transition: all 0.25s;
}

.wizard-step.active .wizard-step-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.wizard-step.completed .wizard-step-icon {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.wizard-step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--primary-dark);
}

.wizard-connector {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--border);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
  transition: background 0.25s;
}

.wizard-connector.completed {
  background: var(--success);
}

/* Panels */
.wizard-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.wizard-panel.active {
  display: block;
}

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

.panel-header {
  margin-bottom: 1.75rem;
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.panel-header p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.panel-header strong {
  color: var(--text);
}

/* Form controls */
.form-control-lg,
.input-group-lg .form-control {
  border-radius: 10px;
  border-color: var(--border);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.fecha-input {
  max-width: 280px;
}

.input-group-text {
  background: var(--primary-light);
  border-color: var(--border);
  color: var(--primary);
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

/* Time slots grid */
.horarios-placeholder,
.horarios-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.horarios-placeholder i {
  font-size: 1.25rem;
  opacity: 0.6;
}

.horarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.horario-btn {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.horario-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.horario-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.horario-hora {
  font-weight: 600;
  font-size: 0.95rem;
}

.alert-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

/* Summary */
.resumen-cita {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.resumen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.resumen-item:last-child {
  border-bottom: none;
}

.resumen-item.resumen-destacado {
  background: var(--primary-light);
}

.resumen-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.resumen-valor {
  font-weight: 600;
  text-align: right;
  font-size: 0.95rem;
}

.resumen-destacado .resumen-valor {
  color: var(--primary-dark);
  font-size: 1rem;
}

/* Actions */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.wizard-actions .btn-lg {
  border-radius: 10px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
}

.wizard-actions .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.wizard-actions .btn-success {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

/* Success / error pages */
.cta-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 2.5rem 2rem;
}

.exito-info {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.5rem;
}

.exito-info-title {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.exito-info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.copyable-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.copyable-item:last-child {
  margin-bottom: 0;
}

.copyable-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.copyable-item.copied {
  border-color: var(--success);
  background: var(--success-light);
}

.copyable-icon {
  color: var(--primary);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.copyable-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
  color: var(--text);
}

.copyable-action {
  color: var(--muted);
  margin-top: 0.15rem;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.copyable-item.copied .copyable-action {
  color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
  .wizard-card {
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 16px;
  }

  .wizard-progress {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
  }

  .wizard-step {
    min-width: 60px;
  }

  .wizard-step-label {
    font-size: 0.7rem;
  }

  .wizard-step-icon {
    width: 38px;
    height: 38px;
    font-size: 0.875rem;
  }

  .wizard-connector {
    max-width: 32px;
    margin-bottom: 1.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .panel-header h2 {
    font-size: 1.2rem;
  }

  .resumen-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .resumen-valor {
    text-align: left;
  }

  .horarios-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  .wizard-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .wizard-actions .btn-lg {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 400px) {
  .wizard-step-label {
    display: none;
  }
}
