/* ============================================================
   prof.css — Portal del profesional (FE-4)
   Reutiliza el design system A2 (variables.css) y el shell del
   portal (portal.css). Componentes: stats Hoy, agenda, tablas
   compactas, chips de estado, hilos de mensajería, ficha rápida.
   UX permanente: Nielsen + WCAG 2.1 AA + responsive 390/768/1280.
   ============================================================ */

/* ===== Chips de estado (color + texto, nunca solo color) ===== */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.status-chip .bi { font-size: 0.85rem; }

.st-programada  { background: rgba(0, 119, 182, 0.10);  color: #02609A; }
.st-confirmada  { background: rgba(6, 214, 160, 0.14);  color: #05806A; }
.st-completada  { background: rgba(2, 48, 71, 0.10);    color: var(--color-primary-dark); }
.st-cancelada   { background: rgba(239, 71, 111, 0.12); color: #B02348; }
.st-no_asistio  { background: rgba(255, 209, 102, 0.22); color: #8A6100; }
.st-abierta     { background: rgba(0, 119, 182, 0.10);  color: #02609A; }
.st-cerrada, .st-cerrado { background: rgba(2, 48, 71, 0.10); color: var(--color-primary-dark); }
.st-vencida     { background: rgba(239, 71, 111, 0.12); color: #B02348; }
.st-activa      { background: rgba(0, 119, 182, 0.10);  color: #02609A; }
.st-atendida    { background: rgba(6, 214, 160, 0.14);  color: #05806A; }
.st-descartada  { background: rgba(100, 116, 139, 0.14); color: #475569; }
.st-resuelta    { background: rgba(6, 214, 160, 0.14);  color: #05806A; }
.st-seguimiento { background: rgba(255, 209, 102, 0.22); color: #8A6100; }
.st-leida       { background: rgba(100, 116, 139, 0.14); color: #475569; }
.st-no-leida    { background: rgba(0, 119, 182, 0.10);  color: #02609A; }

/* ===== Mediciones modal (SVS-1): acordeón + source buttons ===== */
.med-acc-grupo { border: 1px solid rgba(0,119,182,0.12); border-radius: var(--radius-md); overflow: hidden; }
.med-acc-header {
  display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0.5rem 1rem;
  background: #fff; border: none; text-align: left; cursor: pointer;
  color: var(--color-primary-dark); font-size: 0.95rem;
  transition: background 0.15s ease;
}
.med-acc-header:hover, .med-acc-header:focus-visible { background: rgba(234,246,252,0.6); }
.med-acc-header:focus-visible { outline: 2px solid rgba(0,119,182,0.45); outline-offset: -2px; }
.med-acc-header.is-open { background: rgba(234,246,252,0.4); border-bottom: 1px solid rgba(0,119,182,0.1); }
.med-acc-chevron { transition: transform 0.2s ease; color: var(--color-primary); font-size: 0.9rem; }
.med-acc-chevron.bi-rotate { transform: rotate(180deg); }
.med-acc-body { padding: 0.75rem 1rem 1rem; background: rgba(248,251,254,0.5); }
.med-acc-count { font-size: 0.7rem; min-width: 1.6rem; }
.med-src-btn {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem;
  min-height: 48px; border: 2px solid rgba(0,119,182,0.15); border-radius: var(--radius-md);
  cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--color-gray-700);
  background: #fff; transition: all 0.15s ease; flex-grow: 1; justify-content: center;
}
.med-src-btn:has(input:checked) {
  border-color: var(--color-primary); background: rgba(234,246,252,0.8);
  color: var(--color-primary-dark);
}
.med-src-btn input { position: absolute; opacity: 0; }
.med-src-btn:focus-within { outline: 2px solid rgba(0,119,182,0.45); outline-offset: 2px; }
/* Móvil: botones de origen apilados a ancho completo (2 en fila no caben en 390px) */
@media (max-width: 575.98px) {
  .med-src-group { flex-direction: column !important; align-items: stretch; }
  .med-src-btn { justify-content: flex-start; width: 100%; padding: 0.75rem 1rem; }
}

/* ===== SVS-2: tendencias (HCVitals) ===== */
/* Cards y filas activables (clic → tendencia) */
.med-card-btn { cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.med-card-btn:hover, .med-card-btn:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.14);
  outline: none;
}
.med-card-btn:focus-visible { outline: 2px solid rgba(0,119,182,0.45); outline-offset: 1px; }

/* Chips de rango del panel (7d/30d/90d/6m) — pill, aria-pressed, ≥44px */
.vc-range-chip {
  border-radius: var(--radius-pill); border: 1.5px solid rgba(0,119,182,0.25);
  color: var(--color-gray-700); font-weight: 600; font-size: 0.9rem;
  padding: 0.4rem 1rem; background: #fff;
}
.vc-range-chip:hover { border-color: var(--color-primary); }
.vc-range-chip.active, .vc-range-chip[aria-pressed="true"] {
  background: var(--color-primary); border-color: var(--color-primary); color: #fff;
}

/* Contenedor del canvas: altura fija, ancho fluido */
.vc-canvas-wrap { position: relative; height: 260px; }
@media (min-width: 768px) { .vc-canvas-wrap { height: 320px; } }

/* Leyenda y stats */
.vc-leyenda span { margin-right: 0.75rem; white-space: nowrap; }
.vc-band-swatch {
  display: inline-block; width: 1.1rem; height: 0.7rem; vertical-align: -1px;
  background: rgba(6, 214, 160, 0.25); border: 1px solid rgba(6, 214, 160, 0.4); border-radius: 2px;
}
.vc-band-swatch-dia {
  display: inline-block; width: 1.1rem; height: 0.7rem; vertical-align: -1px;
  background: rgba(0, 119, 182, 0.12); border: 1px solid rgba(0, 119, 182, 0.25); border-radius: 2px;
}
/* Stats: grid de pares — desktop label+valor en UNA línea; móvil apilados.
   Celda ≥210px para que "Promedio 129.87 mmHg" nunca parta (4 cols lo apretaba). */
.vc-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.35rem 1.1rem; margin: 0;
}
.vc-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 0.45rem; min-width: 0; }
.vc-stat dt { color: var(--color-gray-600); font-size: 0.82rem; flex-shrink: 0; }
.vc-stat dd { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--color-gray-800); text-align: right; white-space: nowrap; }
.vc-stat dd .vc-tend { white-space: nowrap; } /* flecha + palabra juntas (Tendencia → Estable en 1 línea) */
.vc-stats-seccion {
  font-size: 0.85rem; font-weight: 700; color: var(--color-primary-dark);
  margin: 0.85rem 0 0.3rem;
}
.vc-stats-seccion:first-child { margin-top: 0; }
/* Móvil estrecho: label arriba, valor debajo — sin partas de línea */
@media (max-width: 575.98px) {
  .vc-stats { grid-template-columns: repeat(2, 1fr); gap: 0.55rem 0.8rem; }
  .vc-stat { flex-direction: column; align-items: flex-start; gap: 0; }
  .vc-stat dd { text-align: left; font-size: 1.02rem; }
}

/* ===== Grupo Eliminación (SC-068-11): selector Bristol (radiogroup visual) =====
 * Tokens A2; zonas coherentes con los chips de severidad. Radios nativos =
 * flechas de teclado gratis; cada opción ≥44px. 1 col móvil / 2 col ≥768. */
.vc-bristol-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.vc-bristol { display: grid; grid-template-columns: 1fr; gap: 0.45rem; }
.vc-bristol-op {
  display: flex; align-items: center; gap: 0.65rem;
  min-height: 48px; padding: 0.5rem 0.7rem;
  border: 1.5px solid rgba(0, 119, 182, 0.18); border-radius: 12px;
  background: #FFFFFF; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.vc-bristol-op:hover { border-color: rgba(0, 119, 182, 0.45); background: var(--color-bg-subtle, #F7FBFE); }
.vc-bristol-op:focus-within { box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.25); }
.vc-bristol-op input[type="radio"] { width: 1.25rem; height: 1.25rem; flex-shrink: 0; accent-color: var(--color-primary); cursor: pointer; }
.vc-bristol-op:has(input:checked) { border-color: var(--color-primary); background: #EAF4FB; }
.vc-bristol-punto { width: 0.85rem; height: 0.85rem; border-radius: 50%; flex-shrink: 0; }
.vc-bz-verde .vc-bristol-punto { background: #2A9D8F; }
.vc-bz-ambar .vc-bristol-punto { background: #E9C46A; }
.vc-bz-rojo .vc-bristol-punto { background: #E76F51; }
.vc-bristol-num {
  flex-shrink: 0; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 700; font-size: 0.9rem; color: var(--color-primary-dark);
  background: rgba(0, 119, 182, 0.10);
}
.vc-bristol-txt { font-size: 0.9rem; line-height: 1.25; color: var(--color-gray-800); min-width: 0; }
@media (min-width: 768px) { .vc-bristol { grid-template-columns: repeat(2, 1fr); } }

/* ===== Ventana del día (SC-068-13): opciones del modal ===== */
.med-ventana-op {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 52px; padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(0, 119, 182, 0.18); border-radius: 12px;
  background: #FFFFFF; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.med-ventana-op:hover { border-color: rgba(0, 119, 182, 0.45); }
.med-ventana-op:focus-within { box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.25); }
.med-ventana-op input[type="radio"] { width: 1.25rem; height: 1.25rem; flex-shrink: 0; accent-color: var(--color-primary); cursor: pointer; }
.med-ventana-op:has(input:checked) { border-color: var(--color-primary); background: #EAF4FB; }
.med-ventana-op strong { color: var(--color-primary-dark); }

/* Sparkline en cards (SVG escala fluida) */
.vc-spark { display: block; width: 100%; height: 26px; margin: 2px 0; }

/* Tabla accesible del panel */
.vc-table th, .vc-table td { font-size: 0.88rem; vertical-align: middle; }
.vc-table caption { text-align: left; color: var(--color-gray-600); font-size: 0.85rem; padding-bottom: 0.4rem; }

/* Chips de último valor (ficha profesional) */
.vc-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1.5px solid rgba(0,119,182,0.18); border-radius: var(--radius-md);
  background: #fff; padding: 0.45rem 0.9rem; cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vc-chip:hover, .vc-chip:focus-visible { border-color: var(--color-primary); box-shadow: 0 2px 6px rgba(0,119,182,0.12); }

/* Mini-cards sparkline (ficha profesional) */
.vc-spark-card {
  background: #fff; border: 1.5px solid rgba(0,119,182,0.14); border-radius: var(--radius-md);
  padding: 0.5rem 0.7rem; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vc-spark-card:hover, .vc-spark-card:focus-visible { border-color: var(--color-primary); box-shadow: 0 2px 6px rgba(0,119,182,0.12); }

/* Panel de tendencia a pantalla completa en móvil (hoja) */
@media (max-width: 575.98px) {
  #vcChartModal .modal-dialog { margin: 0; max-width: 100%; }
  #vcChartModal .modal-content { max-height: 100dvh !important; height: 100dvh; border-radius: 0; }
  #vcChartModal .modal-body { flex-grow: 1; }
  .vc-canvas-wrap { height: 220px; }
}

/* ===== Mis pacientes (FE-5) ===== */
.mp-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 119, 182, 0.12);
  border-radius: var(--radius-md);
  background: #fff;
}
.mp-card:hover, .mp-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.12);
}
.mp-card:focus-visible {
  outline: 2px solid rgba(0, 119, 182, 0.45);
  outline-offset: 2px;
}
.mp-activa {
  border-left: 4px solid var(--color-primary);
  background: rgba(234, 246, 252, 0.5);
}

/* Campana de notificaciones (FE-7): ghost como el selector de idioma */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  color: var(--color-gray-600);
  border-radius: 8px;
  font-size: 1.05rem;
  text-decoration: none;
}
.notif-bell:hover,
.notif-bell:focus-visible {
  background: rgba(2, 48, 71, 0.07);
  color: var(--color-primary-dark);
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Toggle de menú: ghost discreto — mismo lenguaje visual que el selector de
 * idioma (sin borde, sin relleno, gris del texto; fondo suave al hover).
 * Sin clases .btn de Bootstrap: es un control de layout, no una acción. */
.portal-menu-btn {
  border: none;
  background: transparent;
  color: var(--color-gray-600);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 0.5rem;
}
.portal-menu-btn:hover,
.portal-menu-btn:focus-visible {
  background: rgba(2, 48, 71, 0.07);
  color: var(--color-primary-dark);
}
.portal-menu-btn:focus-visible { outline: 2px solid rgba(0, 119, 182, 0.45); outline-offset: 1px; }

/* ===== Ocultar menú en escritorio (2026-09-28) =====
 * El ☰ del header también visible >1024 como toggle del sidebar; la
 * preferencia persiste (hc_sidebar_hidden). ≤1024 mantiene el drawer. */
@media (min-width: 1025px) {
  .portal-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  body.portal-sidebar-hidden .portal-sidebar { display: none; }
}

/* Marca única por breakpoint: en desktop vive en el sidebar (arriba del
 * menú); el header la muestra solo ≤1024, donde el sidebar no es visible.
 * !important: el logo usa .d-flex de Bootstrap (display:flex !important). */
@media (min-width: 1025px) {
  .app-header-hc .logo { display: none !important; }
}

/* ===== Hoy: tarjetas de indicadores ===== */
.prof-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
/* 5 KPIs en una sola fila en desktop amplio (evita la tarjeta huérfana) */
@media (min-width: 1200px) {
  .prof-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.prof-stat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.prof-stat-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  border-radius: var(--radius-md);
  background: rgba(0, 119, 182, 0.10);
  color: var(--color-primary);
}
.prof-stat-icon.is-danger { background: rgba(239, 71, 111, 0.12); color: #B02348; }
.prof-stat-icon.is-warn   { background: rgba(255, 209, 102, 0.25); color: #8A6100; }
.prof-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--color-primary-dark); line-height: 1.1; }
.prof-stat-label { font-size: 0.85rem; color: var(--color-gray-600); }

/* Accesos rápidos (Hoy) */
.prof-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}
.prof-quick a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-height: var(--target-min);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--color-primary-dark);
  font-weight: 600;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(0, 119, 182, 0.14);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.prof-quick a:hover, .prof-quick a:focus-visible {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.prof-quick .bi { font-size: 1.25rem; color: var(--color-primary); }

/* ===== Agenda: fila con hora destacada ===== */
.agenda-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid rgba(0, 119, 182, 0.12);
  border-left: 4px solid var(--color-primary);
}
.agenda-item.is-cancelada   { border-left-color: #EF476F; opacity: 0.75; }
.agenda-item.is-completada  { border-left-color: var(--color-primary-dark); }
.agenda-item.is-no_asistio  { border-left-color: #FFD166; }
.agenda-hora {
  flex: 0 0 auto;
  min-width: 74px;
  text-align: center;
  font-weight: 800;
  color: var(--color-primary-dark);
  font-size: 1.02rem;
  line-height: 1.2;
  align-self: flex-start;
  padding-top: 0.15rem;
}
/* Desktop: hora, cuerpo y acciones centrados verticalmente como bloques */
@media (min-width: 769px) {
  .agenda-item { align-items: center; }
  .agenda-hora { align-self: center; padding-top: 0; }
}
.agenda-hora small { display: block; font-weight: 600; color: var(--color-gray-500); font-size: 0.75rem; }
.agenda-body { flex: 1 1 auto; min-width: 0; }
.agenda-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  align-self: center;
}

/* Navegación por días (agenda) */
.day-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}
.day-pill {
  flex: 0 0 auto;
  min-height: var(--target-min);
  min-width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 119, 182, 0.18);
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 600;
  text-align: center;
}
.day-pill .day-num { font-size: 1.08rem; font-weight: 800; display: block; }
.day-pill small { color: var(--color-gray-500); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.day-pill.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.day-pill.is-active small { color: rgba(255, 255, 255, 0.85); }
/* Scrollbar discreta en el strip de días */
.day-strip::-webkit-scrollbar { height: 6px; }
.day-strip::-webkit-scrollbar-thumb { background: rgba(0, 119, 182, 0.25); border-radius: 999px; }
.day-strip::-webkit-scrollbar-track { background: transparent; }
.day-pill.is-today { box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.25); }

/* ===== Tablas compactas (pacientes, órdenes) ===== */
.table-hc-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 119, 182, 0.12);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
/* Desktop: la tabla llena el contenedor SIN scroll (los botones de acción
 * van solo-icono). El min-width para scroll horizontal se aplica solo en móvil. */
.table-hc { width: 100%; margin: 0; border-collapse: collapse; table-layout: auto; }
.table-hc thead th {
  position: sticky; top: 0;
  background: #EAF6FC;
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.9rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 119, 182, 0.15);
}
.table-hc tbody td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(2, 48, 71, 0.06);
  color: var(--color-gray-800);
  vertical-align: middle;
}
.table-hc tbody tr:last-child td { border-bottom: none; }
.table-hc tbody tr:hover td { background: rgba(234, 246, 252, 0.6); }

/* ===== Mensajería clínica ===== */
.msg-thread { display: flex; flex-direction: column; gap: var(--space-3); }
.msg-bubble {
  max-width: min(78%, 640px);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid rgba(0, 119, 182, 0.12);
}
.msg-bubble.is-mine {
  align-self: flex-end;
  background: rgba(234, 246, 252, 0.9);
  border-color: rgba(0, 119, 182, 0.2);
}
.msg-meta { font-size: 0.78rem; color: var(--color-gray-500); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ===== Ficha de paciente ===== */
.ficha-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.ficha-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 119, 182, 0.12);
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 800;
}

/* ===== Tabs FE-4 tipo segmento (scoped: no afecta .nav-tab-hc de FE-3) ===== */
.prof-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  background: rgba(0, 119, 182, 0.08);
  border-radius: var(--radius-pill);
  padding: 4px;
  width: fit-content;
  max-width: 100%;
}
.prof-tabs .nav-tab-hc {
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #46617A;
  font-weight: 600;
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  line-height: 1.2;
  box-shadow: none;
}
.prof-tabs .nav-tab-hc:hover { background: rgba(255, 255, 255, 0.6); color: var(--color-primary-dark); }
.prof-tabs .nav-tab-hc.is-active-tab {
  background: #fff;
  color: var(--color-primary-dark);
  border-bottom: 0;
  box-shadow: 0 2px 8px rgba(2, 48, 71, 0.14);
}
@media (max-width: 768px) {
  .prof-tabs { width: 100%; }
  .prof-tabs .nav-tab-hc { flex: 1 1 auto; padding: 0.45rem 0.8rem; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .prof-stat { padding: var(--space-3); }
  .prof-stat-icon { width: 46px; height: 46px; font-size: 1.25rem; }
  .agenda-item { flex-direction: column; gap: 0.5rem; padding: var(--space-3); }
  .agenda-hora { min-width: 0; text-align: left; display: flex; align-items: baseline; gap: 0.5rem; }
  .msg-bubble { max-width: 92%; }
  .table-hc { min-width: 560px; }
}
/* Acciones de tabla: consistencia visual con Agenda (primaria con texto + menú ⋮) */
.table-hc .btn-sm { white-space: nowrap; }
@media (max-width: 480px) {
  .prof-stats { grid-template-columns: repeat(2, 1fr); }
  .prof-quick { grid-template-columns: repeat(2, 1fr); }
  .prof-stat-label { font-size: 0.78rem; }
}
