/* ==========================================================================
   VitalHealth Suite - Sistema de Diseño Compartido (shared.css)
   Glassmorphism, Temas Claro/Oscuro, Tipografía, Componentes y Barra Global
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta Base - Modo Oscuro */
  --bg-app: #080b14;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-card-solid: #121826;
  --bg-card-hover: rgba(28, 36, 56, 0.85);
  --bg-card-elevated: rgba(26, 34, 52, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Acentos de Marca */
  --primary-accent: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  /* Colores de Salud y Diagnóstico */
  --color-underweight: #38bdf8;
  --color-normal: #10b981;
  --color-overweight: #f59e0b;
  --color-obese1: #f97316;
  --color-obese2: #ef4444;
  --color-athletic: #a855f7;
  --color-fitness: #0ea5e9;
  --color-heart: #ec4899;
  --color-sleep: #8b5cf6;
  --color-water: #06b6d4;
  --color-fasting: #f59e0b;
  
  /* Dimensiones y Sombras */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 35px var(--primary-glow);
  
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s ease;
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-card-elevated: #ffffff;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-glow: rgba(99, 102, 241, 0.35);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --primary-glow: rgba(99, 102, 241, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

html {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Fondos de Luz Ambiental (Ambient Glows) */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

[data-theme="light"] .bg-glow {
  opacity: 0.25;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  top: -120px;
  left: -120px;
}

.bg-glow-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  bottom: 5%;
  right: -100px;
}

.bg-glow-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 40%;
  left: 30%;
}

/* Barra de Navegación Global de la Suite */
.suite-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8, 11, 20, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

[data-theme="light"] .suite-nav-bar {
  background: rgba(255, 255, 255, 0.85);
}

.suite-nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ── Fila 1: logo + controles ─────────────────────────── */
.suite-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
}

.suite-brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.suite-brand-link:hover {
  opacity: 0.9;
}

.suite-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
  overflow: hidden;
}

/* Logo de imagen personalizado */
.suite-brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
}

.suite-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.suite-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.suite-brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  white-space: nowrap;
}

.suite-brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Botones de control (lang, tema, sonido…) */
.suite-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.suite-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Fila 2: strip de pills ───────────────────────────── */
/* Visible en escritorio; en móvil se oculta y usa el drawer */
.suite-nav-pills-row {
  border-top: 1px solid var(--border-subtle);
  padding: 0.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suite-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;           /* ← crece en varias filas si hay muchas apps */
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.suite-nav-pill {
  padding: 0.38rem 0.75rem;
  border-radius: 20px;
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.suite-nav-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

[data-theme="light"] .suite-nav-pill:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.suite-nav-pill.active,
.suite-nav-pill.active:hover,
[data-theme="light"] .suite-nav-pill.active,
[data-theme="light"] .suite-nav-pill.active:hover {
  color: #ffffff !important;
  background: var(--primary-accent) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 10px var(--primary-glow);
  opacity: 1;
}

/* Botón hamburguesa (oculto por defecto en escritorio) */
.mobile-menu-btn {
  display: none;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
}

.mobile-menu-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

[data-theme="light"] .mobile-menu-btn {
  background: rgba(0, 0, 0, 0.04);
}

.mobile-menu-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}


/* Botones de icono cuadrados (sonido, tema, home) */
.nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  text-decoration: none;
}

[data-theme="light"] .nav-icon-btn {
  background: rgba(0, 0, 0, 0.04);
}

.nav-icon-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}

/* Botón de idioma */
.nav-lang-btn {
  height: 38px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .nav-lang-btn {
  background: rgba(0, 0, 0, 0.04);
}

.nav-lang-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}

/* Contenedor Principal */

.suite-container,
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* ==============================================================================
   BARRA DE ESPECTRO LINEAL CON MARCADOR FLOTANTE (ESTILO VITALIMC)
   ============================================================================== */
.spectrum-container {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 3.4rem auto 1.2rem;
  padding: 0 4px;
}

.spectrum-marker {
  position: absolute;
  top: -38px;
  transform: translateX(-50%);
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.marker-bubble {
  background: var(--primary-accent);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.marker-pin {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--primary-accent);
  margin-bottom: 3px;
  transition: border-top-color 0.3s ease;
}

.spectrum-bar {
  display: flex;
  height: 18px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

[data-theme="light"] .spectrum-bar {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.seg-item {
  height: 100%;
  position: relative;
  transition: opacity 0.3s ease;
}

.seg-item:not(:last-child) {
  border-right: 1.5px solid rgba(0, 0, 0, 0.3);
}

.spectrum-ticks {
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 6px;
}

.tick-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
}

.spectrum-category-row {
  display: flex;
  margin-top: 4px;
}

.cat-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tarjetas Glassmorphism Comunes */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-strong);
}

/* Cajas de Fundamento Científico */
.science-box {
  background: rgba(99, 102, 241, 0.07);
  border-left: 4px solid var(--primary-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.4rem 1.6rem;
  margin: 1.8rem 0;
}

.science-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.science-icon {
  font-size: 1.3rem;
}

.science-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.science-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.science-formula {
  margin-top: 0.8rem;
  padding: 0.6rem 0.9rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  color: #c4b5fd;
  display: inline-block;
}

[data-theme="light"] .science-formula {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

/* Controles de Formulario Compartidos */
.input-group {
  margin-bottom: 1.3rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.group-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.input-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: normal;
}

.value-display {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-accent);
}

.unit-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-range {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

[data-theme="light"] .custom-range {
  background: #cbd5e1;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-accent);
  box-shadow: 0 0 10px var(--primary-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Contenedor del Input Numérico con Sufijo */
.number-input-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  min-width: 92px;
  width: auto;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: text;
}

[data-theme="light"] .number-input-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

.number-input-box:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Campo Numérico Base */
.number-input-field {
  width: 82px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  outline: none;
  transition: border-color 0.2s ease;
  -moz-appearance: textfield;
}

.number-input-field::-webkit-inner-spin-button,
.number-input-field::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

[data-theme="light"] .number-input-field {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] select,
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="text"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

.number-input-field:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Integración sin solapamiento dentro de .number-input-box */
.number-input-box .number-input-field {
  flex: 1;
  min-width: 44px;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-align: right;
}

.number-input-box .suffix,
.suffix {
  position: static;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  pointer-events: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Botones Principales */
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  background: var(--bg-card-hover);
}

/* Botones de selección de opción compactos */
.opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  user-select: none;
}

[data-theme="light"] .opt-btn {
  background: #f8fafc;
  color: var(--text-muted);
}

.opt-btn:hover {
  border-color: var(--primary-accent);
  color: var(--text-main);
  transform: translateY(-1px);
}

.opt-btn.active {
  border-color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-accent);
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--primary-accent), 0 4px 14px var(--primary-glow);
}

/* Selector de Género en Píldoras */
.toggle-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .toggle-pills {
  background: #e2e8f0;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.pill-btn.active {
  background: var(--bg-card-solid);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Selector de Género Biológico (Tarjetas / Botones de Precisión) */
.gender-toggle-group,
.gender-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gender-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

[data-theme="light"] .gender-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #475569;
}

.gender-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-accent);
  color: var(--text-main);
  transform: translateY(-1px);
}

[data-theme="light"] .gender-btn:hover:not(.active) {
  background: #f1f5f9;
  border-color: var(--primary-accent);
  color: #0f172a;
}

.gender-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary-accent);
  color: var(--text-main);
  box-shadow: 0 0 0 1px var(--primary-accent), 0 4px 14px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .gender-btn.active {
  background: #eef2ff;
  border-color: var(--primary-accent);
  color: var(--primary-accent);
  box-shadow: 0 0 0 1px var(--primary-accent), 0 4px 14px rgba(99, 102, 241, 0.18);
}

.gender-btn .gender-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Toast de Notificaciones */
.suite-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  transform: translateY(0);
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.88rem;
  font-weight: 600;
}

.suite-toast.hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

/* Pie de Página */
.suite-footer {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 4rem;
}

.suite-footer a {
  color: var(--primary-accent);
  text-decoration: none;
}

.suite-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Estilos Específicos del Portal Principal (Hub) & Componentes de la Suite
   ========================================================================== */

/* Hero del Portal */
.hub-hero {
  text-align: center;
  max-width: 820px;
  margin: 1.5rem auto 3rem;
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c7d2fe;
  margin-bottom: 1.2rem;
}

[data-theme="light"] .hub-hero-badge {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.25);
}

.hub-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hub-hero-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}

/* Tarjeta de Perfil Rápido Unificado */
.profile-hub-card {
  margin-bottom: 3.5rem;
  background: linear-gradient(135deg, rgba(24, 32, 54, 0.85) 0%, rgba(18, 24, 38, 0.9) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .profile-hub-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.profile-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.profile-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .profile-stat-box {
  background: #f8fafc;
}

.profile-stat-title {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.profile-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Cuadrícula de Aplicaciones */
.section-heading {
  margin-bottom: 1.8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-heading h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading span {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.8rem;
  margin-bottom: 4rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.app-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.3);
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.app-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Gradientes por Aplicación */
.app-icon-imc { background: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%); }
.app-icon-cardio { background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%); }
.app-icon-macros { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.app-icon-sueno { background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%); }
.app-icon-hidro { background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%); }
.app-icon-ayuno { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.app-icon-bioage { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #06b6d4 100%); }
.app-icon-findrisc { background: linear-gradient(135deg, #e11d48 0%, #f43f5e 50%, #fb7185 100%); }
.app-icon-vo2max { background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%); }
.app-icon-chrono { background: linear-gradient(135deg, #ea580c 0%, #f59e0b 50%, #facc15 100%); }
.app-icon-vagus { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a855f7 100%); }
.app-icon-egfr { background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #38bdf8 100%); }
.app-icon-uacr { background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%); }
.app-icon-kdigo { background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%); }
.app-icon-kfre { background: linear-gradient(135deg, #dc2626 0%, #ea580c 50%, #f97316 100%); }

.app-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.app-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.2rem;
  flex: 1;
}

.app-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.app-feature-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-dim);
}

[data-theme="light"] .app-feature-pill {
  background: #f1f5f9;
  color: #475569;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.app-action-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform var(--transition-fast);
}

.app-card:hover .app-action-link {
  transform: translateX(4px);
}

/* Pilares Científicos */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.pillar-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.pillar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.pillar-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Drawer Móvil de la Suite */
.suite-mobile-drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
  overflow: hidden;
}

.suite-mobile-drawer.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  max-width: 85vw;
  background: var(--bg-card-solid);
  border-left: 1px solid var(--border-strong);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1.25rem;
  z-index: 2;
}

.suite-mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.2rem;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

[data-theme="light"] .drawer-close-btn {
  background: rgba(0, 0, 0, 0.05);
}

.drawer-close-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
}

.drawer-apps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  flex: 1;
}

.drawer-app-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.drawer-app-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

[data-theme="light"] .drawer-app-item {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .drawer-app-item:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-subtle);
}

.drawer-app-item.active,
.drawer-app-item.active:hover,
[data-theme="light"] .drawer-app-item.active,
[data-theme="light"] .drawer-app-item.active:hover {
  background: var(--primary-accent) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.drawer-app-item.active .drawer-app-sub,
.drawer-app-item.active:hover .drawer-app-sub,
[data-theme="light"] .drawer-app-item.active:hover .drawer-app-sub {
  color: rgba(255, 255, 255, 0.85) !important;
}

.drawer-app-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.drawer-app-info {
  display: flex;
  flex-direction: column;
}

.drawer-app-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.drawer-app-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-footer {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.drawer-action-btn {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.drawer-action-btn[data-action="toggle-theme"] {
  flex: 0 0 44px;
  width: 44px;
  padding: 0.6rem 0;
  font-size: 1.15rem;
  justify-content: center;
}

[data-theme="light"] .drawer-action-btn {
  background: rgba(0, 0, 0, 0.04);
}

.drawer-action-btn:hover {
  border-color: var(--primary-accent);
}

/* Modal de Personalización Pharma / Marca Blanca */
.pharma-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pharma-modal.open {
  display: flex;
}

.pharma-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pharma-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

.pharma-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pharma-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}

.pharma-preset-card {
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all var(--transition-fast);
}

[data-theme="light"] .pharma-preset-card {
  background: rgba(0, 0, 0, 0.02);
}

.pharma-preset-card:hover {
  border-color: var(--primary-accent);
  background: rgba(255, 255, 255, 0.06);
}

.pharma-preset-card.active {
  border-color: var(--primary-accent);
  background: rgba(2, 132, 199, 0.12);
  box-shadow: 0 0 15px var(--primary-glow);
}

.pharma-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.pharma-preset-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.pharma-btn {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.pharma-btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.pharma-btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.pharma-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

[data-theme="light"] .pharma-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
}

.pharma-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pharma-footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: all var(--transition-fast);
}

[data-theme="light"] .pharma-footer-pill {
  background: rgba(0, 0, 0, 0.04);
}

.pharma-footer-pill:hover {
  color: var(--text-main);
  border-color: var(--primary-accent);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* ─── Responsivo ─────────────────────────────────────────── */

/* Móvil ≤ 860px: navegación en 2 filas (Fila 1: Logo, Fila 2: Acciones rápidas + Menú) */
@media (max-width: 860px) {
  .suite-nav-pills-row {
    display: none !important;
  }

  /* Barra de navegación en dos filas en móvil */
  .suite-nav-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.55rem 1rem 0.55rem;
  }

  /* Fila 1: Logotipo e identidad de marca con espacio dedicado */
  .suite-brand-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .suite-brand-icon,
  .suite-brand-logo-img {
    width: 34px;
    height: 34px;
  }

  .suite-brand-title {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .suite-brand-sub {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Fila 2: Opciones rápidas a la izquierda y Menú a la derecha */
  .suite-nav-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border-subtle);
  }

  .suite-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-icon-btn,
  .nav-lang-btn,
  .mobile-menu-btn {
    height: 35px;
  }

  .nav-icon-btn {
    width: 35px;
    font-size: 0.95rem;
  }

  .nav-lang-btn {
    padding: 0 0.55rem;
    font-size: 0.78rem;
  }

  /* Botón de Menú Móvil visible y estilizado */
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.8rem;
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 2px 8px var(--primary-glow);
  }

  [data-theme="light"] .mobile-menu-btn {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary-accent);
    color: var(--primary-accent);
  }

  .mobile-menu-btn:hover {
    background: var(--primary-accent);
    color: #ffffff;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsivo para móviles (≤ 600px) */
@media (max-width: 600px) {
  .suite-container {
    padding: 1.2rem 0.85rem 3rem;
  }
  .glass-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
  .science-box {
    padding: 1rem 1.1rem;
  }
  .profile-hub-grid {
    grid-template-columns: 1fr;
  }
}

/* Para dispositivos móviles compactos (≤ 360px) */
@media (max-width: 360px) {
  .suite-nav-top {
    padding: 0.45rem 0.65rem 0.5rem;
    gap: 0.35rem;
  }

  .suite-nav-actions,
  .suite-quick-actions {
    gap: 0.25rem;
  }

  .nav-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 0.88rem;
  }

  .nav-lang-btn {
    height: 32px;
    padding: 0 0.45rem;
    font-size: 0.72rem;
  }

  .mobile-menu-btn {
    height: 32px;
    padding: 0 0.55rem;
  }

  .mobile-menu-text {
    font-size: 0.75rem;
  }
}

/* Pantallas extremadamente estrechas (≤ 320px) */
@media (max-width: 320px) {
  .mobile-menu-text {
    display: none;
  }
  .mobile-menu-btn {
    width: 32px;
    padding: 0;
  }
}

