/* CAMPO · Portafolio individual · pestaña Dividendos. Tokens de _dev_proto-campo.css; sin brillos, degradados ni sobretítulos.
   El ocre marca lo recibido (sólido) y lo estimado (trama). Solo transform/opacity en el movimiento; los colapsables usan filas de rejilla. */
.pdv { display: grid; gap: 16px; min-width: 0; container-type: inline-size; }
.pdv > *, .pdv-cols > * { min-width: 0; }
.pdv .num { font-variant-numeric: tabular-nums; }
.pdv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pdv-chip { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); font-size: 12px; font-weight: 600; flex: none; }
.pdv-s { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.pdv-s .panel-head { margin: 0; }
.pdv-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.pdv-foot { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-3); text-align: center; padding: 4px 0 8px; }
.pdv-tp { font-style: normal; color: var(--text-3); }

/* ---------- registro de KPI ---------- */
.pdv-led { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: clip; }
.pdv-k { background: var(--s1); padding: 12px 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.pdv-k:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pdv-kh { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; min-width: 0; }
.pdv-kn { font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin: 0; line-height: 1.3; padding-top: 2px; }
.pdv-kv { font-size: clamp(21px, 5.2vw, 26px); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdv-ks { font-size: 12.5px; line-height: 1.4; color: var(--text-3); margin: 0; }
.pdv-i { all: unset; box-sizing: border-box; position: relative; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--text-3); cursor: pointer; transition: color 150ms var(--ease-out), transform 150ms var(--ease-out); }
.pdv-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pdv-i::after { content: ''; position: absolute; inset: -10px; }
.pdv-i[aria-expanded="true"] { color: var(--accent-ink); }
.pdv-i:focus-visible, .pdv-tg:focus-visible, .pdv-stage:focus-visible, .pdv-tw:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.pdv-i:active { transform: scale(0.92); }
.pdv-def { display: grid; grid-template-rows: 0fr; margin-top: -16px; visibility: hidden; transition: grid-template-rows 300ms var(--ease-expo), margin-top 300ms var(--ease-expo), visibility 0s linear 300ms; }
.pdv-def[data-open] { grid-template-rows: 1fr; margin-top: 0; visibility: visible; transition-delay: 0s; }
.pdv-defi { overflow: hidden; min-height: 0; }
.pdv-defi p { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s2); font-size: 13.5px; line-height: 1.55; color: var(--text-2); max-width: 78ch; }
.pdv-defi b { color: var(--text); font-weight: 600; }

/* ---------- gráfica ---------- */
.pdv-ch { padding: 16px; }
.pdv-ctop { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.pdv-ct { display: grid; gap: 2px; min-width: 0; }
.pdv-ct h2 { font-size: 16px; letter-spacing: -0.01em; margin: 0; }
.pdv-ct .muted { font-size: 13px; color: var(--text-3); }
.pdv-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-2); }
.pdv-key li { display: inline-flex; align-items: center; gap: 6px; }
.pdv-sw1, .pdv-sw2, .pdv-sw3 { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.pdv-sw1 { background: var(--accent-ink); }
.pdv-sw2 { border: 1.25px solid var(--accent-ink); background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--accent-ink) 60%, transparent) 0 1px, transparent 1px 4px); }
.pdv-sw3 { width: 2px; height: 14px; border-radius: 0; background: repeating-linear-gradient(180deg, var(--text-2) 0 3px, transparent 3px 6px); }
.pdv-sw { position: relative; }
.pdv-stage { position: relative; height: clamp(230px, 60vw, 320px); border-radius: var(--r-sm); touch-action: pan-y; cursor: crosshair; }
.pdv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pdv-tip { position: absolute; left: 0; top: 0; z-index: 6; width: max-content; max-width: min(240px, 100%); display: grid; gap: 3px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s3); border: 1px solid var(--line); box-shadow: var(--sh-2); font-size: 12.5px; line-height: 1.35; color: var(--text-2); pointer-events: none; }
.pdv-tip[hidden] { display: none; }
.pdv-tip strong { color: var(--text); font-weight: 600; font-size: 13px; }
.pdv-tip b { font-weight: 600; color: var(--text); }
.pdv-tl { display: grid; gap: 1px; margin-top: 3px; padding-top: 5px; border-top: 1px solid var(--line); }
.pdv-tr { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- columnas ---------- */
.pdv-cols { display: grid; gap: 16px; align-items: start; min-width: 0; }

/* ---------- próximos pagos y filas con marca ---------- */
.pdv-pl { list-style: none; margin: 0; padding: 0; display: grid; }
.pdv-pr, .pdv-er { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pdv-pl > li:first-child { border-top: 0; }
.pdv-er { grid-template-columns: minmax(0, 1fr) auto; }
.pdv-dt { display: grid; justify-items: center; line-height: 1.1; padding: 5px 0; border-radius: var(--r-sm); background: var(--s2); }
.pdv-dt b { font-size: 17px; font-weight: 600; color: var(--text); }
.pdv-dt span { font-size: 12px; color: var(--text-3); }
.pdv-ca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pdv-ca > svg, .pdv-ca > .pdv-chip { flex: none; }
.pdv-cn { display: grid; min-width: 0; line-height: 1.3; }
.pdv-cn strong { font-size: 14.5px; font-weight: 600; color: var(--text); }
.pdv-cn > span:not(.pdv-t1) { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdv-t1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pdv-est { font-style: normal; font-size: 11.5px; line-height: 1; padding: 3px 6px; border-radius: 6px; color: var(--accent-ink); border: 1px dashed color-mix(in oklab, var(--accent-ink) 55%, transparent); white-space: nowrap; }
.pdv-pm { display: grid; justify-items: end; line-height: 1.3; text-align: right; }
.pdv-pm b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.pdv-pm span { font-size: 12.5px; color: var(--text-3); }
.pdv-pl2 { border-top: 1px solid var(--line); }
.pdv-pl2 > li:first-child { border-top: 0; }

/* ---------- colapsables ---------- */
.pdv-co { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 300ms var(--ease-expo), visibility 0s linear 300ms; }
.pdv-co[data-open] { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.pdv-coi { overflow: hidden; min-height: 0; padding: 2px; margin: -2px; }
.pdv-tg { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; border-radius: var(--r-sm); justify-self: start; }
.pdv-tgi { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--ease-out); }
.pdv-tg[aria-expanded="true"] .pdv-tgi { transform: rotate(180deg); }

/* ---------- tablas ---------- */
.pdv-tw { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r-sm); max-width: 100%; }
.pdv-tb { width: 100%; min-width: 580px; border-collapse: separate; border-spacing: 0; }
.pdv-tb2 { min-width: 640px; }
.pdv-tb th, .pdv-tb td { padding: 10px 8px; text-align: right; vertical-align: middle; border-top: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.pdv-tb thead th { border-top: 0; font-size: 12.5px; font-weight: 500; color: var(--text-3); padding-top: 0; }
.pdv-tb th:first-child, .pdv-tb td:first-child { text-align: left; padding-left: 0; position: sticky; left: 0; background: var(--s1); z-index: 1; }
.pdv-tb td:last-child, .pdv-tb th:last-child { padding-right: 0; }
.pdv-tb tbody th { font-weight: 400; min-width: 150px; }
.pdv-tb b { font-weight: 600; color: var(--text); }
.pdv-tb tfoot th, .pdv-tb tfoot td { border-top: 1px solid var(--text-3); font-weight: 600; color: var(--text); }
.pdv-an { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.3; font-weight: 400; }
.pdv-sbt { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--s2); overflow: hidden; }
.pdv-sb { display: block; height: 100%; border-radius: 2px; background: var(--accent-ink); transform-origin: left center; }
.pdv-roc { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.pdv .pdv-roc input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent-ink); box-shadow: none; }
@media (pointer: coarse) { .pdv-roc { min-height: 44px; } }

/* ---------- estado vacío ---------- */
.pdv-empty { padding: 20px; max-width: 70ch; }
.pdv-empty h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.pdv-empty p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.pdv-eh { margin: 8px 0 0; font-size: 15px; letter-spacing: -0.01em; }
.pdv-el { list-style: none; margin: 0; padding: 0; display: grid; }
.pdv-el .pdv-er:first-child { border-top: 0; }

/* ---------- adaptable ---------- */
@container (min-width: 600px) {
  .pdv-led { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdv-k:last-child:nth-child(odd) { grid-column: auto; }
  .pdv-k:nth-child(3n + 2):last-child { grid-column: span 2; }
  .pdv-s, .pdv-ch { padding: 20px; }
  .pdv-k { padding: 14px 16px; }
  .pdv-stage { height: 300px; }
}
@container (min-width: 900px) {
  .pdv-led { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pdv-k:nth-child(3n + 2):last-child { grid-column: auto; }
  .pdv-cols { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
}
@media (hover: hover) and (pointer: fine) { .pdv-i:hover, .pdv-tg:hover { color: var(--text); } .pdv-i[aria-expanded="true"]:hover { color: var(--accent-ink); } }
@media (pointer: coarse) { .pdv-i::after { inset: -10px; } }
@media (prefers-reduced-motion: reduce) {
  .pdv *, .pdv *::before, .pdv *::after { transition: none !important; animation: none !important; }
}
