/* PROJECT AAM – tablas con scroll, búsqueda, filtros y paginación */
.aam-t-scroll { max-height: 70vh; overflow: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; -webkit-overflow-scrolling: touch; }
.aam-t-scroll > table { margin: 0 !important; border: 0 !important; }
.aam-t-scroll thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; box-shadow: inset 0 -1px 0 #e2e8f0; }
.aam-t-tabla tr[hidden] { display: none !important; }

.aam-t-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.aam-t-barra .aam-t-buscar { flex: 1 1 220px; min-width: 180px; max-width: 360px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.aam-t-barra select, .aam-t-rango input { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; max-width: 240px; }
.aam-t-barra .aam-t-buscar[hidden], .aam-t-lista[hidden] { display: none; }
.aam-t-lista { position: relative; flex: 1 1 220px; min-width: 180px; max-width: 360px; }
.aam-t-lista-in { width: 100%; box-sizing: border-box; padding: 7px 28px 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2'/></svg>") no-repeat right 10px center; cursor: pointer; }
.aam-t-lista-op { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow: auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.aam-t-lista-item { padding: 7px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.aam-t-lista-item:hover, .aam-t-lista-item.activa { background: #f1f5f9; }
.aam-t-lista-item.elegida { font-weight: 600; color: var(--aam-acento, #a12222); }
.aam-t-lista-nada { padding: 7px 10px; font-size: 13px; color: #64748b; }
.aam-t-rango { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.aam-t-rango[hidden] { display: none; }
.aam-t-rango input[type="number"] { width: 100px; }
.aam-t-rango-etq, .aam-t-guion { font-size: 13px; color: #64748b; }

.aam-t-pie { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 10px 0 18px; font-size: 13px; color: #475569; }
.aam-t-tam select { margin-left: 6px; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; }
.aam-t-paginas { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.aam-t-pag { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1e293b; cursor: pointer; font-size: 13px; }
.aam-t-pag:hover:not(:disabled) { border-color: var(--aam-acento, #a12222); color: var(--aam-acento, #a12222); }
.aam-t-pag.activo { background: var(--aam-acento, #a12222); border-color: var(--aam-acento, #a12222); color: #fff; font-weight: 600; }
.aam-t-pag:disabled { opacity: .4; cursor: default; }
.aam-t-puntos { padding: 0 4px; color: #94a3b8; }

.aam-t-ordenable { cursor: pointer; user-select: none; white-space: nowrap; }
.aam-t-ordenable::after { content: "↕"; margin-left: 6px; font-size: 11px; color: #94a3b8; }
.aam-t-ordenable.aam-t-asc::after { content: "▲"; color: var(--aam-acento, #a12222); }
.aam-t-ordenable.aam-t-desc::after { content: "▼"; color: var(--aam-acento, #a12222); }
.aam-t-ordenable:focus-visible { outline: 2px solid var(--aam-acento, #a12222); outline-offset: -2px; }
.aam-t-vacia td { text-align: center; color: #64748b; padding: 18px !important; }

@media (max-width: 640px) {
	.aam-t-scroll { max-height: 75vh; }
	.aam-t-barra .aam-t-buscar { max-width: none; }
	.aam-t-pie { justify-content: center; }
}
