/* CAMPO · Portafolio individual · pestaña "Transacciones". Tokens de _dev_proto-campo.css; tipo oración, sin mayúsculas espaciadas. */
.pftx { display: grid; gap: 16px; min-width: 0; container-type: inline-size; }
.pftx > * { min-width: 0; }
.pftx .num { font-variant-numeric: tabular-nums; }
.pftx .muted { font-size: 13px; color: var(--text-3); }
.pftx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pftx-s { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.pftx-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; }
.pftx-top h2 { font-size: 16px; letter-spacing: -0.01em; margin: 0; }
.pftx-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pftx-foot { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
.pftx-note { margin: 0; font-size: 12.5px; color: var(--text-3); }
.pftx-empty-card { padding: 20px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--text-2); display: grid; gap: 4px; }
.pftx-empty-card strong { color: var(--text); font-size: 16px; font-weight: 600; }
.pftx-empty-card p { margin: 0; font-size: 14.5px; line-height: 1.5; max-width: 60ch; }

/* ---------- totales del filtro ---------- */
.pftx-led { padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.pftx-cell { padding: 14px 16px; display: grid; gap: 2px; align-content: start; min-width: 0; position: relative; }
.pftx-cell + .pftx-cell::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.pftx-k { font-size: 13px; color: var(--text-3); }
.pftx-v { font-size: clamp(20px, 4.6vw, 26px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pftx-d { font-size: 12.5px; color: var(--text-3); line-height: 1.35; }
@container (max-width: 639px) {
  .pftx-led { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pftx-cell:nth-child(3)::before { display: none; }
  .pftx-cell:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- gráfica de flujo neto ---------- */
.pftx-cw { height: clamp(120px, 24vw, 150px); min-width: 0; position: relative; }
.pftx-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pftx-zero { stroke: var(--text-3); stroke-opacity: 0.45; stroke-width: 1; }
.pftx-bar { transform-box: view-box; }
.pftx-bar.is-pos { fill: var(--accent-ink); }
.pftx-bar.is-neg { fill: var(--text-3); }
.pftx-bar.is-zero { fill: none; }
.pftx-ax { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }

/* ---------- filtros y búsqueda ---------- */
.pftx-tools { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: space-between; }
.pftx-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pftx-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--s2); color: var(--text-2); font-size: 14px; font-weight: 500; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 120ms var(--ease-out); }
.pftx-chip:active { transform: scale(0.97); }
.pftx-chip[aria-pressed="true"] { background: var(--s3); color: var(--text); border-color: var(--accent-ink); }
.pftx-cc { font-size: 12.5px; color: var(--text-3); }
@media (hover: hover) { .pftx-chip:hover { color: var(--text); background: var(--s3); } }
@media (pointer: coarse) { .pftx-chip { min-height: 44px; } }
.pftx-search { display: block; flex: 1 1 220px; max-width: 320px; min-width: 0; }
.pftx-search input { min-height: 40px; font-size: 15px; padding: 0 12px; }
@media (pointer: coarse) { .pftx-search input { min-height: 44px; } }
.pftx-st { margin: 0; font-size: 13px; color: var(--text-3); }

/* ---------- formulario de prototipo ---------- */
.pftx-form { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s2); }
.pftx-fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pftx-f { display: grid; gap: 4px; min-width: 0; }
.pftx-f > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.pftx-f input, .pftx-f select { width: 100%; min-height: 44px; padding: 0 12px; font-size: 15px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); }
.pftx-f input[aria-invalid="true"], .pftx-f select[aria-invalid="true"] { border-color: var(--loss); }
.pftx-f input[data-fi="tk"] { text-transform: uppercase; }
.pftx-prev { margin: 0; font-size: 13.5px; color: var(--text-2); }
.pftx-err { margin: 0; font-size: 13.5px; color: var(--loss); }
.pftx-err:empty { display: none; }
.pftx-fa { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- tabla ---------- */
.pftx-tw { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; scrollbar-width: thin; }
.pftx-tb { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.pftx-tb th, .pftx-tb td { padding: 10px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.pftx-tb thead th { border-top: 0; font-size: 12.5px; font-weight: 500; color: var(--text-3); padding-top: 0; }
.pftx-tb .r { text-align: right; }
.pftx-mh th { border-top: 0; padding: 16px 8px 6px; text-align: left; }
.pftx-mn { font-size: 14px; font-weight: 600; color: var(--text); }
.pftx-mf { margin-left: 12px; font-size: 13px; color: var(--text-3); font-weight: 400; }
.pftx-mf b { font-weight: 600; color: var(--text-2); }
.pftx-r { transition: background-color 150ms var(--ease-out); }
@media (hover: hover) { .pftx-r:hover { background: var(--s2); } }
.pftx-r.is-new td { background: color-mix(in oklch, var(--accent) 8%, transparent); }
.pftx-dt { color: var(--text-2); }
.pftx-type { display: inline-block; font-size: 12.5px; line-height: 1.2; padding: 3px 8px; border-radius: var(--r-sm); background: var(--s3); color: var(--text-2); }
.pftx-tk { font-weight: 600; color: var(--text); margin-right: 8px; }
.pftx-nm { color: var(--text-3); font-size: 13px; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.pftx-mo { font-weight: 600; }
.pftx-new { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--accent-ink); border: 1px dashed var(--accent-ink); border-radius: var(--r-sm); padding: 1px 6px; }
.pftx-empty { margin: 0; padding: 16px; text-align: center; color: var(--text-3); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r-md); }

/* ---------- adaptable ---------- */
@container (max-width: 520px) { .pftx-s { padding: 12px; } }
@container (min-width: 600px) { .pftx-s { padding: 20px; } .pftx-cell { padding: 16px 20px; } }

@media (prefers-reduced-motion: reduce) {
  .pftx *, .pftx *::before, .pftx *::after { transition: none !important; animation: none !important; }
}

/* movimientos del usuario: etiqueta neutra y acción de borrar */
.pftx-you { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--text-2); background: var(--s2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.pftx-tb .pftx-ac { width: 96px; padding: 0 4px; text-align: right; white-space: nowrap; }
.pftx-edit { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); cursor: pointer; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 120ms var(--ease-out); }
.pftx-edit:active { transform: scale(0.97); }
.pftx-edit:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
@media (hover: hover) { .pftx-edit:hover { background: var(--s2); color: var(--accent-ink); } }
.pftx-del:disabled { opacity: 0.4; cursor: default; }
.pftx-del { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); cursor: pointer; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 120ms var(--ease-out); }
.pftx-del:active { transform: scale(0.97); }
.pftx-del:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
@media (hover: hover) { .pftx-del:hover { background: var(--s2); color: var(--loss); } }
.pftx-empty-card .btn { margin-top: 12px; }
