/* LatinosCPA — «Mi fondo» (panel del promotor): estilos.
 *
 * Archivo nuevo y aislado. Todos los selectores viven bajo `.fnd`, así que no
 * puede afectar a ninguna otra parte del panel. Usa las variables del tema
 * oscuro ya definidas en styles.css. El estado nunca se comunica solo con
 * color: cada segmento y cada chip llevan texto y cifra.
 */
.fnd { position: relative; }
.fnd .fnd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.fnd .fnd-head .h2 { margin: 0; }
.fnd .fnd-lead { margin: 4px 0 12px; line-height: 1.5; }
.fnd .fnd-chip { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: rgba(31, 92, 124, .22); color: var(--navy-t); white-space: nowrap; }
.fnd .fnd-chip.st-en_fondo { background: rgba(232, 161, 58, .16); color: var(--warn); }
.fnd .fnd-chip.st-parcial { background: rgba(107, 176, 220, .16); color: var(--navy-t); }
.fnd .fnd-chip.st-liberado { background: rgba(107, 176, 220, .16); color: var(--navy-t); }
.fnd .fnd-chip.st-pagado { background: rgba(52, 181, 104, .16); color: var(--emerald-d); }

.fnd .fnd-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.fnd .fnd-tile { text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.fnd .fnd-tile .amt { font-size: 19px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.fnd .fnd-tile .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; margin-top: 2px; }
.fnd .fnd-tile.t-en .amt { color: var(--warn); }
.fnd .fnd-tile.t-lib .amt { color: var(--navy-t); }
.fnd .fnd-tile.t-pag .amt { color: var(--emerald-d); }

.fnd .fnd-weeks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.fnd .fnd-week { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg-soft); }
.fnd .fnd-week-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fnd .fnd-week-title { font-size: 14px; font-weight: 900; letter-spacing: .6px; color: var(--ink); margin: 0; }
.fnd .fnd-dl { margin: 0; display: grid; gap: 8px; }
.fnd .fnd-dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fnd .fnd-dl dt { color: var(--body); font-size: 14px; }
.fnd .fnd-dl dt small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.fnd .fnd-dl dd { margin: 0; font-weight: 900; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fnd .fnd-dl .hl { padding-top: 8px; border-top: 1px dashed var(--line); }
.fnd .fnd-dl .hl dd { color: var(--warn); font-size: 22px; }

.fnd .fnd-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 12px 0 6px; }
.fnd .fnd-bar span { display: block; height: 100%; min-width: 0; }
.fnd .fnd-bar .b-pag { background: var(--emerald); }
.fnd .fnd-bar .b-lib { background: var(--navy-t); }
.fnd .fnd-bar .b-en { background: var(--warn); }
.fnd .fnd-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--body); margin: 0; padding: 0; list-style: none; }
.fnd .fnd-legend li { display: inline-flex; align-items: center; gap: 6px; }
.fnd .fnd-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fnd .fnd-legend .l-pag i { background: var(--emerald); }
.fnd .fnd-legend .l-lib i { background: var(--navy-t); }
.fnd .fnd-legend .l-en i { background: var(--warn); }
.fnd .fnd-legend b { font-variant-numeric: tabular-nums; color: var(--ink); }

.fnd .fnd-wait { margin: 10px 0 0; font-size: 13px; color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.fnd .fnd-est { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.fnd .fnd-prog { margin: 10px 0 0; }
.fnd .fnd-prog-label { font-size: 12px; color: var(--body); display: flex; justify-content: space-between; margin-bottom: 4px; }
.fnd .fnd-prog-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fnd .fnd-prog-fill { height: 100%; background: var(--navy-t); }

.fnd .fnd-more { margin-top: 12px; }
.fnd .fnd-detail { margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fnd .fnd-detail table { min-width: 520px; }
.fnd .fnd-detail th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 6px 6px; }
.fnd .fnd-detail th.num { text-align: right; }
.fnd .fnd-detail td { padding: 6px 6px; font-size: 13px; border-top: 1px solid var(--line); }
.fnd .fnd-hist { margin: 8px 0 0; }
.fnd .fnd-advance { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: rgba(107, 176, 220, .10); border: 1px solid rgba(107, 176, 220, .30); color: var(--body); }
.fnd .fnd-advance b { color: var(--ink); }
.fnd .fnd-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.fnd .fnd-empty { text-align: center; color: var(--muted); padding: 14px 6px; font-size: 14px; }
.fnd .fnd-err { color: var(--danger); font-size: 13px; }

.fnd .btn:focus-visible { outline: 2px solid var(--navy-t); outline-offset: 2px; }

@media (max-width: 620px) {
  /* el FAB del chat (z-index 2147483000) ocupa la esquina inferior derecha */
  .fnd .fnd-note { padding-right: 58px; }
}
@media (max-width: 480px) {
  .fnd .fnd-tiles { grid-template-columns: 1fr; }
  .fnd .fnd-tile { display: flex; align-items: baseline; justify-content: space-between; text-align: left; padding: 10px 14px; }
  .fnd .fnd-tile .lbl { margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .fnd .fnd-prog-fill, .fnd .fnd-bar span { transition: width .35s ease; }
}

/* Pagos y transacciones (solo lectura): importes públicos de la liquidación + hashes on-chain. */
.fnd .fnd-sub { margin: 18px 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.fnd .fnd-pays, .fnd .fnd-txs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fnd .fnd-pay { min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); }
.fnd .fnd-pay-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.fnd .fnd-paydl .base dt { font-weight: 700; }
.fnd .fnd-tx-lead { margin: 10px 0 6px; }
.fnd .fnd-tx { min-width: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.fnd .fnd-tx-head { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; font-size: 13px; }
.fnd .fnd-tx-kind { color: var(--muted); }
.fnd .fnd-hash { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.fnd .fnd-paydl .hl dd { color: var(--emerald-d); }
