/* =========================================================
   SISTEMA DE ESTILOS BASE - COMUNICACIÓN FRATERNAL
   Diseño de Alta Accesibilidad, Contraste Suave y Estética Premium
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta Base y Modo Oscuro Suave (Hospital Friendly) */
  --bg-patient: #16181b;
  --bg-patient-card: #20242a;
  --bg-patient-surface: #2a2f38;
  
  --text-patient-primary: #fff9c4;   /* Amarillo pastel de alto contraste y baja fatiga */
  --text-patient-secondary: #e2e8f0; /* Blanco roto suave */
  --text-patient-muted: #94a3b8;
  
  /* Paleta Vista Familiar (Cálida, Moderna, Empática) */
  --bg-family-app: #0f172a;
  --bg-family-surface: #1e293b;
  --bg-family-card: #334155;
  --text-family-primary: #f8fafc;
  --text-family-secondary: #cbd5e1;
  --text-family-muted: #64748b;

  /* Colores de Acento y Estado */
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-soft: rgba(56, 189, 248, 0.15);

  --accent-warm: #fb923c;
  --accent-rose: #f43f5e;

  /* 4 Botones Táctiles Paciente */
  --btn-yes-bg: #15803d;
  --btn-yes-active: #16a34a;
  --btn-yes-text: #ffffff;
  --btn-yes-glow: rgba(34, 197, 94, 0.35);

  --btn-no-bg: #b91c1c;
  --btn-no-active: #dc2626;
  --btn-no-text: #ffffff;
  --btn-no-glow: rgba(239, 68, 68, 0.35);

  --btn-more-bg: #1d4ed8;
  --btn-more-active: #2563eb;
  --btn-more-text: #ffffff;
  --btn-more-glow: rgba(59, 130, 246, 0.35);

  --btn-help-bg: #c2410c;
  --btn-help-active: #ea580c;
  --btn-help-text: #ffffff;
  --btn-help-glow: rgba(249, 115, 22, 0.4);

  /* Bordes, Sombras y Radios */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);

  /* Tipografías */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-accessible: 'Atkinson Hyperlegible', 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-family-app);
  color: var(--text-family-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar estilizada y sutil */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}

/* Utilidades generales */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.glow-effect {
  box-shadow: var(--shadow-glow);
}

.pulse-animation {
  animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.04); }
}

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

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

/* Indicador de conexión sutil */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-family-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.network-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.network-dot.disconnected {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.network-dot.reconnecting {
  background: #eab308;
  box-shadow: 0 0 8px #eab308;
  animation: pulse 1s infinite;
}
