/* Sección "Equipos" (sec-tabla-equipos.js). Tokens de panel.css. */

.equipos { display: flex; flex-direction: column; gap: 16px; }
.equipos-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.equipos-buscar { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border-fuerte); border-radius: var(--r-pill); background: var(--bg-input); color: var(--text-muted); min-width: 240px; }
.equipos-buscar .input { border: 0; background: transparent; padding: 10px 0; min-width: 0; flex: 1; box-shadow: none; }
.equipos-buscar:focus-within { border-color: var(--border-hi); }

/* Chips y filtros */
.equipos-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.equipos-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.equipos-chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-fuerte); background: var(--bg-input); color: var(--text-dim); cursor: pointer; }
.equipos-chip.estatico { cursor: default; }
.equipos-chip.cyan { color: var(--cyan); background: var(--accent-soft); border-color: var(--border-hi); }
.equipos-chip.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.equipos-chip.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.equipos-chip.err { color: var(--err); background: var(--err-bg); border-color: var(--err-border); }
.equipos-chip.activo { box-shadow: 0 0 0 2px currentColor inset; }
.equipos-chip:not(.estatico):hover { filter: brightness(1.15); }
.equipos-filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.equipos-filtros .select { width: auto; min-width: 190px; }

/* Pedidos para entrar */
.equipos-pedidos { display: flex; flex-direction: column; gap: 12px; }
.equipos-pedidos-cabeza { display: flex; flex-direction: column; gap: 4px; }
.equipos-pedido { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: var(--r-grande); background: var(--bg-card); border: 1px solid var(--border); flex-wrap: wrap; }
.equipos-pedido-texto { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.equipos-pedido-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.equipos-pedido-acciones .select { width: 230px; }

/* Tabla */
.equipos-tabla-caja { padding: 0; overflow: visible; border-radius: var(--r-grande); position: relative; }
.equipos-tabla { min-width: 0; }
.equipos-tabla th:first-child, .equipos-tabla td:first-child { padding-left: 18px; }
.equipos-tabla th { background: transparent; }
.equipos-tabla thead th:first-child { border-top-left-radius: var(--r-grande); }
.equipos-fila-debe td { background: var(--err-bg-fila); }
.equipos-nombre { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.equipos-nombre:hover { text-decoration: none; }
.equipos-nombre:hover .t-fuerte { color: var(--cyan); }
.equipos-nombre > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.equipos-contacto, .equipos-app { white-space: nowrap; font-variant-numeric: tabular-nums; }
.equipos-plantel { display: flex; flex-direction: column; gap: 3px; min-width: 130px; }
.equipos-plantel-fila { display: flex; align-items: center; gap: 10px; }
.equipos-barra-plantel { width: 64px; height: 6px; border-radius: var(--r-pill); background: var(--border-fuerte); overflow: hidden; flex-shrink: 0; }
.equipos-barra-plantel i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.equipos-barra-plantel.warn i { background: var(--warn); }
.equipos-plantel-num { font-size: 14px; font-variant-numeric: tabular-nums; }
.equipos-sin-resultados { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Menú ⋯ */
.equipos-menu { position: relative; display: inline-block; }
.equipos-menu-boton { width: 32px; height: 32px; background: transparent; border-color: transparent; }
.equipos-menu-boton:hover, .equipos-menu-boton[aria-expanded="true"] { border-color: var(--border-fuerte); background: var(--bg-card-pressed); }
.equipos-puntos { font-size: 18px; line-height: 1; letter-spacing: 1px; }
.equipos-menu-lista { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; padding: 6px; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-fuerte); border-radius: var(--r-grande); box-shadow: 0 16px 40px var(--sombra-menu); text-align: left; }
.equipos-menu-lista button { font: inherit; font-size: 14px; text-align: left; padding: 9px 12px; border: 0; border-radius: var(--r-medio); background: transparent; color: var(--text); cursor: pointer; white-space: nowrap; }
.equipos-menu-lista button:hover, .equipos-menu-lista button:focus-visible { background: var(--bg-card-pressed); outline: none; }
.equipos-menu-lista button.peligro { color: var(--err); }

/* Alta rápida */
.equipos-alta { display: flex; flex-direction: column; gap: 8px; border-style: dashed; }
.equipos-alta-fila { display: flex; gap: 10px; flex-wrap: wrap; }
.equipos-alta-fila .input { flex: 2 1 240px; }
.equipos-alta-fila .select { flex: 1 1 200px; }

/* Celular: la tabla pasa a tarjetas */
@media (max-width: 760px) {
  .equipos-buscar { min-width: 0; flex: 1 1 100%; }
  .equipos-barra { flex-direction: column; align-items: stretch; }
  .equipos-filtros .select, .equipos-pedido-acciones .select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .equipos-pedido-acciones { justify-content: stretch; width: 100%; }
  .equipos-tabla-caja { background: transparent; border: 0; }
  .equipos-tabla, .equipos-tabla tbody, .equipos-tabla tr, .equipos-tabla td { display: block; width: 100%; }
  .equipos-tabla thead { display: none; }
  .equipos-tabla tr { position: relative; margin-bottom: 10px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-grande); }
  .equipos-tabla tbody tr:hover td { background: transparent; }
  .equipos-tabla td, .equipos-tabla td:first-child { padding: 4px 0; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .equipos-tabla td[data-etiqueta]::before { content: attr(data-etiqueta); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
  .equipos-tabla td:first-child { padding-right: 40px; }
  .equipos-tabla td:first-child::before { display: none; }
  .equipos-tabla td.acciones-celda { position: absolute; top: 10px; right: 10px; width: auto; padding: 0; }
  .equipos-plantel { align-items: flex-end; }
}
