/*
 * Nuuma · Escala tipográfica y densidad (v2.8.6–2.8.7)
 * Se carga al final de todas las hojas del tema para que una sola escala
 * gobierne los tamaños de texto en todos los módulos.
 */
/* ==========================================================================
   v2.8.5 · Escala tipográfica compacta
   Poppins es ancha: a igual tamaño se ve más grande que otras fuentes, y
   varias cifras crecían con el ancho de la pantalla (KPI hasta 32 px). Escala
   única para todo el panel:
     11–12 px  etiquetas, metas y ayudas (sin cambio)
     13 px     texto, tablas, botones, nombres en listas
     14 px     títulos de tarjeta
     16 px     títulos de sección
     18 px     título de la página
     20 px     cabeceras destacadas (planes, perfil)
     22–24 px  cifras (KPI, peso actual)
   ========================================================================== */
body.nuuma-body { font-size: 13px; }

/* Título de la página y su rol */
.topbar h1 { font-size: 18px; line-height: 1.25; }

/* Títulos de sección y de tarjeta */
.section-head h2, .panel-heading h2, .pdir-title h2, .chat-list-head h2 { font-size: 16px; }
.modal-head h3 { font-size: 16px; }
.panel h3, .section-head h3, .drawer-section h3, .ph-card-title h3, .exercise-builder-title h3, .np-card h3 { font-size: 14px; }
.panel-heading h2 + p, .section-head p { font-size: 12.5px; }

/* Cifras */
.kpi strong { font-size: clamp(22px, 1.8vw, 24px); }
.exp-hero-num, .exp-overview .exp-hero-num { font-size: 22px; }
.weight-month-stat > strong { font-size: 19px; }
.performance-total { font-size: 15px; }
.appt-agenda .ev .time, .ev .time { font-size: 16px; }
.wg-daycol b { font-size: 14px; }

/* Cabeceras destacadas (paciente y fichas) */
.nutrition-page h2, .np-hero h2, .exercise-hero h2, .patient-progress h2 { font-size: 20px; }
.nutrition-page .section-head h2, .nutrition-page .panel-heading h2 { font-size: 16px; }
.profile-id h2 { font-size: 17px; }
.nutrition-page .np-hero h2 { font-size: 20px; }
.patient-exams-page .patient-initial-lab-head h2 { font-size: 16px; }
.exercise-today h3, .exercise-session .exercise-session-head h3 { font-size: 17px; }
.exercise-stats strong, .np-stats strong { font-size: 18px; }
.exercise-player h2 { font-size: 17px; }
.exercise-summary-head h3 { font-size: 18px; }
.exercise-loader strong { font-size: 14px; }
.ph-identity h2 { font-size: 16px; }
.profile-avatar, .profile-avatar.is-empty { font-size: 22px; }
.exp-id-txt h2 { font-size: 15px; }
.welcome-hero h1 { font-size: clamp(24px, 2.6vw, 30px); }
.welcome-hero p { font-size: 15px; }
.login-copy h1 { font-size: clamp(26px, 3vw, 38px); }

/* Texto de trabajo: tablas, botones, listas, nombres */
.btn, .file-btn, .citas-tab, .welcome-start { font-size: 13px; }
.data-table td, .data-table th + td, .users-table td { font-size: 13px; }
.pdir-name, a.pdir-name, .pdir-name-row { font-size: 13.5px; }
.pdir-avatar { font-size: 12.5px; }
.order-head-main strong, .lab-order-name strong, .pharmacy-med-name,
.patient-initial-copy strong, .followup-dose > strong, .chat-placeholder strong, .empty-state strong { font-size: 13.5px; }
.empty-state p { font-size: 12.5px; }
.acc-t { font-size: 14px; }
.wa-dayname { font-size: 13px; }
.agenda-nav strong { font-size: 14px; }
.ph-facts dd, .ph-facts dt { font-size: 12.5px; }
.ruta-svg-mid text { font-size: 12px; }

@container nutrition (max-width: 620px) {
  .np-hero h2 { font-size: 18px; }
  .np-stats strong { font-size: 17px; }
}

/* Metas cortas a la derecha de una fila («Semana 1», estados): una línea. */
.mini-item > :is(small, em, .badge, span:last-child) { white-space: nowrap; flex: none; }

/* ==========================================================================
   v2.8.7 · Densidad para laptops
   En una pantalla 1920×1080 con Windows al 150 % (lo más común en laptops) la
   página tiene 1280 × ~550 px útiles: todo se veía grande y el menú lateral
   no entraba. De 1200 a 1599 px de ancho (1920 al 125–150 %, 1366, 1440) el
   panel usa una versión más compacta: barra lateral más angosta, filas de
   menú más bajas, márgenes y textos un punto más chicos.
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 1599px) {
  body.nuuma-body { font-size: 12.5px; }

  /* Barra lateral */
  .nuuma-app { grid-template-columns: 224px minmax(0, 1fr); }
  .sidebar { gap: 14px; padding: 20px 12px 14px; }
  .brand { padding: 0 8px 4px; }
  .brand img { width: 112px; }
  .side-nav { gap: 2px; }
  .side-nav a { min-height: 36px; gap: 9px; padding: 7px 10px 7px 12px; font-size: 12.5px; border-radius: 12px; }
  .side-nav a .dashicons.ph-light { width: 18px; height: 18px; font-size: 18px; }
  /* Etiquetas largas («Sucursales de laboratorio») usan su versión corta. */
  .side-nav a .nav-label-full { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-nav a .nav-label-full.is-long { display: none; }
  .side-nav a .nav-label-full.is-long + .nav-label-short { display: inline; white-space: nowrap; }
  .logout { min-height: 46px; padding: 7px 8px; gap: 9px; border-radius: 14px; }
  .logout strong, .logout > span:last-child strong { font-size: 12.5px; }
  .logout small, .logout > span:last-child small { font-size: 11px; }

  /* Cabecera */
  .topbar { min-height: 60px; padding: 10px 26px; }
  .topbar h1 { font-size: 16px; }
  .topbar > div:not(.user-pill) > span { font-size: 11.5px; }
  .user-pill { padding: 5px 14px 5px 6px; gap: 8px; }
  .user-pill > span { width: 32px; height: 32px; font-size: 12px; }
  .user-pill strong { font-size: 12.5px; }
  .user-pill small { font-size: 11px; }
  .logout-mark { width: 30px; height: 30px; }

  /* Contenido */
  .workspace { gap: 16px; padding: 22px 26px; }
  .panel { padding: 22px; border-radius: 18px; }
  .section-head h2, .panel-heading h2, .pdir-title h2, .chat-list-head h2, .modal-head h3 { font-size: 15px; }
  .panel h3, .section-head h3, .drawer-section h3, .ph-card-title h3 { font-size: 13.5px; }
  .kpi strong { font-size: 22px; }
  .exp-hero-num, .exp-overview .exp-hero-num { font-size: 20px; }
  .btn, .file-btn, .citas-tab { font-size: 12.5px; }
  .order-head-main strong, .lab-order-name strong, .pharmacy-med-name,
  .patient-initial-copy strong, .followup-dose > strong, .chat-placeholder strong, .empty-state strong { font-size: 13px; }
  .nutrition-page h2, .np-hero h2, .exercise-hero h2, .patient-progress h2 { font-size: 18px; }
}

/* Interlineado de párrafos: algunos módulos usaban 1.8–1.9 y los textos
   ocupaban casi el doble de alto. Tope de 1.6 en todos los anchos. */
.workspace :is(p, li, ol, .exercise-history-notes):not(.welcome-hero p) { line-height: 1.6 !important; }

/* Tarjetas grandes con relleno propio (27 px) al mismo relleno que el resto. */
@media (min-width: 1200px) and (max-width: 1599px) {
  .patient-exams-page .patient-initial-lab { padding: 22px; }
  .workspace input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
  .workspace select:not([multiple]) { height: 36px !important; min-height: 36px !important; font-size: 12.5px !important; }
  .btn { min-height: 36px; }
}

/* Pantallas bajas (laptop con escalado, ventana no maximizada): el menú
   lateral entra completo sin desplazarse. */
@media (min-width: 1200px) and (max-height: 760px) {
  .sidebar { gap: 10px; padding-top: 14px; padding-bottom: 10px; }
  .brand img { width: 100px; }
  .side-nav { gap: 1px; }
  .side-nav a { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
  .logout { min-height: 40px; padding-top: 5px; padding-bottom: 5px; }
  .logout small, .logout > span:last-child small { display: none; }
  .topbar { min-height: 54px; padding-top: 8px; padding-bottom: 8px; }
}
