/* Vista: actividad (prefijo act-) */

.act-updated { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }

/* ── Filtros y búsqueda ── */
.act-toolbar { align-items: center; }
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.act-chip-n { margin-left: 2px; font-size: 11px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .act-chip-n { color: inherit; opacity: 0.8; }
.act-chip-err .act-chip-n { color: var(--danger); font-weight: 700; }
.act-toolbar .search { flex: 0 1 280px; }

/* ── Avisos (errores recientes, fallo al actualizar) ── */
.act-notice { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.act-notice:empty { display: none; }
.act-errsum {
  display: flex; align-items: center; gap: var(--s2); padding: 4px 4px 4px var(--s3);
  border: 1px solid var(--border); border-left: 3px solid var(--danger); border-radius: var(--r);
  background: var(--surface); font-size: var(--fs-sm); color: var(--text);
}
.act-errsum > .icon { color: var(--danger); }

/* ── Lista agrupada por día ── */
.act-list { min-width: 0; }
.act-skel { height: 64px; border-radius: var(--r); }
.act-day + .act-day { margin-top: var(--s6); }
.act-day-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: var(--s2);
  padding: var(--s2) var(--s1); margin-bottom: var(--s1); background: var(--bg);
  font-size: var(--fs-sm); font-weight: 650; color: var(--text);
}
.act-day-n { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); }
.act-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }

.act-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); min-width: 0; }
.act-item:first-child { border-top: 0; }
/* Error: marca lateral y fondo muy suave, sin gritar */
.act-item.is-error { box-shadow: inset 3px 0 0 var(--danger); background: color-mix(in srgb, var(--danger) 4%, transparent); }

.act-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); }
.act-ic .icon { width: 16px; height: 16px; }
.act-t-ai .act-ic { background: var(--ai-soft); color: var(--ai); }
.act-t-success .act-ic { background: var(--success-soft); color: var(--success); }
.act-t-info .act-ic { background: var(--info-soft); color: var(--info); }
.act-t-warning .act-ic { background: var(--warning-soft); color: var(--warning); }
.act-t-danger .act-ic { background: var(--danger-soft); color: var(--danger); }

.act-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.act-top { display: flex; align-items: baseline; gap: var(--s2); width: 100%; min-width: 0; }
.act-kind { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
.act-t-ai .act-kind { color: var(--ai); }
.act-t-success .act-kind { color: var(--success); }
.act-t-info .act-kind { color: var(--info); }
.act-t-warning .act-kind { color: var(--warning); }
.act-t-danger .act-kind { color: var(--danger); }
.act-time { margin-left: auto; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-msg { color: var(--text); overflow-wrap: anywhere; line-height: 1.45; }

.act-reel {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px; margin-top: 6px; padding: 0 6px 0 4px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 550; text-align: left;
}
.act-reel:hover { border-color: var(--border-strong); color: var(--text); }
.act-reel.is-missing { background: transparent; }
.act-reel .icon-sm { color: var(--text-3); margin-left: 2px; }
.act-reel-go { width: 14px; height: 14px; color: var(--text-3); }

.act-more { display: flex; justify-content: center; margin-top: var(--s5); text-align: center; }
.act-more:empty { display: none; }

@media (max-width: 900px) {
  .act-day-head { top: var(--topbar-h); }
}
@media (max-width: 720px) {
  .act-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .act-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .act-chips::-webkit-scrollbar { display: none; }
  .act-chips .chip { flex: none; min-height: 36px; }
  .act-toolbar .search { flex: 1 1 auto; max-width: none; }
  .act-item { padding: var(--s3); gap: var(--s2); }
  .act-reel { min-height: 36px; }
  .act-updated { display: none; }
}
