/* Histórico (29/10): static/historico.js. Reutiliza .ar-pide, .chip-f, .seg-chips, .card, .tag y .ctipo de style.css */
.hist { max-width: 1100px; }
.hist-pide input { font-size: 16.5px; padding: 11px 2px; }
.hist-pide input::-webkit-search-cancel-button { display: none; }  /* ya está el botón «Borrar» */
.hist-ej { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 12px; }
.hist-ej .chip-f { padding: 4px 11px; font-size: 13px; }
.hist-filt-btn { display: none; margin-bottom: 10px; }
.hist-filt-btn b { color: var(--accent-dark); }
.hist-filtros { padding: 12px 14px; }
.hist-fila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .9fr) minmax(0, 1.4fr); gap: 10px 12px; }
.hist-fila .field { margin: 0; }
.hist-fila .ac-wrap { width: 100%; }
.hist-fechas > span { display: flex; align-items: center; gap: 6px; }
.hist-fechas input { min-width: 0; }
.hist-tipos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.hist-tipos .chip-f { padding: 5px 11px; font-size: 13px; }

.hist-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 12px; }
.hist-cuenta { font-size: 14.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hist-sel select { padding: 6px 8px; border: 1px solid #d3cdc3; border-radius: 7px; background: #fff; font-weight: 400; }

/* destacado «Última vez» */
.hist-ult { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1.5px solid var(--accent); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 0 0 4px var(--accent-soft); }
.hist-ult-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.hist-ult-ic .ic { width: 22px; height: 22px; }
.hist-ult-t { font-size: 17px; margin-bottom: 4px; }
.hist-ult-que { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.hist-ult-que .ctipo { vertical-align: 1px; margin-right: 4px; }
.hist-ult-donde { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.hist-ult-acc { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }

/* grupos */
.hist-g { font-size: 22px; margin: 22px 0 8px; display: flex; align-items: baseline; gap: 10px; letter-spacing: .2px; }
.hist-g:first-of-type { margin-top: 6px; }
.hist-g .n, .hist-sg .n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--beige-soft); border-radius: 10px; padding: 1px 8px; }
.hist-sg { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 0 6px 2px; display: flex; align-items: center; gap: 8px; }
.hist-grupo { display: flex; flex-direction: column; gap: 8px; }

/* cada trabajo */
.hist-it { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.hist-it + .hist-it { margin-top: 0; }
.hist > #hRes > .hist-it { margin-bottom: 8px; }
.hist-fecha { width: 52px; flex: none; text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 2px; line-height: 1.05; }
.hist-fecha b { font-size: 22px; }
.hist-fecha span { font-size: 12.5px; text-transform: uppercase; font-weight: 700; color: var(--accent-dark); letter-spacing: .4px; }
.hist-fecha small { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hist-cuerpo { flex: 1; min-width: 0; }
.hist-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 5px; }
.hist-tags .ctipo { font-size: 11.5px; line-height: 20px; }
.hist-donde { font-size: 15px; margin-bottom: 6px; overflow-wrap: anywhere; }
.hist-donde i { font-style: normal; color: var(--muted); margin: 0 6px; }
.hist-que { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.hist-b { overflow-wrap: anywhere; white-space: pre-line; }
.hist-b.pedido { color: var(--muted); font-size: 13.5px; }
.hist-k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-right: 3px; white-space: nowrap; }
.hist-vertodo { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-size: 13px; text-decoration: underline; }
.hist-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 9px; font-size: 13px; color: var(--muted); }
.hist-tecs { flex: 1; min-width: 180px; }
.hist-tecs .ic { width: 14px; height: 14px; vertical-align: -2px; }
.hist-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-checklist { background: #e6eefa; color: #24548f; }

@media (max-width: 900px) {
  .hist-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hist-fechas { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .hist .page-head h1 { font-size: 22px; }
  .hist .page-head p { font-size: 13.5px; }
  .hist-filt-btn { display: inline-flex; }
  .hist-filtros { display: none; }
  .hist-filtros.abierto { display: block; }
  .hist-fila { grid-template-columns: minmax(0, 1fr); }
  .hist-barra { gap: 8px; }
  .hist-barra .grow { display: none; }
  .hist-cuenta { width: 100%; }
  .hist-sel { flex: 1; min-width: 0; }
  .hist-sel select { flex: 1; min-width: 0; width: 100%; }
  .hist-ult { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .hist-ult-ic { width: 32px; height: 32px; }
  .hist-ult .grow { flex: 1 1 calc(100% - 50px); }
  .hist-ult-acc { width: 100%; }
  .hist-it { gap: 10px; padding: 10px 11px; }
  .hist-fecha { width: 40px; }
  .hist-fecha b { font-size: 19px; }
  .hist-g { font-size: 19px; }
  .hist-acc { width: 100%; }
}
