/* Ahora */
.ah-familias { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 0; border: 1px solid var(--raya); border-radius: var(--r); background: var(--hoja); overflow: hidden; }
.ah-familia { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; text-align: left; padding: 11px 14px 12px; background: none; border: 0; border-right: 1px solid var(--raya-2); border-bottom: 3px solid transparent; color: inherit; text-decoration: none; min-width: 0; }
.ah-familia:last-child { border-right: 0; }
.ah-familia:hover { background: var(--hoja-2); }
.ah-familia .ah-f-nombre { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--tinta-2); }
.ah-familia b { font: 600 16px/1.3 var(--titulo); letter-spacing: -.01em; }
.ah-familia .tenue { font-size: 12px; }
.ah-familia.e-mal { border-bottom-color: var(--mal); }
.ah-familia.e-atencion { border-bottom-color: var(--atencion); }
.ah-familia.e-bien b, .ah-familia.e-sin_datos b { color: var(--tinta-2); font-weight: 500; }
.ah-familia.es-actual { background: var(--acento-suave); }

.ah-causas { display: flex; flex-direction: column; }
.ah-causa { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; padding: 14px 16px; border-bottom: 1px solid var(--raya-2); }
.ah-causa:last-child { border-bottom: 0; }
.ah-causa.es-abierta { background: var(--acento-suave); }
.ah-causa h3 { font-size: 17px; line-height: 1.25; }
.ah-causa.e-mal h3 { color: var(--mal); }
.ah-que { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ah-detalle { color: var(--tinta-2); max-width: 78ch; }
.ah-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 12px; color: var(--tinta-2); }
.ah-boton { align-self: center; }
.ah-ajenas .ah-causa h3 { color: var(--tinta-2); }

.ah-esperado details.plegable { border: 1px solid var(--raya); border-radius: var(--r); background: var(--hoja-2); padding: 0 14px; }
.ah-esperado details.plegable > .plegable-dentro { padding-left: 0; }
.ah-esp-titulo { display: inline-flex; align-items: center; gap: 8px; }
.ah-esp-titulo i { width: 14px; height: 12px; border-radius: 2px; }
.ah-esp-fila { display: grid; grid-template-columns: minmax(0, 1fr) 70px 150px; gap: 14px; padding: 11px 0; border-top: 1px solid var(--raya); align-items: start; font-size: 13px; }
.ah-esp-fila > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ah-esp-n { text-align: right; color: var(--tinta-2); }

.ah-proximos { display: flex; flex-direction: column; }
.ah-prox { display: grid; grid-template-columns: 112px 132px minmax(0, max-content) minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 7px 14px; border-bottom: 1px solid var(--raya-2); font-size: 13px; }
.ah-prox:last-child { border-bottom: 0; }
.ah-prox time { font-weight: 500; }
.ah-prox .tenue { font-size: 12px; }
.ah-prox-que { color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ah-franja { padding: 14px 16px 10px; }
.ah-franja-cifras { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; font-size: 13px; margin-bottom: 12px; }
.ah-franja-cifras a { margin-left: auto; }
.ah-l { display: inline-block; width: 10px; height: 10px; border-radius: 1px; margin-right: 6px; vertical-align: -1px; }
.ah-horas { display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--raya); }
.ah-hora { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.ah-hora.es-dia::before { content: ''; position: absolute; left: -1.5px; top: 0; bottom: 0; border-left: 1px dashed var(--raya); }
.ah-hora i { display: block; width: 100%; }
.ah-bien { background: var(--pulso); }
.ah-mal { background: var(--mal); }
.ah-dias { position: relative; height: 20px; font: 11px/20px var(--cifra); color: var(--tinta-3); }
.ah-dias span { position: absolute; top: 0; white-space: nowrap; }
.ah-dias .ah-fin { right: 0; color: var(--tinta); }

.ah-barra { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; }
.ah-barra p { min-width: 0; }
.ah-sec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ah-boton { display: flex; flex-direction: column; align-items: flex-start; }
.ah-sec .boton { min-height: 32px; }
.ah-causa.es-vista h3 { color: var(--tinta-2); font-weight: 500; }
.ah-visto { font-size: 12px; color: var(--tinta-2); border-left: 3px solid var(--acento); padding-left: 8px; }
.ah-visto.ah-cae { border-left-color: var(--atencion); }
.ah-donde { font-size: 12px; color: var(--tinta-2); max-width: 78ch; }
.ah-acept h3 { color: var(--tinta-2); font-weight: 500; }
.ah-elegir { display: flex; flex-direction: column; gap: 6px; }
.ah-eleg { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--raya-2); }
.ah-eleg-b { display: flex; gap: 6px; flex-wrap: wrap; }
.ah-aprob { display: flex; flex-direction: column; }
.ah-ap { display: flex; flex-direction: column; gap: 3px; padding: 10px 16px; border-bottom: 1px solid var(--raya-2); font-size: 13px; }
.ah-ap-pie { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 16px; }
.ah-resueltos details.plegable { border: 1px solid var(--raya); border-radius: var(--r); background: var(--hoja); padding: 0 14px; }
.ah-res-tramo { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; }
.ah-res-fila { padding: 11px 0; border-top: 1px solid var(--raya); font-size: 13px; }
.ah-res-fila > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ah-canal-fila { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; font-size: 13px; }
.ah-canal-fila > div { min-width: 0; flex: 1 1 260px; }

@media (max-width: 760px) {
  .ah-causa { grid-template-columns: minmax(0, 1fr); }
  .ah-boton { align-self: start; }
  .ah-esp-fila { grid-template-columns: minmax(0, 1fr) auto; }
  .ah-esp-fila > .tenue { grid-column: 1 / -1; }
  .ah-prox { grid-template-columns: 112px minmax(0, 1fr); }
  .ah-prox > :nth-child(3), .ah-prox-que { grid-column: 1 / -1; white-space: normal; }
  .ah-dias span:not(.ah-fin):not(:first-child) { display: none; }
  .ah-franja-cifras a { margin-left: 0; }
}
