/* Importar tipografía Outfit para un aspecto moderno y limpio */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Paleta Pastel Premium de Salud y Bienestar */
  --bg-primary: #f8fafc;
  /* Gris/Azulado extremadamente suave */
  --bg-card: #ffffff;

  /* Estados Pasteles */
  --state-por-confirmar-bg: #fef3c7;
  /* Amarillo suave */
  --state-por-confirmar-text: #b45309;

  --state-confirmado-bg: #d1fae5;
  /* Verde menta suave */
  --state-confirmado-text: #065f46;

  --state-cancelado-bg: #fee2e2;
  /* Coral suave */
  --state-cancelado-text: #991b1b;

  --state-reprogramado-bg: #e0e7ff;
  /* Lavanda suave */
  --state-reprogramado-text: #3730a3;

  --state-anulado-bg: #f3f4f6;
  /* Gris cenizo suave */
  --state-anulado-text: #374151;
}

body {
  font-family: var(--font-sans);
  background-color: #e2e8f0;
  /* Fondo general de la página en desktop */
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #1e293b;
}

/* Contenedor tipo dispositivo móvil / centrado */
.app-container {
  width: 100%;
  max-width: 440px;
  /* Ancho ideal optimizado para móvil vertical */
  height: 100vh;
  max-height: 920px;
  /* Alto máximo en desktop */
  background-color: var(--bg-primary);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  /* Bordes redondeados en desktop */
  border: 8px solid #ffffff;
  /* Marco sutil sobrio en desktop */
}

/* En pantallas verdaderamente móviles, se expande a pantalla completa y quita el borde */
@media (max-width: 480px) {
  body {
    background-color: var(--bg-primary);
  }

  .app-container {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

/* SPA: Estructura de pantallas */
.spa-page {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.98);
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 84px;
  /* Espacio para el Tab Bar inferior si existe */
}

.spa-page.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

/* Animación de entrada de pantalla */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-slide {
  animation: fadeInSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Micro-interacción: Botón táctil con escala activa */
.btn-touch {
  transition: transform 0.1s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.btn-touch:active {
  transform: scale(0.97);
}

/* Estilo del Scrollbar oculto pero funcional */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Clases específicas de estados de citas (pasteles y legibles) */
.badge-por-confirmar {
  background-color: var(--state-por-confirmar-bg);
  color: var(--state-por-confirmar-text);
}

.badge-confirmado {
  background-color: var(--state-confirmado-bg);
  color: var(--state-confirmado-text);
}

.badge-cancelado {
  background-color: var(--state-cancelado-bg);
  color: var(--state-cancelado-text);
}

.badge-reprogramado {
  background-color: var(--state-reprogramado-bg);
  color: var(--state-reprogramado-text);
}

.badge-anulado {
  background-color: var(--state-anulado-bg);
  color: var(--state-anulado-text);
}

/* Estilización tipo iOS de cards y inputs */
.ios-card {
  background-color: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ios-card:active {
  transform: translateY(1px);
}

.ios-input {
  background-color: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  transition: all 0.2s ease;
  width: 100%;
}

.ios-input:focus {
  outline: none;
  border-color: #0ea5e9;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* Toast de Notificaciones */
#toast {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 100;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Timeline para historial de visitas */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 36px;
  bottom: -20px;
  width: 2px;
  background-color: #e2e8f0;
}

.timeline-item:last-child::before {
  display: none;
}


.ocultar {
  display: none !important;
}