/* La PWA del equipo (P0c, docs/pwa_tareas_diseno.md §7.6): la segunda maqueta, aprobada por el CEO el 2026-11-27.
   Una columna, cabecera del color del modo y barra inferior. Lo urgente va en rojo y ámbar, aparte del flujo. */
:root {
  --eq-noche: #1D1C47;      /* cabecera: el índigo profundo de la marca */
  --eq-fondo: #F1F1F7;
  --eq-fondo-dir: #F6F3EA;
  --eq-tinta: #17163A;
  --eq-tinta-2: #5B5A7A;
  --eq-suave: #C9C8EE;
  --eq-clinica: #5FD4C6;  --eq-clinica-ink: #0B2E2B;
  --eq-direccion: #F2D479; --eq-direccion-ink: #1D1C47;
  --eq-vencida: #B3261E;  --eq-vencida-bg: #FBE3E1; --eq-vencida-ink: #A1221B;
  --eq-hoy-bg: #FDF0D5;   --eq-hoy-ink: #7A4D06;
  --eq-hecho: #2E8B57;
  --eq-linea: #E2E2EC;
}
html, body { margin: 0; }
.eq *, .eq *::before, .eq *::after { box-sizing: border-box; }
.eq { background: var(--eq-fondo); color: var(--eq-tinta); font-family: var(--font-ui);
  min-height: 100vh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.eq[data-modo="direccion"] { background: var(--eq-fondo-dir); }
.eq-sprite { position: absolute; width: 0; height: 0; }
.eq-i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; flex: none; }
.eq-i--grande { width: 26px; height: 26px; }
.eq-i--peq { width: 16px; height: 16px; }
.eq-app { max-width: 560px; margin: 0 auto; }

/* Cabecera */
.eq-cab { background: var(--eq-noche); color: #FFFFFF; padding: 18px 16px 16px; display: flex; flex-direction: column;
  gap: 14px; }
.eq[data-modo="direccion"] .eq-cab { border-bottom: 4px solid var(--eq-direccion); }
.eq-cab__fila { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eq-cab h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.eq-cab__quien { font-size: 13px; color: var(--eq-suave); }
.eq-icono-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; border: 0; background: rgb(255 255 255 / .1); color: #FFFFFF; cursor: pointer; }
.eq-icono-btn[aria-pressed="true"] { background: rgb(255 255 255 / .24); }
.eq-modos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px;
  border-radius: 16px; background: rgb(255 255 255 / .08); }
.eq-modo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0;
  border-radius: 12px; font: inherit; font-weight: 700; font-size: 14px; background: transparent; color: #D9D8F5;
  cursor: pointer; }
.eq-modo--clinica[aria-pressed="true"] { background: var(--eq-clinica); color: var(--eq-clinica-ink); }
.eq-modo--direccion[aria-pressed="true"] { background: var(--eq-direccion); color: var(--eq-direccion-ink); }
.eq-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 800; box-sizing: border-box;
  background: rgb(255 255 255 / .16); color: #FFFFFF; }
.eq-modo--clinica[aria-pressed="true"] .eq-num { background: var(--eq-clinica-ink); color: var(--eq-clinica); }
.eq-modo--direccion[aria-pressed="true"] .eq-num { background: var(--eq-noche); color: var(--eq-direccion); }
.eq-cuentas { display: flex; gap: 8px; }
.eq-cuenta { flex: 1; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px;
  background: rgb(255 255 255 / .1); }
.eq-cuenta strong { font-size: 20px; font-weight: 800; }
.eq-cuenta span { font-size: 12px; color: #D9D8F5; }
.eq-cuenta--vencidas { background: var(--eq-vencida); }
.eq-cuenta--vencidas span { color: #FFFFFF; }

/* Contenido */
.eq-main { padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.eq-titulo { margin: 8px 4px 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--eq-tinta-2); }
.eq[data-modo="direccion"] .eq-titulo { color: #6E5300; }
.eq-aviso { background: #FFFFFF; border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; }
.eq-aviso--mal { background: var(--eq-vencida-bg); color: var(--eq-vencida-ink); }
.eq-vacio { margin: 24px 8px; text-align: center; color: var(--eq-tinta-2); font-size: 15px; }

/* Tarjeta de tarea */
.eq-tarjeta { background: #FFFFFF; border-radius: 18px; padding: 14px; display: grid;
  grid-template-columns: 48px minmax(0, 1fr); gap: 12px; box-shadow: 0 1px 2px rgb(23 22 58 / .06);
  color: inherit; text-decoration: none; border: 0; text-align: left; font: inherit; width: 100%; cursor: pointer; }
.eq-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.eq-cuerpo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eq-cuerpo__fila { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.eq-cuerpo strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.eq-quien { font-size: 13px; color: var(--eq-tinta-2); }
.eq-inst { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #4A4970; background: #ECECF5;
  border-radius: 6px; padding: 2px 6px; text-transform: uppercase; }
.eq-plazo { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: #ECECF5; color: #3A3960; }
.eq-plazo--vencida { background: var(--eq-vencida-bg); color: var(--eq-vencida-ink); }
.eq-plazo--hoy { background: var(--eq-hoy-bg); color: var(--eq-hoy-ink); }
.eq-pasos { display: flex; gap: 4px; }
.eq-paso { height: 5px; flex: 1; border-radius: 3px; background: var(--eq-linea); }
.eq-paso--hecho { background: var(--eq-hecho); }
.eq-paso--ahora { background: currentColor; }
.eq-linea { font-size: 12px; color: var(--eq-tinta-2); }
.eq-acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.eq-accion { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px;
  border: 0; background: var(--eq-noche); color: #FFFFFF; font: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer; }
.eq-accion--suave { background: #ECECF5; color: var(--eq-noche); }
.eq-accion:disabled { opacity: .5; cursor: default; }

/* Colores por flujo (la maqueta, «Los iconos») */
.eq-f-implantes { background: #E7E3FF; color: #4B3FC4; }
.eq-f-ortodoncia { background: #FCE2EE; color: #A1275B; }
.eq-f-laboratorio, .eq-f-material { background: #FFE9D6; color: #A4510B; }
.eq-f-derivaciones { background: #DCEBFF; color: #1F5FA8; }
.eq-f-documentos { background: #E3F0E9; color: #1F6B45; }
.eq-f-encargos, .eq-f-otros { background: #ECECF5; color: #3A3960; }
.eq-f-aprobaciones, .eq-f-firmas, .eq-f-garantias { background: #FBF1CC; color: #6E5300; }

/* Modo compacto: una línea por tarea, se lee por el icono */
.eq[data-compacto="si"] .eq-tarjeta { grid-template-columns: 32px minmax(0, 1fr); padding: 8px 12px; border-radius: 12px;
  gap: 10px; align-items: center; }
.eq[data-compacto="si"] .eq-ico { width: 32px; height: 32px; border-radius: 10px; }
.eq[data-compacto="si"] .eq-quien, .eq[data-compacto="si"] .eq-pasos, .eq[data-compacto="si"] .eq-linea,
.eq[data-compacto="si"] .eq-acciones { display: none; }
.eq[data-compacto="si"] .eq-cuerpo strong { font-size: 14px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }

/* Detalle: la tarea dentro de su flujo */
.eq-volver { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; font-weight: 600;
  color: #D9D8F5; background: none; border: 0; font-family: inherit; cursor: pointer; padding: 0; }
.eq-det { display: flex; gap: 12px; align-items: center; }
.eq-det .eq-ico { width: 52px; height: 52px; border-radius: 16px; }
.eq-det__flujo { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #B9B8F0; }
.eq-det h1 { font-size: 21px; line-height: 1.2; }
.eq-bloque { background: #FFFFFF; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.eq-etapa { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; }
.eq-punto { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--eq-linea); box-sizing: border-box; background: #FFFFFF; color: var(--eq-tinta); }
.eq-punto--hecho { background: var(--eq-hecho); border-color: var(--eq-hecho); color: #FFFFFF; }
.eq-punto--ahora { background: #4B3FC4; border-color: #4B3FC4; color: #FFFFFF; box-shadow: 0 0 0 5px #DAD5FF; }
.eq-etiqueta { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: #EFEDFF;
  color: #2F2690; }
.eq-campo { display: flex; flex-direction: column; gap: 6px; }
.eq-campo label { font-size: 13px; font-weight: 600; }
.eq-enlace { color: #2F2690; font-weight: 700; font-size: 14px; }

/* Yo y vincular */
.eq-inst-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  border-bottom: 1px solid #ECECF5; }
.eq-inst-fila:last-child { border-bottom: 0; }
.eq-inst-fila span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.eq-inst-fila small { font-size: 12px; color: var(--eq-tinta-2); }

/* Barra inferior */
.eq-barra { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #FFFFFF;
  border-top: 1px solid #E4E4EE; padding: 0 6px env(safe-area-inset-bottom); z-index: 2; }
.eq-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 60px; font-size: 11px; font-weight: 600; color: var(--eq-tinta-2); text-decoration: none; }
.eq-tab[aria-current="page"] { color: var(--eq-noche); }
.eq-pasos.eq-pasos--sin-fondo { background: none; }
