/* DERPE v3.4 p142 Ventas › Oportunidades (view/oportunidades.php, operability/oportunidades.js). Prefijo op-. */

.op-logo { width: 32px; }
.op-logo-movil { width: 28px; }
.op-filtro { width: auto; min-width: 9rem; }
.op-buscador { width: auto; min-width: 14rem; flex: 1 1 14rem; max-width: 24rem; }
.op-kpi [data-nota] { min-height: 1.25rem; }

/* Tablero: columnas con desplazamiento horizontal */
.op-tablero { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .75rem; align-items: flex-start; }
.op-columna { flex: 0 0 17rem; background: #f1f5f9; border-radius: .75rem; display: flex; flex-direction: column; max-height: calc(100vh - 16rem); min-height: 14rem; }
.op-columna[data-clase="ganada"] { background: #f0fdf4; }
.op-columna[data-clase="perdida"] { background: #fef2f2; }
.op-columna-cabecera { padding: .75rem .85rem .5rem; border-top: 4px solid #64748b; border-radius: .75rem .75rem 0 0; }
.op-lista { flex: 1 1 auto; overflow-y: auto; padding: .25rem .6rem .6rem; min-height: 5rem; display: flex; flex-direction: column; gap: .5rem; }
.op-tarjeta { background: #fff; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .6rem .7rem; cursor: grab; transition: box-shadow .15s; }
.op-tarjeta:hover, .op-tarjeta:focus { box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .12); outline: none; }
.op-tarjeta .op-titulo { line-height: 1.25; }
.op-fantasma { opacity: .45; }
.op-persona { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e2e8f0; color: #334155; font-size: .65rem; font-weight: 700; }
.op-anade { text-align: left; padding: .25rem .85rem .6rem; text-decoration: none; }
.op-punto { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; flex: 0 0 auto; background: #64748b; }

/* Etapas en la ventana de la oportunidad */
.op-etapas { display: flex; flex-wrap: wrap; gap: .35rem; }
.op-etapa { --op-color: #64748b; border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; }
.op-etapa:hover { border-color: var(--op-color); }
.op-etapa.activa { background: var(--op-color); border-color: var(--op-color); color: #fff; font-weight: 600; }

/* Previsión: tres barras por mes */
.op-grafica { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; height: 14rem; align-items: end; border-bottom: 1px solid #e2e8f0; padding-bottom: .25rem; }
.op-mes { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.op-barras { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.op-barra { width: 28%; max-width: 1.75rem; border-radius: 4px 4px 0 0; min-height: 0; }
.op-barra-total { background: #94a3b8; }
.op-barra-ponderado { background: #2563eb; }
.op-barra-ganado { background: #16a34a; }
.op-leyenda { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

/* Embudos y etapas */
.op-em-asa { cursor: grab; }
.op-em-nombre { flex: 1 1 10rem; min-width: 8rem; }
.op-em-clase { width: auto; }
.op-em-prob { width: 6.5rem; }
.op-em-color { width: 2.25rem; padding: .15rem; }

@media (max-width: 575.98px) {
    .op-columna { flex-basis: 85vw; }
    .op-grafica { gap: .3rem; }
    .op-filtro, .op-buscador { min-width: 0; flex: 1 1 100%; max-width: none; }
}

/* DERPE v3.4 p143 Ventas › Panel de ventas (prefijo vp-) y Objetivos (prefijo vo-). */
.vp-filtro { width: auto; min-width: 8rem; }
.vp-progreso { height: .5rem; }
.vp-progreso-fino { height: .35rem; min-width: 4rem; }
.vp-celda-cumple { min-width: 9rem; }
.vp-grafica { width: 100%; min-height: 12rem; }
.vp-grafica-baja { min-height: 10rem; }
.vp-svg { width: 100%; height: auto; display: block; overflow: visible; }
.vp-svg .vp-rejilla { stroke: #e2e8f0; stroke-width: 1; }
.vp-svg .vp-eje { fill: #64748b; font-size: 11px; font-family: Inter, system-ui, sans-serif; }
.vp-svg .vp-zona { fill: transparent; }
.vp-svg .vp-mes:hover .vp-zona { fill: rgba(148, 163, 184, .12); }
.vp-svg .vp-marca { stroke-width: 2.5; stroke-linecap: round; }
.vp-leyenda { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.vp-leyenda.vp-ganado { background: #16a34a; }
.vp-leyenda.vp-ponderado { background: #93c5fd; }
.vp-leyenda.vp-prevision { background: #2563eb; }
.vp-leyenda.vp-objetivo { background: #0f172a; height: 3px; vertical-align: 3px; }
.vp-pista { height: .6rem; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-top: .2rem; }
.vp-tramo { height: 100%; border-radius: 999px; background: #64748b; }
.vp-tramo-perdida { background: #f87171; }
.vp-lista li:last-child { border-bottom: 0 !important; }
.vo-tabla-caja { max-height: calc(100vh - 18rem); }
.vo-tabla th, .vo-tabla td { white-space: nowrap; vertical-align: top; }
.vo-tabla .vo-persona { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 11rem; }
.vo-tabla thead .vo-persona { background: #f8f9fa; }
.vo-tabla .vo-celda { width: 6.5rem; margin-left: auto; }
.vo-tabla .vo-cambiada { border-color: #2563eb; background: #eff6ff; }
.vo-tabla .vo-anual { width: 9.5rem; margin-left: auto; }
.vo-ganado { font-size: .72rem; color: #64748b; margin-top: .15rem; }
.vo-empresa > * { background: #f8fafc !important; }

/* DERPE v3.4 p144 Campos propios (assets/js/campos-propios.js, prefijo cp-): formulario por bloques y resumen de la ficha. */
.cp-bloque { border: 0; padding: 0; margin: 0; }
.cp-bloque legend { float: none; width: auto; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.cp-resumen { display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: .35rem .75rem; font-size: .875rem; }
.cp-resumen .cp-fila { display: contents; }
.cp-resumen dt { color: #64748b; font-weight: 500; }
.cp-resumen dd { margin: 0; word-break: break-word; }
.op-cp-familia { width: auto; min-width: 14rem; }

/* DERPE v3.4 p145 Gráfica de los listados agrupados del centro de informes (operability/biblioteca-repositorio.js, prefijo lst-). */
.lst-grafica-control { width: auto; }
.lst-grafica-control .form-select { min-width: 9rem; }
.lst-grafica { background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; padding: .75rem 1rem; margin: .5rem 0; }
.lst-svg { width: 100%; height: auto; display: block; }
.lst-svg .lst-rejilla { stroke: #e2e8f0; stroke-width: 1; }
.lst-svg .lst-eje { fill: #64748b; font-size: 12px; font-family: Inter, system-ui, sans-serif; }
.lst-grafica { max-width: 60rem; }
.lst-svg .lst-barra { fill: #2563eb; }
.lst-svg .lst-barra:hover { fill: #1d4ed8; }
.lst-svg .lst-barra-negativa { fill: #dc2626; }
.lst-svg .lst-linea { fill: none; stroke: #2563eb; stroke-width: 2; stroke-linejoin: round; }
.lst-svg .lst-punto { fill: #2563eb; stroke: #fff; stroke-width: 2; }
