/* ═══════════════════════════════════════════════════════════════════
   ALPHA FINANCE CONGRESS TRADES  —  market-map/congress/congress.css
   Encima de ../superinvestors/superinvestors.css (tarjetas, fotos, plegables, tabla).
   Aquí: partido (D azul, R rojo), filtros, tipo de operación y la tabla de operaciones.
   ═══════════════════════════════════════════════════════════════════ */

.cg-page { gap: 16px; }
.cg-page [hidden] { display: none !important; }

/* Partido */
.cg-party { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font: 800 10.5px 'Inter', sans-serif; color: #fff; vertical-align: 1px; flex-shrink: 0; }
.cg-party--D { background: #1f5fbf; }
.cg-party--R { background: #c62f2f; }
.cg-party--I { background: #6b7b80; }
.cg-photo--D { background: linear-gradient(135deg, #1f5fbf, #6c9be0); }
.cg-photo--R { background: linear-gradient(135deg, #c62f2f, #e88383); }
.cg-photo img { object-position: 50% 18%; }

/* Filtros */
.cg-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.cg-seg:empty { display: none; }
.cg-seg { display: inline-flex; gap: 4px; background: #f1f4f5; border-radius: 11px; padding: 3px; }
.cg-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: 700 12.5px 'Inter', sans-serif; color: #3d4b50; cursor: pointer; }
.cg-seg button[aria-pressed="true"] { background: #fff; color: #16242a; box-shadow: 0 2px 6px rgba(22, 36, 42, 0.08); }
.cg-seg button:focus-visible, .cg-more:focus-visible, .cg-mem:focus-visible { outline: 3px solid rgba(84, 140, 146, 0.45); outline-offset: 2px; }

/* Tarjetas */
.cg-card .si-card__fund { display: flex; align-items: center; gap: 6px; }
.cg-tks { display: flex; flex-wrap: wrap; gap: 5px; }
.cg-tks span { font: 800 11.5px 'Inter', sans-serif; color: #285260; background: rgba(84, 140, 146, 0.1); padding: 4px 8px; border-radius: 7px; }
.cg-pill--paper { background: #f1f4f5; color: #6b7b80; }
.cg-more { align-self: center; margin-top: 12px; border: 1.5px solid rgba(40, 82, 96, 0.3); background: #fff; color: #285260; border-radius: 999px; padding: 9px 18px; font: 700 13px 'Inter', sans-serif; cursor: pointer; }
.cg-more:hover { background: rgba(84, 140, 146, 0.1); }

/* Consenso */
.cg-fold { background: #fff !important; border-color: rgba(22, 36, 42, 0.09) !important; }
.si-cons__funds .si-cons__mgr small { display: flex; align-items: center; gap: 5px; }
.cg-n { font: 700 12px 'Inter', sans-serif; color: #3d4b50; white-space: nowrap; }
.si-cons__row > summary .si-cons__amt { min-width: 60px; }

/* Operaciones */
.cg-trades { display: flex; flex-direction: column; }
.cg-trades__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cg-trades__head .si-h2 { margin: 0; }
.cg-table { background: #fff; }
.cg-table th, .cg-table td { text-align: left !important; vertical-align: middle; }
.cg-table td small { display: block; font-size: 11px; color: #8a989c; font-weight: 500; }
.cg-mem { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #16242a; min-width: 190px; }
.cg-mem .si-photo--mini { width: 32px; height: 32px; font-size: 11px; margin: 0; box-shadow: none; }
.cg-mem span { display: flex; flex-direction: column; line-height: 1.25; }
.cg-mem small { display: flex !important; align-items: center; gap: 5px; }
.cg-mem:hover b { color: #285260; }
.cg-table th, .cg-table td { padding: 10px 10px; }
.cg-table .si-co { min-width: 0; }
.cg-table .si-co__n { max-width: 220px; white-space: nowrap; }
.cg-desc { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: #8a989c; }
.cg-type { display: inline-block; font: 800 11.5px 'Inter', sans-serif; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.cg-type--buy { background: #e6f4ea; color: #188038; }
.cg-type--sell { background: #fbe9e9; color: #c0392b; }
.cg-type--other { background: #f1f4f5; color: #6b7b80; }
.cg-late.is-late { color: #c0392b !important; font-weight: 700 !important; }
.cg-up { color: #188038 !important; }
.cg-down { color: #c0392b !important; }
.cg-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cg-files a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(22, 36, 42, 0.1); font: 600 13px 'Inter', sans-serif; color: #285260; text-decoration: none; }
.cg-files a:hover { background: #f6f9f9; }
.cg-files i { color: #c0392b; }

@media (max-width: 640px) {
  .cg-mem { min-width: 150px; }
  .cg-desc { max-width: 160px; }
}
