/* =====================================================================
   1erp · cotizaciones y catálogo: cadena de precio, partidas, condiciones
   ===================================================================== */
/* ---------- cadena de precio (el elemento distintivo) ---------- */
.chain { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; margin-top: .5rem; }
.chain-step { position: relative; padding: .35rem .9rem .35rem 0; min-width: 110px; }
.chain-step + .chain-step { padding-left: 1rem; }
.chain-step + .chain-step::before {
  content: ""; position: absolute; left: -.2rem; top: 50%; width: 1rem; height: 2px; background: var(--aqua);
}
.chain-step + .chain-step::after {
  content: ""; position: absolute; left: .6rem; top: calc(50% - 3px); width: 8px; height: 8px; border-radius: 50%; background: var(--aqua);
}
.chain-label { font-size: .75rem; color: var(--muted); }
.chain-value { font-family: var(--font); font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.chain-step.final .chain-value { background: var(--yellow-soft); box-shadow: inset 0 -3px 0 var(--yellow); padding: 0 .25rem; }

/* ---------- precios en editor de producto ---------- */
.price-row { border: 1px solid var(--line); border-radius: 8px; padding: .85rem; margin-bottom: .75rem; }
.price-row.pref { border-color: var(--aqua); box-shadow: inset 3px 0 0 var(--aqua); }
.price-row .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.row-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }

/* ---------- partidas ---------- */
.lines td { vertical-align: top; }
.lines textarea { min-height: 76px; }
.lines input { min-width: 80px; }
.line-meta { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.totals { margin-left: auto; width: min(320px, 100%); }
.totals div { display: flex; justify-content: space-between; padding: .3rem 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .5rem; font-family: var(--font); font-weight: 600; font-size: 1.2rem; }


/* ---------- condiciones de la cotización ---------- */
.cond-list { display: grid; gap: .5rem; }
.cond-row { display: flex; align-items: center; gap: .65rem; }
.cond-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; flex: none; margin: 0; cursor: pointer; }
.cond-row .cond-text { flex: 1; min-width: 0; }
.cond-row.off .cond-text { opacity: .5; text-decoration: line-through; }
.cond-row .cond-tag { flex: none; font-size: .78rem; opacity: .6; }
.cond-row .ghost { flex: none; }
.cond-actions { margin-top: .85rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

@media (max-width: 760px) {
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .lines td { border: none; padding: 0; }
  .lines td.l-desc { grid-column: 1 / -1; }
  .lines td.l-n { display: none; }
  .lines td.l-del { grid-column: 2; justify-self: end; }
  .lines td[data-l]::before { content: attr(data-l); display: block; font-size: .75rem; color: var(--muted); }
}
