/* ============================================================
   TAPEVI DOCTOR — ESTILOS BASE Y VARIABLES DE DISEÑO
   Regla estricta: Fondo Blanco, Azul Claro Médico, Cero Dark Mode
   ============================================================ */

:root {
  /* Paleta Médica Luminosa Oficial TAPEVI Doctor */
  --bg-main: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-soft: #F6FAFF;
  --bg-muted: #F1F5F9;

  /* Azules Médicos Oficiales TAPEVI Doctor (PANTONE 285 C / #0072CE) */
  --color-primary: #0072CE;        /* Azul Principal Oficial */
  --color-primary-hover: #005FA8;
  --color-primary-bright: #1683F5; /* Azul Brillante */
  --color-primary-light: #EAF4FF;  /* Azul muy suave oficial */
  --color-primary-focus: #BFDBFE;
  --color-accent: #00B8C8;         /* Turquesa Core TAPEVI */
  --color-navy: #071B41;           /* Navy Estructural Oficial */

  /* Tipografía y Contraste */
  --text-main: #071B41;            /* Navy para encabezados y énfasis */
  --text-body: #172033;            /* Texto general de lectura */
  --text-muted: #475569;           /* Gris oscuro legible (cumple WCAG AA) */
  --text-light: #64748B;

  /* Estados Funcionales Oficiales */
  --status-confirmed-bg: #E8F8F5;
  --status-confirmed-text: #00A878; /* Verde Funcional Oficial (Éxito / Confirmado) */
  --status-cancelled-bg: #FDE8EB;
  --status-cancelled-text: #D92D3F; /* Rojo Funcional Oficial (Alerta / Cancelar) */
  --status-pending-bg: #FFF7ED;
  --status-pending-text: #EA580C;

  /* Bordes y Sombras Sutiles */
  --border-light: #E2E8F0;
  --border-focus: #0072CE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);

  /* Dimensiones */
  --max-w-mobile: 480px;
  --max-w-content: 860px;
}

/* Reset y caja */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-soft);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Contenedor mobile-first */
.app-container {
  width: 100%;
  max-width: var(--max-w-mobile);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Encabezado limpio con z-index protegido para scroll */
.app-header {
  padding: 16px 20px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
  text-decoration: none;
}

.brand-logo svg {
  width: 26px;
  height: 26px;
  fill: var(--color-primary);
}

.brand-tag {
  font-size: 0.72rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

/* Cuerpo principal */
.app-content {
  flex: 1;
  padding: 20px;
}

/* Tipografía */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 1.6rem; margin-bottom: 8px; }
h2 { font-size: 1.25rem; margin-bottom: 12px; }
h3 { font-size: 1.05rem; }

p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
