/* =========================================================
   RIS — hoja de estilos
   Paleta: navy clínico + papel de ECG
   ========================================================= */
@font-face { font-family: "Plex"; src: url(vendor/fonts/plex-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(vendor/fonts/plex-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url(vendor/fonts/plex-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url(vendor/fonts/plex-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #12304F;
  --navy-2: #1B4168;
  --navy-texto: #A9BCCD;
  --fondo: #F3F6F8;
  --superficie: #FFFFFF;
  --tinta: #1A2836;
  --tinta-2: #5B6B7A;
  --linea: #DFE5EA;
  --azul: #2563A8;
  --azul-hover: #1D5290;
  --ecg: #F28B95;
  --ecg-grid: rgba(242, 139, 149, .16);

  /* Estados del flujo (iguales en todo el sistema) */
  --pendiente: #B7791F;   --pendiente-bg: #FDF4E3;
  --proceso: #2563A8;     --proceso-bg: #E8F0FA;
  --listo: #23855A;       --listo-bg: #E4F4EC;
  --entregado: #5E6F80;   --entregado-bg: #EDF1F4;

  --lateral: #175BA2;   /* azul del menú lateral */
  --radio: 10px;
  --sombra: 0 1px 2px rgba(19, 43, 64, .06), 0 1px 1px rgba(19, 43, 64, .04);

  --bs-body-font-family: "Plex", "Segoe UI", system-ui, sans-serif;
  --bs-body-color: var(--tinta);
  --bs-body-bg: var(--fondo);
  --bs-border-color: var(--linea);
  --bs-link-color: var(--azul);
  --bs-link-color-rgb: 37, 99, 168;
  --bs-link-hover-color: var(--azul-hover);
  --bs-primary: var(--azul);
  --bs-primary-rgb: 37, 99, 168;
  --bs-border-radius: 8px;
}

body { font-size: .9375rem; font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -.01em; color: var(--tinta); }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn { font-weight: 500; border-radius: 8px; }
.btn-primary { --bs-btn-bg: var(--azul); --bs-btn-border-color: var(--azul); --bs-btn-hover-bg: var(--azul-hover); --bs-btn-hover-border-color: var(--azul-hover); --bs-btn-active-bg: var(--azul-hover); --bs-btn-disabled-bg: var(--azul); }
.btn-success { --bs-btn-bg: var(--listo); --bs-btn-border-color: var(--listo); --bs-btn-hover-bg: #1C6E4A; --bs-btn-hover-border-color: #1C6E4A; }
.btn-dark { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-2); }
.btn-outline-secondary { --bs-btn-color: var(--tinta-2); --bs-btn-border-color: var(--linea); --bs-btn-hover-bg: var(--fondo); --bs-btn-hover-color: var(--tinta); --bs-btn-hover-border-color: #C9D3DB; background: #fff; }
.btn-danger { --bs-btn-bg: #fff; --bs-btn-color: #B42318; --bs-btn-border-color: var(--linea); --bs-btn-hover-bg: #FEF3F2; --bs-btn-hover-color: #B42318; --bs-btn-hover-border-color: #F4C7C3; }

/* ---------- Estructura con menú lateral ---------- */
.con-menu { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex-shrink: 0; background: var(--lateral); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 1040;
}
/* Logo Telhealth: corazón y letras blancas sobre azul */
.marca { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.2rem; color: #fff; background: var(--lateral); border-bottom: 1px solid rgba(255,255,255,.14); }
.marca:hover { color: #fff; }
.logo-corazon { width: 46px; height: 35px; flex-shrink: 0; }
.marca-texto { font-family: Georgia, Cambria, "Times New Roman", serif; font-weight: 700; font-size: 1.35rem; line-height: 1.05; letter-spacing: .01em; }
.marca-texto small { display: block; font-family: "Plex", system-ui, sans-serif; font-weight: 400; color: #CFE0F3; font-size: .75rem; letter-spacing: 0; margin-top: .2rem; }
.marca-grande { background: none; padding: 0; }
.marca-grande .logo-corazon { width: 64px; height: 48px; }
.marca-grande .marca-texto { font-size: 1.9rem; }
.menu { flex: 1; overflow-y: auto; padding: .75rem .75rem; }
.menu-grupo { font-size: .75rem; color: #C9DCF1; padding: 1.1rem .75rem .35rem; }
.menu-item {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 8px;
  color: #C9D6E1; font-size: .9rem; margin-bottom: 1px;
}
.menu-item i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #D6E6F7; }
.menu-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.menu-item.active { background: rgba(255,255,255,.2); color: #fff; box-shadow: inset 3px 0 0 #fff; font-weight: 500; }
.menu-item.active i { color: #fff; }
.contador { margin-left: auto; font-size: .75rem; font-weight: 600; min-width: 1.6rem; text-align: center; padding: .1rem .45rem; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; }
.contador.c-pendiente { background: #E9B44C; color: #3B2A06; }
.contador.c-en_proceso { background: #fff; color: var(--lateral); }
.contador.c-listo_entrega { background: #5CC093; color: #08301E; }

.perfil { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.14); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 600; flex-shrink: 0; border: 1px solid rgba(255,255,255,.15); }
.perfil-datos { flex: 1; min-width: 0; line-height: 1.2; }
.perfil-datos b { display: block; color: #fff; font-weight: 500; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perfil-datos small { color: #C9DCF1; font-size: .75rem; }
.perfil-btn { color: #D6E6F7; padding: .3rem .4rem; border-radius: 6px; }
.perfil-btn:hover { color: #fff; background: rgba(255,255,255,.14); }

.contenido { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem; padding: .8rem 2rem; background: var(--superficie);
  border-bottom: 1px solid var(--linea); position: sticky; top: 0; z-index: 1020;
}
.btn-menu { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--linea); border-radius: 8px; background: #fff; font-size: 1.35rem; color: var(--tinta); padding: 0; flex-shrink: 0; }
.btn-menu:hover { background: var(--fondo); }
/* Menú lateral escondido (escritorio) */
html.menu-oculto .sidebar { display: none; }
.migas { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--tinta-2); flex-wrap: wrap; }
.migas a { color: var(--tinta-2); }
.migas a:hover { color: var(--azul); }
.migas span { color: var(--tinta); font-weight: 500; }
.migas .bi { font-size: .7rem; color: #A5B3BF; }
.buscador { margin-left: auto; position: relative; width: min(340px, 40vw); }
.buscador i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #8A99A6; }
.buscador input { width: 100%; border: 1px solid var(--linea); background: var(--fondo); border-radius: 8px; padding: .5rem .8rem .5rem 2.2rem; font-size: .875rem; }
.buscador input:focus { outline: none; border-color: var(--azul); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,168,.12); }

.pagina { padding: 1.75rem 2rem 3rem; max-width: 1600px; width: 100%; }
.sidebar-fondo { display: none; }

/* ---------- Encabezado de página ---------- */
.pagina > .d-flex:first-of-type h4, .pagina > h4 { font-size: 1.4rem; }
.cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.cabecera h1 { font-size: 1.6rem; margin: 0; }
.cabecera p { color: var(--tinta-2); margin: .25rem 0 0; }

/* ---------- Avisos ---------- */
.aviso { display: flex; align-items: center; gap: .6rem; border-radius: var(--radio); border: 1px solid transparent; padding: .75rem 2.75rem .75rem 1rem; }
.alert-success { background: var(--listo-bg); color: #155C3C; border-color: #BFE3CF; }
.alert-danger { background: #FEF3F2; color: #912018; border-color: #F4C7C3; }
.alert-warning { background: var(--pendiente-bg); color: #7A4F0E; border-color: #F1D9A8; }
.alert-info { background: var(--proceso-bg); color: #1D4E86; border-color: #C3D7EF; }

/* ---------- Superficies ---------- */
.card { border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
.card-header { background: #fff; border-bottom: 1px solid var(--linea); padding: .85rem 1.1rem; font-weight: 600; }
.card-header:first-child { border-radius: var(--radio) var(--radio) 0 0; }
.card-footer { background: #FAFBFC; border-top: 1px solid var(--linea); }
.card-body { padding: 1.1rem; }

/* ---------- Tablas ---------- */
.table-responsive { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
.table { margin: 0; --bs-table-hover-bg: #F7F9FB; font-size: .9rem; }
.table > thead th, .table-light th { background: #F8FAFB !important; color: var(--tinta-2); font-weight: 500; font-size: .8rem; border-bottom: 1px solid var(--linea); padding: .7rem .9rem; white-space: nowrap; }
.table > tbody td { padding: .7rem .9rem; border-color: #EDF1F4; }
.table > tbody tr:last-child td { border-bottom: 0; }
.card .table { font-size: .875rem; }
.card .table td { padding: .55rem 1.1rem; }

/* ---------- Estado de una OT ---------- */
.estado { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 500; padding: .2rem .6rem .2rem .5rem; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.e-pendiente { color: var(--pendiente); background: var(--pendiente-bg); }
.e-en_proceso { color: var(--proceso); background: var(--proceso-bg); }
.e-listo_entrega { color: var(--listo); background: var(--listo-bg); }
.e-entregado { color: var(--entregado); background: var(--entregado-bg); }

/* ---------- Pestañas del flujo (lista de OTs) ---------- */
.nav-tabs { border-bottom: 1px solid var(--linea); gap: .25rem; }
.nav-tabs .nav-link { border: 0; color: var(--tinta-2); font-weight: 500; padding: .6rem .9rem; border-bottom: 2px solid transparent; border-radius: 0; }
.nav-tabs .nav-link:hover { color: var(--tinta); border-bottom-color: var(--linea); }
.nav-tabs .nav-link.active { color: var(--azul); background: none; border-bottom-color: var(--azul); }

/* ---------- Formularios ---------- */
.form-control, .form-select { border-color: #D3DBE2; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37,99,168,.12); }
.form-label, .col-form-label { font-weight: 500; font-size: .875rem; color: #34495C; }
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(19,43,64,.22); }
.modal-header { border-bottom: 1px solid var(--linea); padding: 1.1rem 1.4rem; }
.modal-title { font-size: 1.15rem; }
.modal-body { padding: 1.25rem 1.4rem; }
.modal-footer { border-top: 1px solid var(--linea); background: #FAFBFC; border-radius: 0 0 14px 14px; }

/* =========================================================
   Dashboard
   ========================================================= */
.saludo h1 { font-size: 1.65rem; margin: 0; }
.saludo p { color: var(--tinta-2); margin: .3rem 0 0; }

/* El flujo como una sola franja conectada */
.flujo { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--superficie); border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra); overflow: hidden; margin: 1.5rem 0 1.75rem; }
.etapa { position: relative; display: block; padding: 1.35rem 1.5rem 1.25rem 1.6rem; color: var(--tinta); border-right: 1px solid var(--linea); }
.etapa:last-child { border-right: 0; }
.etapa:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; background: var(--superficie);
  border-top: 1px solid var(--linea); border-right: 1px solid var(--linea); transform: translateY(-50%) rotate(45deg); z-index: 2;
}
.etapa::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.etapa:hover { background: #FAFBFC; color: var(--tinta); }
.etapa:hover:not(:last-child)::after { background: #FAFBFC; }
.etapa-paso { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--tinta-2); }
.etapa-paso b { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1.05rem; background: var(--cbg); color: var(--c); }
.etapa-num { font-size: 2.6rem; font-weight: 600; line-height: 1; margin: .7rem 0 .35rem; letter-spacing: -.02em; }
.etapa-nombre { font-weight: 600; }
.etapa-desc { font-size: .825rem; color: var(--tinta-2); margin-top: .15rem; }
.etapa-extra { margin-top: .6rem; font-size: .8rem; font-weight: 500; color: var(--c); }
.etapa.p { --c: var(--pendiente); --cbg: var(--pendiente-bg); }
.etapa.e { --c: var(--proceso); --cbg: var(--proceso-bg); }
.etapa.l { --c: var(--listo); --cbg: var(--listo-bg); }
.etapa.d { --c: var(--entregado); --cbg: var(--entregado-bg); }

.panel-titulo { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--linea); }
.panel-titulo h2 { font-size: 1rem; margin: 0; }
.panel-titulo a { font-size: .85rem; font-weight: 500; }
.cola td { padding: .75rem 1.1rem !important; }
.cola .pac { font-weight: 500; }
.cola .sub { font-size: .8rem; color: var(--tinta-2); }
.espera { font-size: .8rem; color: var(--tinta-2); white-space: nowrap; }
.espera.tarde { color: #B42318; font-weight: 500; }
.vacio { text-align: center; padding: 2.5rem 1rem; color: var(--tinta-2); }
.vacio i { font-size: 2rem; color: #B5C2CD; display: block; margin-bottom: .5rem; }

.actividad { list-style: none; margin: 0; padding: .4rem 0; }
.actividad li { display: flex; gap: .75rem; padding: .6rem 1.1rem; font-size: .85rem; }
.actividad .punto { width: 8px; height: 8px; border-radius: 50%; background: #C3CED8; margin-top: .4rem; flex-shrink: 0; }
.actividad .quien { font-weight: 500; }
.actividad .cuando { color: var(--tinta-2); font-size: .78rem; }

.cifras { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--linea); }
.cifra { padding: 1rem 1.1rem; }
.cifra + .cifra { border-left: 1px solid var(--linea); }
.cifra b { display: block; font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.cifra span { font-size: .8rem; color: var(--tinta-2); }

/* =========================================================
   Pantalla de una OT
   ========================================================= */
.visor-pdf { width: 100%; height: 78vh; border: 1px solid var(--linea); border-radius: var(--radio); background: #525659; display: block; }
.visor-vacio { border: 2px dashed #CBD5DE; border-radius: var(--radio); padding: 4rem 1rem; text-align: center; background: #fff; color: var(--tinta-2); }
.dato-label { color: var(--tinta-2); font-size: .78rem; }
textarea.informe { min-height: 280px; line-height: 1.55; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "\F282"; font-family: bootstrap-icons; float: right; transition: transform .2s; }
details.card[open] > summary::after { transform: rotate(180deg); }
.list-group-item { border-color: #EDF1F4; }

/* =========================================================
   Ingreso (login): el único lugar con el papel de ECG
   ========================================================= */
.sin-menu { background: var(--superficie); }
.ingreso { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.ingreso-arte {
  position: relative; overflow: hidden; background-color: var(--navy); color: #fff; padding: 3rem;
  display: flex; flex-direction: column; justify-content: space-between;
  background-image:
    linear-gradient(var(--ecg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ecg-grid) 1px, transparent 1px),
    linear-gradient(rgba(242,139,149,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(242,139,149,.06) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
}
.ingreso-arte .marca { padding: 0; border: 0; }
.trazo { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); width: 100%; height: 220px; }
.trazo path { fill: none; stroke: var(--ecg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: dibujar 2.6s ease-out .3s forwards; filter: drop-shadow(0 0 6px rgba(242,139,149,.5)); }
@keyframes dibujar { to { stroke-dashoffset: 0; } }
.ingreso-lema { position: relative; max-width: 28rem; }
.ingreso-lema h2 { color: #fff; font-size: 1.9rem; line-height: 1.2; margin-bottom: .6rem; }
.ingreso-lema p { color: var(--navy-texto); margin: 0; }
.ingreso-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.ingreso-form form { width: 100%; max-width: 360px; }
.ingreso-form h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.ingreso-form .form-control { padding: .65rem .85rem; }
.ingreso-form .btn { padding: .65rem; }

/* ---------- Impresión / movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .trazo path { animation: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}

/* ---------- Pantallas chicas ---------- */
@media (max-width: 1199px) {
  .flujo { grid-template-columns: repeat(2, 1fr); }
  .etapa:nth-child(2) { border-right: 0; }
  .etapa:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
  .etapa:nth-child(2)::after { display: none; }
}
@media (max-width: 991px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; }
  .menu-abierto .sidebar { box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .menu-abierto .sidebar { transform: none; }
  .menu-abierto .sidebar-fondo { display: block; position: fixed; inset: 0; background: rgba(19,43,64,.4); z-index: 1030; }
  html.menu-oculto .sidebar { display: flex; }
  .topbar { padding: .7rem 1rem; }
  .pagina { padding: 1.25rem 1rem 2rem; }
  .ingreso { grid-template-columns: 1fr; }
  .ingreso-arte { min-height: 220px; padding: 1.75rem; }
  .ingreso-lema { display: none; }
}
@media (max-width: 575px) {
  .flujo { grid-template-columns: 1fr; }
  .etapa { border-right: 0 !important; border-bottom: 1px solid var(--linea); }
  .etapa::after { display: none; }
  .buscador { display: none; }
}

/* =========================================================
   Inicio del médico — diseño "Línea de flujo"
   ========================================================= */
.im { display: flex; flex-direction: column; gap: 28px; }
.im-cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.im-cabecera p { margin: 0 0 6px; color: var(--tinta-2); }
.im-cabecera h1 { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.im-siguiente { font-size: 1rem; padding: .75rem 1.4rem; border-radius: 10px; }

.im-flujo { background: var(--superficie); border: 1px solid var(--linea); border-radius: 16px; padding: 32px 36px 28px; }
.im-flujo-grilla { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.im-linea { position: absolute; left: 12.5%; right: 12.5%; top: 31px; height: 2px; background: #D5DEE8; }
.im-etapa { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--tinta); border-radius: 12px; padding: 0 4px 4px; }
.im-etapa:hover { color: var(--tinta); }
.im-etapa:hover .im-circulo { transform: scale(1.05); }
.im-circulo { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; border: 2px solid; transition: transform .15s; }
.im-nombre { font-weight: 600; font-size: 1rem; }
.im-desc { font-size: .82rem; color: var(--tinta-2); }
.im-p .im-circulo { background: #FFF4E0; border-color: #E9B44C; color: #8A5400; }
.im-e .im-circulo { background: #EAF1FA; border-color: #7FA9D9; color: #1E63B0; }
.im-l .im-circulo { background: #E6F4EC; border-color: #5CB88A; color: #17673F; }
.im-d .im-circulo { background: #EEF1F5; border-color: #AEBBC9; color: #4A5D72; }
.im-suya .im-circulo { background: #1E63B0; border-color: #1E63B0; color: #fff; box-shadow: 0 0 0 6px #DCE8F6; }
.im-suya .im-nombre, .im-suya .im-desc { color: #1E63B0; font-weight: 600; }

.im-cuerpo { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.im-panel { background: var(--superficie); border: 1px solid var(--linea); border-radius: 16px; }
.im-cola { flex: 999 1 600px; min-width: 0; overflow: hidden; }
.im-lateral { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.im-panel-titulo { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--linea); }
.im-panel-titulo h2, .im-hoy h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.im-panel-titulo a { font-size: .9rem; font-weight: 600; }

.im-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 15px 24px; border-bottom: 1px solid #EEF2F6; }
.im-fila:last-child { border-bottom: 0; }
.im-fila:hover { background: #FAFBFD; }
.im-pill { font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #1E63B0; background: #EAF1FA; white-space: nowrap; min-width: 92px; text-align: center; }
.im-pill-urgente { color: #fff; background: #B42318; }
.im-paciente { flex: 1 1 220px; min-width: 0; }
.im-pac-nombre { font-weight: 600; }
.im-pac-sub { font-size: .82rem; color: var(--tinta-2); }
.im-borrador { color: #8A5400; }
.im-espera { font-size: .82rem; color: var(--tinta-2); min-width: 90px; }
.im-tarde { color: #B42318; font-weight: 600; }
.im-fila .btn { min-width: 104px; }

.im-hoy { padding: 20px 24px; }
.im-cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.im-cifras b { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.im-cifras span { font-size: .82rem; color: var(--tinta-2); }
.im-actividad { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: .88rem; }
.im-actividad b { font-weight: 600; }
.im-cuando { display: block; font-size: .76rem; color: var(--tinta-2); margin-top: 2px; }

@media (max-width: 767px) {
  .im-flujo { padding: 24px 16px; }
  .im-flujo-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .im-linea { display: none; }
  .im-cabecera h1 { font-size: 1.5rem; }
}

/* Nota del técnico para el médico */
.nota-medico { border-color: #F1D9A8; }
.nota-medico .card-header { background: #FFF8EC; color: #7A4F0E; border-bottom-color: #F1D9A8; }
.nota-lectura .card-body { background: #FFFCF5; font-size: .95rem; white-space: normal; border-radius: 0 0 var(--radio) var(--radio); }
.nota-rapidas { display: flex; flex-wrap: wrap; gap: 6px; }
.nota-rapidas .btn { font-size: .78rem; padding: .2rem .55rem; border-radius: 99px; }
.im-nota { color: #7A4F0E; font-weight: 500; }

/* Subir exámenes */
.subir-form { max-width: 760px; }
.subir-form .col-form-label { font-weight: 600; }
.zona-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 16px; border: 2px dashed #B9C8D8; border-radius: 10px; background: #F8FAFC; color: var(--tinta-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.zona-pdf i { font-size: 1.9rem; color: var(--azul); }
.zona-pdf b { color: var(--azul); }
.zona-pdf small { font-size: .78rem; }
.zona-pdf:hover, .zona-pdf.arrastrando { border-color: var(--azul); background: #EEF4FB; }
.zona-pdf.con-archivo { border-style: solid; border-color: #5CB88A; background: #EEF8F2; }
.zona-pdf.con-archivo i { color: #1B7F4E; }
#pdf:focus-visible + .zona-pdf, .zona-pdf:focus-within { outline: 2px solid var(--azul); outline-offset: 2px; }
.menu-destacado { margin-top: 6px; background: rgba(255,255,255,.1); }
