/* ===== Cotizaciones "pro": tablero de flujo, barra de etapas y matriz comparativa ===== */
/* Todo cuelga de variables del tema (Keen): funciona igual en claro y en oscuro. */

.cx { --cx-cotizando: var(--bs-primary); --cx-autorizar: var(--bs-warning); --cx-autorizada: var(--bs-success); --cx-generada: var(--bs-gray-600); }

/* ---------- Barra superior: buscador, filtros y selector de vista ---------- */
.cx-modos { display: inline-flex; padding: 3px; border-radius: .6rem; background: var(--bs-gray-100); gap: 2px; }
.cx-modos a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: .45rem; font-size: .78rem; font-weight: 600; color: var(--bs-gray-600); text-decoration: none; transition: background .18s, color .18s, box-shadow .18s; }
.cx-modos a:hover { color: var(--bs-gray-900); }
.cx-modos a.activo { background: var(--bs-body-bg); color: var(--bs-primary); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

/* ---------- Tablero: una columna por etapa del flujo ---------- */
.cx-tablero { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: .9rem; overflow-x: auto; padding: .2rem .1rem .8rem; scroll-snap-type: x proximity; }
.cx-col { --acento: var(--bs-gray-400); scroll-snap-align: start; display: flex; flex-direction: column; min-width: 250px; border-radius: .75rem; background: var(--bs-gray-100); border-top: 3px solid var(--acento); animation: rep-entra .4s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
.cx-col.cotizando { --acento: var(--cx-cotizando); }
.cx-col.por_autorizar { --acento: var(--cx-autorizar); }
.cx-col.autorizada { --acento: var(--cx-autorizada); }
.cx-col.generada { --acento: var(--cx-generada); }
/* Lo que espera la decision de quien mira (super admin) o su accion (generar) late suave. */
.cx-col.tu-turno { box-shadow: 0 0 0 2px rgba(var(--bs-warning-rgb), .45); }
.cx-col-cab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .85rem .15rem; }
.cx-col-tit { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .82rem; color: var(--bs-gray-800); }
.cx-col-tit i { color: var(--acento); font-size: 1rem; }
.cx-col-n { min-width: 22px; padding: .05rem .45rem; border-radius: 1rem; background: var(--bs-body-bg); color: var(--bs-gray-700); font-size: .72rem; font-weight: 700; text-align: center; }
.cx-col-sub { padding: 0 .85rem .55rem; font-size: .7rem; color: var(--bs-gray-500); }
.cx-col-cuerpo { display: flex; flex-direction: column; gap: .5rem; padding: 0 .55rem .65rem; max-height: 64vh; overflow-y: auto; }
.cx-vacio { padding: 1.4rem .5rem; text-align: center; font-size: .75rem; color: var(--bs-gray-500); border: 1px dashed var(--bs-gray-300); border-radius: .55rem; }
.cx-mas { display: block; text-align: center; padding: .35rem; font-size: .74rem; font-weight: 600; color: var(--bs-primary); text-decoration: none; }

.cx-tarjeta { display: block; padding: .6rem .7rem; border-radius: .6rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-left: 3px solid transparent; color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; animation: rep-entra .35s ease both; animation-delay: calc(var(--j, 0) * 45ms); }
.cx-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .1); border-color: var(--acento); }
.cx-tarjeta.urgente { border-left-color: var(--bs-danger); }
.cx-t-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .68rem; color: var(--bs-gray-500); }
.cx-t-folio { font-family: var(--bs-font-monospace, monospace); letter-spacing: .02em; }
.cx-t-urg { color: var(--bs-danger); font-weight: 800; text-transform: uppercase; font-size: .62rem; }
.cx-t-tit { margin: .2rem 0 .3rem; font-weight: 700; font-size: .84rem; line-height: 1.25; color: var(--bs-gray-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-t-meta { display: flex; flex-wrap: wrap; gap: .15rem .6rem; font-size: .7rem; color: var(--bs-gray-600); }
.cx-t-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.cx-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .45rem; border-radius: .4rem; font-size: .66rem; font-weight: 700; background: var(--bs-gray-100); color: var(--bs-gray-700); }
.cx-chip.requisicion { background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
.cx-chip.reparacion { background: rgba(var(--bs-info-rgb), .14); color: var(--bs-info); }
.cx-t-pie { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .45rem; padding-top: .4rem; border-top: 1px dashed var(--bs-gray-300); }
.cx-t-monto { font-weight: 800; font-size: .86rem; color: var(--bs-gray-900); white-space: nowrap; }
.cx-t-ref { font-size: .68rem; color: var(--bs-gray-500); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-t-ref.ok { color: var(--bs-success); font-weight: 700; }
.cx-t-accion { margin-top: .4rem; font-size: .7rem; font-weight: 700; color: var(--bs-primary); }

.cx-cerradas { margin-top: .4rem; border: 1px solid var(--bs-border-color); border-radius: .7rem; padding: .55rem .9rem; }
.cx-cerradas > summary { cursor: pointer; list-style: none; font-size: .8rem; font-weight: 700; color: var(--bs-gray-700); }
.cx-cerradas > summary::-webkit-details-marker { display: none; }
.cx-cerradas > summary::before { content: "▸"; display: inline-block; margin-right: .5rem; transition: transform .2s ease; color: var(--bs-gray-500); }
.cx-cerradas[open] > summary::before { transform: rotate(90deg); }
.cx-cerradas-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .5rem; margin-top: .7rem; }
.cx-cerradas .cx-tarjeta { opacity: .7; }

/* ---------- Detalle: barra de etapas del flujo ---------- */
.cx-flujo { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 1.1rem; padding: 0; list-style: none; }
.cx-paso { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; min-width: 0; padding: 0 .2rem; }
.cx-paso::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--bs-gray-300); transition: background .4s; }
.cx-paso:first-child::before { display: none; }
.cx-punto { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bs-body-bg); border: 2px solid var(--bs-gray-300); color: var(--bs-gray-500); font-size: .72rem; font-weight: 800; transition: background .4s, border-color .4s, color .4s; }
.cx-paso b { font-size: .74rem; color: var(--bs-gray-600); }
.cx-paso small { font-size: .66rem; color: var(--bs-gray-500); line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-paso.hecho .cx-punto { background: var(--bs-success); border-color: var(--bs-success); color: #fff; }
.cx-paso.hecho::before { background: var(--bs-success); }
.cx-paso.hecho b { color: var(--bs-gray-800); }
.cx-paso.actual .cx-punto { border-color: var(--bs-primary); color: var(--bs-primary); animation: rep-pulso 1.8s ease-in-out infinite; }
.cx-paso.actual b { color: var(--bs-primary); }
.cx-paso.fallo .cx-punto { background: var(--bs-danger); border-color: var(--bs-danger); color: #fff; }
.cx-paso.fallo::before { background: var(--bs-danger); }
.cx-paso.fallo b { color: var(--bs-danger); }

/* ---------- Detalle: dos columnas (comparativo | resumen y decision) ---------- */
.cx-detalle { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.1rem; align-items: start; }
.cx-lateral { display: flex; flex-direction: column; gap: .8rem; position: sticky; top: .5rem; }
.cx-panel { border: 1px solid var(--bs-border-color); border-radius: .7rem; padding: .8rem .9rem; background: var(--bs-body-bg); }
.cx-panel.decision { border-color: rgba(var(--bs-warning-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--bs-warning-rgb), .12); }
.cx-panel.ok { border-color: rgba(var(--bs-success-rgb), .55); background: rgba(var(--bs-success-rgb), .06); }
.cx-panel.mal { border-color: rgba(var(--bs-danger-rgb), .5); background: rgba(var(--bs-danger-rgb), .05); }
.cx-panel h5 { margin: 0 0 .5rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-gray-600); }
.cx-datos { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0; font-size: .78rem; }
.cx-datos dt { color: var(--bs-gray-500); font-weight: 600; }
.cx-datos dd { margin: 0; color: var(--bs-gray-900); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ---------- Matriz comparativa: una fila por proveedor, con barra de precio ---------- */
.cx-matriz-cab, .cx-fila { display: grid; grid-template-columns: 26px minmax(130px, 1.2fr) minmax(150px, 1.5fr) 92px minmax(70px, .6fr) auto; align-items: center; gap: .5rem .9rem; }
.cx-matriz-cab { padding: 0 .6rem .4rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-gray-500); }
.cx-fila { position: relative; padding: .7rem .6rem; border-radius: .6rem; border: 1px solid transparent; transition: background .16s, border-color .16s, opacity .2s; animation: rep-entra .35s ease both; animation-delay: calc(var(--i, 0) * 55ms); }
.cx-fila + .cx-fila { margin-top: .3rem; }
.cx-fila:hover { background: var(--bs-gray-100); }
.cx-fila.mejor { border-color: rgba(var(--bs-success-rgb), .4); background: rgba(var(--bs-success-rgb), .05); }
.cx-fila.elegida { border-color: var(--bs-success); background: rgba(var(--bs-success-rgb), .1); }
.cx-fila.descartada > * { opacity: .45; }
.cx-fila label { cursor: pointer; margin: 0; }
.cx-prov { min-width: 0; }
.cx-prov b { display: block; font-size: .86rem; color: var(--bs-gray-900); overflow-wrap: anywhere; }
.cx-prov small { display: block; font-size: .7rem; color: var(--bs-gray-500); }
.cx-prov .inc { font-size: .72rem; color: var(--bs-gray-700); }
.cx-precio { min-width: 0; }
.cx-precio b { font-size: .95rem; font-weight: 800; color: var(--bs-gray-900); }
.cx-barra { height: 6px; margin-top: .3rem; border-radius: 4px; background: var(--bs-gray-200); overflow: hidden; }
.cx-barra span { display: block; height: 100%; width: var(--w, 100%); border-radius: 4px; background: var(--bs-primary); transform-origin: left; animation: cx-crece .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
.cx-fila.mejor .cx-barra span, .cx-fila.elegida .cx-barra span { background: var(--bs-success); }
@keyframes cx-crece { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cx-delta { font-size: .74rem; font-weight: 700; color: var(--bs-gray-600); white-space: nowrap; }
.cx-delta.mejor { color: var(--bs-success); }
.cx-entrega { font-size: .76rem; color: var(--bs-gray-700); }
.cx-acc { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.cx-marca { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .4rem; border-radius: .4rem; font-size: .62rem; font-weight: 800; text-transform: uppercase; vertical-align: middle; }
.cx-marca.mejor { background: rgba(var(--bs-success-rgb), .15); color: var(--bs-success); }
.cx-marca.elegida { background: var(--bs-success); color: #fff; }

@media (max-width: 991px) {
    .cx-detalle { grid-template-columns: 1fr; }
    .cx-lateral { position: static; }
    .cx-matriz-cab { display: none; }
    .cx-fila { grid-template-columns: 26px 1fr auto; }
    .cx-fila .cx-precio { grid-column: 2 / 4; }
    .cx-fila .cx-delta, .cx-fila .cx-entrega { grid-column: 2; }
    .cx-flujo { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .cx-col, .cx-tarjeta, .cx-fila, .cx-barra span, .cx-paso.actual .cx-punto { animation: none; }
    .cx-tarjeta, .cx-punto, .cx-paso::before { transition: none; }
}

/* ---------- Panel de dos tarjetas: listado | opciones de la elegida ---------- */
.cx-dos { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1rem; align-items: start; }
.cx-izq, .cx-der { border: 1px solid var(--bs-border-color); box-shadow: none; animation: rep-entra .4s ease both; }
.cx-der { animation-delay: 90ms; min-height: 340px; }
.cx-izq { position: sticky; top: .5rem; max-height: calc(100vh - 7rem); display: flex; flex-direction: column; }
.cx-card-cab { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem .4rem; }
.cx-card-cab h3 { margin: 0; font-size: .95rem; font-weight: 800; color: var(--bs-gray-900); }
.cx-items { overflow-y: auto; padding: 0 .5rem .6rem; flex: 1; }
/* Grupos por etapa: un encabezado discreto con una linea, sin contadores ni pestañas. */
.cx-grupo + .cx-grupo, .cx-grupo + details.cx-grupo, details.cx-grupo + details.cx-grupo { margin-top: .5rem; }
.cx-grupo-tit { display: flex; align-items: center; gap: .6rem; padding: .55rem .5rem .3rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--bs-gray-500); list-style: none; }
.cx-grupo-tit::after { content: ""; flex: 1; height: 1px; background: var(--bs-border-color); }
details.cx-grupo > summary { cursor: pointer; }
details.cx-grupo > summary::-webkit-details-marker { display: none; }
details.cx-grupo > summary::before { content: "▸"; display: inline-block; font-size: .7rem; transition: transform .2s ease; }
details.cx-grupo[open] > summary::before { transform: rotate(90deg); }
details.cx-grupo > summary:hover { color: var(--bs-gray-800); }
details.cx-grupo:not([open]) .cx-item { display: none; }
.cx-item { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .6rem .6rem; border-radius: .6rem; border: 1px solid transparent; color: inherit; text-decoration: none; transition: background .15s, border-color .15s; animation: rep-entra .3s ease both; animation-delay: calc(var(--j, 0) * 30ms); }
.cx-item + .cx-item { margin-top: .15rem; }
.cx-item:hover { background: var(--bs-gray-100); }
.cx-item.activo { background: rgba(var(--bs-primary-rgb), .08); border-color: rgba(var(--bs-primary-rgb), .35); }
.cx-item.urgente::after { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--bs-danger); }
.cx-estado { width: 9px; height: 9px; border-radius: 50%; }
.cx-item-main { min-width: 0; }
.cx-item-main > b { display: block; font-size: .84rem; color: var(--bs-gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-item-main > small { display: block; font-size: .68rem; color: var(--bs-gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-item-estado { color: var(--bs-gray-600) !important; font-weight: 600; }
.cx-item-der { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.cx-nop { display: inline-flex; align-items: baseline; gap: .25rem; padding: .05rem .5rem; border-radius: .5rem; background: var(--bs-gray-100); color: var(--bs-gray-800); font-weight: 800; font-size: .85rem; }
.cx-nop small { font-size: .62rem; font-weight: 600; color: var(--bs-gray-500); }
.cx-item.activo .cx-nop { background: var(--bs-primary); color: #fff; }
.cx-item.activo .cx-nop small { color: rgba(255, 255, 255, .85); }
.cx-item-monto { font-size: .7rem; color: var(--bs-gray-600); white-space: nowrap; }
.cx-item-monto.ok { color: var(--bs-success); font-weight: 700; }
.cx-pie { padding: .5rem 1rem; border-top: 1px solid var(--bs-border-color); }

/* Tarjeta derecha: el detalle se adapta al ancho de la tarjeta, no al de la pantalla. */
.cx-panel-det { container-type: inline-size; padding: 1.1rem 1.2rem; transition: opacity .18s ease; }
.cx-panel-det.cargando { opacity: .45; pointer-events: none; }
@container (max-width: 820px) {
    /* Resumen y decision pasan debajo del comparativo, que conserva su formato de tabla. */
    .cx-panel-det .cx-detalle { grid-template-columns: 1fr; }
    .cx-panel-det .cx-lateral { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@container (max-width: 620px) {
    .cx-panel-det .cx-matriz-cab { display: none; }
    .cx-panel-det .cx-fila { grid-template-columns: 26px 1fr auto; }
    .cx-panel-det .cx-fila .cx-precio { grid-column: 2 / 4; }
    .cx-panel-det .cx-fila .cx-delta, .cx-panel-det .cx-fila .cx-entrega { grid-column: 2; }
}
@media (max-width: 1100px) {
    .cx-dos { grid-template-columns: 1fr; }
    .cx-izq { position: static; max-height: 420px; }
}
@media (prefers-reduced-motion: reduce) { .cx-izq, .cx-der, .cx-item { animation: none; } .cx-panel-det { transition: none; } }

/* ---------- Modo "Flujo": lista plana con mini-flujo por fila ---------- */
.cx-item-flujo { grid-template-columns: minmax(0, 1fr); padding: .65rem .7rem; }
.cx-fl-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.cx-fl-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--bs-gray-900); }
.cx-fl-top .cx-t-folio { font-size: .64rem; color: var(--bs-gray-500); }
.cx-mini { display: flex; align-items: center; margin: .4rem 0 .3rem; }
.cx-mini i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--bs-body-bg); border: 2px solid var(--bs-gray-300); transition: background .3s, border-color .3s; }
.cx-mini s { flex: none; width: 26px; height: 2px; background: var(--bs-gray-300); text-decoration: none; transition: background .3s; }
.cx-mini i.hecho { background: var(--bs-success); border-color: var(--bs-success); }
.cx-mini s.hecho { background: var(--bs-success); }
.cx-mini i.actual { border-color: var(--bs-primary); animation: rep-pulso 1.8s ease-in-out infinite; }
.cx-mini i.fallo { background: var(--bs-danger); border-color: var(--bs-danger); }
.cx-mini-txt { margin-left: .6rem; font-size: .68rem; font-weight: 700; color: var(--bs-gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-item-flujo .cx-item-main small { white-space: normal; }
@media (prefers-reduced-motion: reduce) { .cx-mini i.actual { animation: none; } }
/* ---------- Listado por pedazos: "Cargar más" e historial ---------- */
.cx-cargar { display: block; width: 100%; margin: .4rem 0 .2rem; padding: .45rem; border: 1px dashed var(--bs-gray-300); border-radius: .6rem; background: transparent; color: var(--bs-primary); font-size: .76rem; font-weight: 700; cursor: pointer; transition: background .16s, border-color .16s; }
.cx-cargar:hover:not(:disabled) { background: rgba(var(--bs-primary-rgb), .06); border-color: var(--bs-primary); }
.cx-cargar:disabled { color: var(--bs-gray-500); cursor: progress; }
.cx-items > .cx-grupo-tit:first-child { padding-top: .2rem; }
.cx-historial { margin-top: .8rem; }
.cx-card-cab .fs-9 { font-size: .68rem; }

/* Selector En trámite | Historial (encabezado de la tarjeta del listado) */
.cx-seg { display: inline-flex; padding: 3px; border-radius: .6rem; background: var(--bs-gray-100); gap: 2px; }
.cx-seg button { border: 0; background: transparent; padding: .28rem .8rem; border-radius: .45rem; font-size: .76rem; font-weight: 700; color: var(--bs-gray-600); cursor: pointer; transition: background .18s, color .18s, box-shadow .18s; }
.cx-seg button:hover { color: var(--bs-gray-900); }
.cx-seg button.activo { background: var(--bs-body-bg); color: var(--bs-primary); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.cx-items { transition: opacity .18s ease; }
/* ---------- Decision rapida: una recomendacion y dos botones; lo demas plegado ---------- */
.cx-decidir { max-width: 620px; }
.cx-reco { padding: 1rem 1.2rem; border-radius: .9rem; border: 1.5px solid rgba(var(--bs-success-rgb), .55); background: rgba(var(--bs-success-rgb), .07); margin-bottom: 1rem; }
.cx-reco-tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-success); }
.cx-reco-prov { margin-top: .25rem; font-size: 1.1rem; font-weight: 700; color: var(--bs-gray-900); overflow-wrap: anywhere; }
.cx-reco-monto { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--bs-gray-900); letter-spacing: -.01em; }
.cx-reco-sub { margin-top: .25rem; min-height: 1.1em; font-size: .8rem; color: var(--bs-gray-600); }
.cx-aceptar { min-height: 44px; font-weight: 800; }
.cx-rechazo { min-width: 140px; }
.cx-rechazo > summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cx-rechazo > summary::-webkit-details-marker { display: none; }
.cx-pleg { border-top: 1px solid var(--bs-border-color); padding-top: .7rem; }
.cx-pleg > summary { cursor: pointer; list-style: none; font-size: .78rem; font-weight: 700; color: var(--bs-gray-600); }
.cx-pleg > summary::-webkit-details-marker { display: none; }
.cx-pleg > summary::before { content: "▸"; display: inline-block; margin-right: .5rem; transition: transform .2s ease; }
.cx-pleg[open] > summary::before { transform: rotate(90deg); }
.cx-pleg > summary:hover { color: var(--bs-primary); }
.cx-pleg[open] > :not(summary) { animation: rep-entra .28s ease both; }
.cx-op { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px auto; align-items: center; gap: .8rem; padding: .6rem .5rem; border-radius: .6rem; cursor: pointer; transition: background .15s; }
.cx-op:hover { background: var(--bs-gray-100); }
.cx-op + .cx-op { margin-top: .1rem; }
.cx-op-prov { font-size: .85rem; font-weight: 700; color: var(--bs-gray-900); overflow-wrap: anywhere; }
.cx-op-prov small { display: block; font-size: .7rem; font-weight: 400; color: var(--bs-gray-500); }
.cx-op-precio b { display: block; font-size: .88rem; color: var(--bs-gray-900); }
.cx-op-precio .cx-barra { margin-top: .2rem; }
@media (max-width: 560px) { .cx-op { grid-template-columns: auto 1fr; } .cx-op-precio { grid-column: 2; } }
/* ---------- Fila minima del listado: titulo, una linea de apoyo y un solo dato a la derecha ---------- */
.cx-item-simple { grid-template-columns: 10px minmax(0, 1fr) auto; padding: .55rem .6rem; }
.cx-item-simple .cx-item-monto { font-size: .8rem; font-weight: 700; color: var(--bs-gray-800); }
.cx-item-simple .cx-item-monto.ok { color: var(--bs-success); }
.cx-fl-top .cx-item-monto { font-size: .8rem; font-weight: 700; color: var(--bs-gray-800); white-space: nowrap; }
.cx-fl-top .cx-item-monto.ok { color: var(--bs-success); }

/* ---------- Conceptos de una opcion (refacciones, mano de obra...) ---------- */
.cx-concepto { display: grid; grid-template-columns: minmax(0, 1fr) 150px 34px; gap: .5rem; margin-bottom: .4rem; animation: rep-entra .25s ease both; }
.cx-conceptos { display: block; margin-top: .15rem; font-size: .7rem; color: var(--bs-gray-600); }
@media (max-width: 560px) { .cx-concepto { grid-template-columns: 1fr 110px 34px; } }
/* Productos de una cotizacion de requisicion */
.cx-prod { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto auto 32px; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--bs-gray-200, #eff2f5); }
.cx-prod-n { display: flex; flex-direction: column; min-width: 0; }
.cx-prod-n b { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-prod-u { color: var(--bs-gray-600, #78829d); font-size: .75rem; }
.cx-precios .cx-prod { grid-template-columns: minmax(0, 1fr) auto 130px; }
/* ---------- Franja de etapas: un vistazo a cuantas cotizaciones hay en cada paso ---------- */
.cx-franja { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .1rem 0 .2rem; }
.cx-etapa { --acento: var(--bs-gray-500); position: relative; display: flex; align-items: center; gap: .65rem; padding: .5rem .75rem; border-radius: .7rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); overflow: hidden; animation: rep-entra .4s ease both; animation-delay: calc(var(--i, 0) * 70ms); transition: border-color .3s, box-shadow .3s, transform .2s; }
.cx-etapa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acento); transition: background .3s; }
.cx-etapa:hover { transform: translateY(-1px); border-color: var(--acento); }
.cx-etapa.cotizando { --acento: var(--cx-cotizando); }
.cx-etapa.por_autorizar { --acento: var(--cx-autorizar); }
.cx-etapa.autorizada { --acento: var(--cx-autorizada); }
.cx-etapa.generada { --acento: var(--cx-generada); }
.cx-etapa-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: .55rem; background: color-mix(in srgb, var(--acento) 14%, transparent); color: var(--acento); font-size: 1rem; }
.cx-etapa-ico i { color: inherit; font-size: 1.05rem; }
.cx-etapa-txt { min-width: 0; line-height: 1.1; }
.cx-etapa-txt b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--bs-gray-900); font-variant-numeric: tabular-nums; }
.cx-etapa-txt small { display: block; font-size: .68rem; font-weight: 600; color: var(--bs-gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Lo que espera a quien mira late; al cambiar un numero, "salta". */
.cx-etapa.turno { border-color: var(--acento); animation: rep-entra .4s ease both, cx-latido 2.2s ease-in-out .6s infinite; animation-delay: calc(var(--i, 0) * 70ms), .6s; }
.cx-etapa.turno .cx-etapa-ico { background: var(--acento); color: #fff; }
.cx-etapa.cambio .cx-etapa-txt b { animation: cx-salta .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes cx-latido { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acento) 45%, transparent); } 60% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--acento) 0%, transparent); } }
@keyframes cx-salta { 0% { transform: scale(1); } 35% { transform: scale(1.5); color: var(--acento); } 100% { transform: scale(1); } }
@media (max-width: 767px) { .cx-franja { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Listado: barra de color por etapa en lugar del punto, y un empujoncito al pasar el cursor ---------- */
.cx-item-simple { grid-template-columns: 4px minmax(0, 1fr) auto; gap: .7rem; }
.cx-item-simple .cx-estado { width: 4px; height: 30px; border-radius: 3px; transition: height .2s ease, transform .2s ease; }
.cx-item-simple:hover { transform: translateX(2px); }
.cx-item-simple:hover .cx-estado, .cx-item-simple.activo .cx-estado { height: 38px; }
.cx-item { transition: background .15s, border-color .15s, transform .18s ease; }
.cx-item.activo { box-shadow: 0 2px 10px rgba(var(--bs-primary-rgb), .12); }
.cx-izq, .cx-der { border-radius: .85rem; }
.cx-card-cab h3 { font-size: .9rem; }
@media (prefers-reduced-motion: reduce) {
    .cx-etapa, .cx-etapa.turno { animation: none; }
    .cx-etapa.cambio .cx-etapa-txt b { animation: none; }
    .cx-item-simple:hover, .cx-etapa:hover { transform: none; }
}


/* ---------- Taller o proveedor: select con buscador (select2) dentro del formulario de opciones ---------- */
.cx-prov-sel { position: relative; }
.cx-prov-sel .select2-container { width: 100% !important; }
.cx-prov-sel .select2-dropdown { z-index: 1060; }
/* Pie de la lista de proveedores: la accion de dar de alta uno nuevo, siempre a la mano */
.cx-prov-sel .select2-dropdown { overflow: hidden; border-radius: .6rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); animation: rep-entra .18s ease both; }
.cx-prov-pie { border-top: 1px solid var(--bs-border-color); background: var(--bs-gray-100); }
.cx-prov-pie button { display: flex; align-items: center; gap: .45rem; width: 100%; padding: .55rem .75rem; border: 0; background: transparent; color: var(--bs-primary); font-size: .8rem; font-weight: 700; text-align: left; cursor: pointer; transition: background .15s, padding-left .15s; }
.cx-prov-pie button:hover, .cx-prov-pie button:focus-visible { background: rgba(var(--bs-primary-rgb), .1); padding-left: 1rem; outline: 0; }
.cx-prov-pie button i { color: inherit; }
.cx-prov-pie-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cx-prov-sel .select2-dropdown { animation: none; } .cx-prov-pie button { transition: none; } }

/* El formulario de opciones abierto va por encima del panel lateral (Resumen / Siguiente paso): la lista de proveedores se desborda sobre el. */
.cx-panel-det details.req-accion[open] { position: relative; z-index: 30; }

/* ---------- Listado en grupos plegables: abiertos los que piden accion, cerrados (con conteo) los demas ---------- */
details.cx-grupo > summary.cx-grupo-tit { cursor: pointer; border-radius: .5rem; transition: background .15s, color .15s; }
details.cx-grupo > summary.cx-grupo-tit:hover { background: var(--bs-gray-100); }
details.cx-grupo > summary.cx-grupo-tit > span { white-space: nowrap; }
.cx-grupo-n { min-width: 20px; padding: .02rem .4rem; border-radius: 1rem; background: var(--bs-gray-200); color: var(--bs-gray-700); font-size: .66rem; font-weight: 800; text-align: center; letter-spacing: 0; order: 3; }
details.cx-grupo[open] > summary .cx-grupo-n { background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
details.cx-grupo > summary.cx-grupo-tit::after { order: 2; }
details.cx-grupo[open] > :not(summary) { animation: rep-entra .25s ease both; }
.cx-oculto { display: none; }
.cx-ver-mas { display: block; width: 100%; margin: .15rem 0 .25rem; padding: .35rem; border: 1px dashed var(--bs-gray-300); border-radius: .55rem; background: transparent; color: var(--bs-primary); font-size: .72rem; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.cx-ver-mas:hover { background: rgba(var(--bs-primary-rgb), .06); border-color: var(--bs-primary); }
@media (prefers-reduced-motion: reduce) { details.cx-grupo[open] > :not(summary) { animation: none; } }

/* ---------- Etapas como pestañas del listado ---------- */
button.cx-etapa { font: inherit; text-align: left; cursor: pointer; width: 100%; }
button.cx-etapa:focus-visible { outline: 2px solid rgba(var(--bs-primary-rgb), .5); outline-offset: 2px; }
.cx-etapa.activa { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 8%, var(--bs-body-bg)); box-shadow: 0 2px 10px color-mix(in srgb, var(--acento) 18%, transparent); }
.cx-etapa.activa .cx-etapa-ico { background: var(--acento); color: #fff; }
.cx-etapa.activa .cx-etapa-txt small { color: var(--bs-gray-900); }

/* Filas del listado: una sola linea de titulo, apoyo discreto y el monto a la derecha */
.cx-item-simple { padding: .7rem .75rem; }
.cx-item-simple .cx-item-main > b { font-size: .86rem; }
.cx-item-simple .cx-item-monto { font-size: .82rem; }

/* =====================================================================================================================
   Cotizaciones: lista en lineas + panel lateral (vista por defecto)
   ===================================================================================================================== */
.cx-lista { padding: .25rem 0 1rem; }
.cx-barra-lista { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.cx-buscar-lista { flex: 1 1 260px; max-width: 420px; }

/* Pildoras: filtros por etapa, con un punto de color y su conteo */
.cx-pildoras { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: 1rem; transition: opacity .2s; }
.cx-pildoras.apagadas { opacity: .45; }
.cx-pildora { --c: var(--bs-gray-500); display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .75rem; border-radius: 2rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-gray-700); font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s; animation: rep-entra .35s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.cx-pildora i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cx-pildora b { min-width: 18px; padding: 0 .35rem; border-radius: 1rem; background: var(--bs-gray-100); color: var(--bs-gray-700); font-size: .68rem; font-weight: 800; text-align: center; transition: background .18s, color .18s; }
.cx-pildora.cotizando { --c: var(--bs-primary); }
.cx-pildora.por_autorizar { --c: var(--bs-warning); }
.cx-pildora.autorizada { --c: var(--bs-success); }
.cx-pildora.generada { --c: var(--bs-info); }
.cx-pildora:hover { border-color: var(--c); transform: translateY(-1px); color: var(--bs-gray-900); }
.cx-pildora.vacia { opacity: .55; }
.cx-pildora.activa { background: var(--bs-gray-900); border-color: var(--bs-gray-900); color: var(--bs-body-bg); box-shadow: 0 4px 12px rgba(0, 0, 0, .16); opacity: 1; transform: none; }
.cx-pildora.activa b { background: rgba(255, 255, 255, .22); color: inherit; }
.cx-pildora.suave { border-style: dashed; color: var(--bs-gray-600); font-weight: 600; }
.cx-pildora.suave.activa { border-style: solid; }
.cx-pildoras-sep { width: 1px; height: 18px; margin: 0 .25rem; background: var(--bs-border-color); }

/* Una linea por cotizacion */
.cx-lineas { display: flex; flex-direction: column; border: 1px solid var(--bs-border-color); border-radius: .85rem; overflow: hidden; background: var(--bs-body-bg); }
.cx-linea { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) 84px minmax(110px, 150px) 38px 86px; align-items: center; gap: .9rem; padding: .7rem 1rem; color: inherit; text-decoration: none; border-top: 1px solid var(--bs-border-color); transition: background .15s, padding-left .18s; animation: rep-entra .3s ease both; animation-delay: calc(var(--j, 0) * 30ms); }
.cx-linea:first-child { border-top: 0; }
.cx-linea:hover { background: var(--bs-gray-100); padding-left: 1.2rem; }
.cx-linea.urgente::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bs-danger); }
.cx-linea-punto { width: 9px; height: 9px; border-radius: 50%; }
.cx-linea-tit { min-width: 0; line-height: 1.25; }
.cx-linea-tit b { display: block; font-size: .88rem; color: var(--bs-gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-linea-tit small { display: block; font-size: .7rem; color: var(--bs-gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-linea-folio { font-family: var(--bs-font-monospace, monospace); letter-spacing: .02em; }
.cx-linea-estado { font-weight: 700; color: var(--bs-gray-700); }
.cx-urg { margin-left: .5rem; padding: .02rem .4rem; border-radius: .35rem; background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); font-size: .6rem; font-style: normal; font-weight: 800; text-transform: uppercase; vertical-align: middle; }
.cx-linea-ops { font-size: .72rem; color: var(--bs-gray-600); white-space: nowrap; }
.cx-linea-monto { text-align: right; font-size: .86rem; font-weight: 800; color: var(--bs-gray-900); white-space: nowrap; line-height: 1.2; }
.cx-linea-monto small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: .66rem; font-weight: 600; color: var(--bs-gray-500); }
.cx-linea-monto.ok { color: var(--bs-success); }
.cx-linea-edad { font-size: .7rem; color: var(--bs-gray-500); text-align: right; white-space: nowrap; }
.cx-linea-accion { display: inline-flex; align-items: center; justify-content: flex-end; gap: .15rem; font-size: .76rem; font-weight: 700; color: var(--bs-primary); opacity: .55; transition: opacity .15s, gap .15s; }
.cx-linea:hover .cx-linea-accion { opacity: 1; gap: .4rem; }
.cx-linea-accion i { color: inherit; }
.cx-vacio-lista { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 3rem 1rem; text-align: center; color: var(--bs-gray-500); font-size: .85rem; }
@media (max-width: 767px) {
    .cx-linea { grid-template-columns: 10px minmax(0, 1fr) auto; gap: .6rem; }
    .cx-linea-ops, .cx-linea-edad { display: none; }
    .cx-linea-accion { grid-column: 2 / 4; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .cx-pildora, .cx-linea { animation: none; transition: none; } .cx-linea:hover { padding-left: 1rem; } }

/* Panel lateral con el detalle (se desliza desde la derecha) */
.cx-cajon { --bs-offcanvas-width: min(820px, 96vw); }
.cx-cajon .offcanvas-header { padding: .8rem 1.1rem; border-bottom: 1px solid var(--bs-border-color); }
.cx-cajon .offcanvas-title { font-size: 1rem; font-weight: 800; }
.cx-cajon .offcanvas-body { padding: 1.1rem 1.2rem; }
.cx-cajon .cx-panel-det { padding: 0; }

/* ---------- Lista unica (sin filtros por etapa) ---------- */
.cx-barra-lista { justify-content: space-between; }
.cx-barra-form { display: flex; flex: 1 1 360px; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.cx-barra-acciones { display: flex; align-items: center; gap: .5rem; }
.cx-titulo-lista { margin: 0 0 .6rem .15rem; font-size: .95rem; font-weight: 800; color: var(--bs-gray-900); }
.cx-linea { grid-template-columns: 10px minmax(0, 1fr) 130px minmax(110px, 150px) 86px; }
.cx-linea-estado-txt { font-size: .74rem; font-weight: 700; white-space: nowrap; text-align: right; }
@media (max-width: 767px) { .cx-linea { grid-template-columns: 10px minmax(0, 1fr) auto; } .cx-linea-estado-txt { display: none; } }

/* =====================================================================================================================
   Cotizaciones estilo "Bidding" de Keen: tarjeta destacada + tarjetas con la comparacion de ofertas en miniatura
   ===================================================================================================================== */
.cx-encabezado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.cx-sub { font-size: .85rem; font-weight: 600; color: var(--bs-gray-600); }
.cx-barra-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cx-barra-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; flex: 0 1 auto; }
.cx-buscar-lista { flex: 0 1 280px; min-width: 200px; }
.cx-titulo-seccion { margin: 1.4rem 0 .7rem .1rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-gray-500); }

/* Chips y etiquetas */
.cx-estado-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .6rem; border-radius: 2rem; background: color-mix(in srgb, var(--c, var(--bs-gray-500)) 13%, transparent); color: var(--c, var(--bs-gray-600)); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.cx-estado-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cx-estado-chip.primary { --c: var(--bs-primary); } .cx-estado-chip.warning { --c: #b78100; } .cx-estado-chip.success { --c: var(--bs-success); }
.cx-estado-chip.info { --c: #7239ea; } .cx-estado-chip.danger { --c: var(--bs-danger); } .cx-estado-chip.secondary { --c: var(--bs-gray-600); }
.cx-urg-chip { padding: .12rem .5rem; border-radius: .4rem; background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); font-size: .62rem; font-weight: 800; text-transform: uppercase; }

/* Tarjeta destacada */
.cx-destacada { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 1.5rem; padding: 1.4rem 1.5rem; margin-bottom: .5rem; border: 1px solid var(--bs-border-color); box-shadow: none; animation: rep-entra .4s ease both; }
.cx-kicker { margin-bottom: .6rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-gray-500); }
.cx-dest-tit { margin: 0 0 1rem; font-size: 1.45rem; font-weight: 800; line-height: 1.2; color: var(--bs-gray-900); overflow-wrap: anywhere; }
.cx-dest-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.2rem; margin: 0; }
.cx-dest-datos dt { font-size: .66rem; font-weight: 700; color: var(--bs-gray-500); }
.cx-dest-datos dd { margin: 0; font-size: .82rem; font-weight: 700; color: var(--bs-gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-dest-oferta { display: flex; flex-direction: column; gap: .9rem; }
.cx-oferta-caja { padding: 1.1rem 1.2rem; border: 1px solid var(--bs-border-color); border-radius: .9rem; text-align: center; background: color-mix(in srgb, var(--bs-success) 5%, var(--bs-body-bg)); }
.cx-oferta-etq { font-size: .72rem; font-weight: 700; color: var(--bs-gray-600); }
.cx-oferta-monto { margin: .15rem 0; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--bs-gray-900); font-variant-numeric: tabular-nums; }
.cx-oferta-prov { font-size: .85rem; font-weight: 700; color: var(--bs-success); }
.cx-oferta-n { margin-top: .35rem; font-size: .7rem; color: var(--bs-gray-500); }

/* Comparacion de ofertas en miniatura */
.cx-ofertas { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.cx-ofertas li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; }
.cx-of-prov { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; font-weight: 600; color: var(--bs-gray-700); }
.cx-of-monto { font-size: .74rem; font-weight: 800; color: var(--bs-gray-800); font-variant-numeric: tabular-nums; }
.cx-of-barra { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--bs-gray-200); overflow: hidden; }
.cx-of-barra i { display: block; height: 100%; border-radius: 4px; background: var(--bs-gray-400); transform-origin: left; animation: cx-crece .7s cubic-bezier(.2, .8, .2, 1) both; }
.cx-ofertas li.mejor .cx-of-prov, .cx-ofertas li.mejor .cx-of-monto { color: var(--bs-success); }
.cx-ofertas li.mejor .cx-of-barra i { background: var(--bs-success); }
.cx-of-mas { margin-top: .4rem; font-size: .68rem; color: var(--bs-gray-500); }
.cx-sin-ofertas { padding: .8rem; border: 1px dashed var(--bs-gray-300); border-radius: .6rem; text-align: center; font-size: .72rem; color: var(--bs-gray-500); }

/* Tarjetas */
.cx-tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cx-tarj { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.1rem; color: inherit; text-decoration: none; border: 1px solid var(--bs-border-color); box-shadow: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; animation: rep-entra .35s ease both; animation-delay: calc(var(--j, 0) * 45ms); }
.cx-tarj:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, .09); border-color: var(--bs-primary); }
.cx-tarj.urgente { border-top: 3px solid var(--bs-danger); }
.cx-tarj-top { display: flex; align-items: center; gap: .4rem; }
.cx-tarj-edad { margin-left: auto; font-size: .68rem; color: var(--bs-gray-500); }
.cx-tarj-tit { font-size: .95rem; font-weight: 800; line-height: 1.25; color: var(--bs-gray-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.cx-tarj-meta { font-size: .7rem; color: var(--bs-gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-tarj-ofertas { flex: 1; padding-top: .55rem; border-top: 1px dashed var(--bs-gray-300); }
.cx-tarj-pie { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--bs-border-color); }
.cx-tarj-pie small { display: block; font-size: .64rem; font-weight: 600; color: var(--bs-gray-500); }
.cx-tarj-pie b { font-size: 1.05rem; font-weight: 800; color: var(--bs-gray-900); font-variant-numeric: tabular-nums; }
.cx-tarj-pie b.ok { color: var(--bs-success); }
.cx-tarj-accion { display: inline-flex; align-items: center; gap: .15rem; font-size: .78rem; font-weight: 700; color: var(--bs-primary); transition: gap .15s; }
.cx-tarj:hover .cx-tarj-accion { gap: .4rem; }
@media (max-width: 1199px) { .cx-tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) { .cx-destacada { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .cx-tarjetas { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cx-destacada, .cx-tarj, .cx-of-barra i { animation: none; } .cx-tarj, .cx-tarj-accion { transition: none; } .cx-tarj:hover { transform: none; } }
.cx-barra-acciones, .cx-barra-form { flex-wrap: nowrap; }
.cx-barra-form .form-select { min-width: 190px; }
@media (max-width: 767px) { .cx-barra-acciones, .cx-barra-form { flex-wrap: wrap; } }

/* Pocas tarjetas a la vez: se acomodan al ancho (3 en una fila; 4 en las paginas sin destacada). */
.cx-tarjetas { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (min-width: 1200px) { .cx-tarjetas { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

/* =====================================================================================================================
   Modo enfoque: una cotizacion a la vez
   ===================================================================================================================== */
.cx-foco-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; margin-bottom: 1.1rem; }
.cx-foco-sel { flex: 1 1 380px; max-width: 640px; min-width: 240px; position: relative; }
.cx-foco-nav { display: inline-flex; align-items: center; gap: .4rem; }
.cx-foco-pos { min-width: 62px; text-align: center; font-size: .78rem; font-weight: 700; color: var(--bs-gray-600); font-variant-numeric: tabular-nums; }
.cx-foco { padding: 1.4rem 1.6rem; border: 1px solid var(--bs-border-color); border-radius: .95rem; background: var(--bs-body-bg); animation: rep-entra .35s ease both; }
.cx-foco .cx-panel-det { padding: 0; }
.cx-foco .select2-container { width: 100% !important; }
.cx-foco-sel .select2-dropdown { z-index: 1060; border-radius: .6rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.cx-foco-sel .select2-results__group { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-gray-500); }
@media (prefers-reduced-motion: reduce) { .cx-foco { animation: none; } }
