/* Resultados por proyecto dentro de la consola: sólo lo que las clases de la consola (.card, .fila, .chip, dt-tbl, .kpi) no traen. */
#vResultados select { width: auto; }
#vResultados td.num, #rs-cot-dlg td.num, .rs-mini td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#vResultados .num { text-align: right; }
.rs-pos { color: var(--verde); }
.rs-neg { color: var(--rojo); }
.rs-ok { color: var(--verde); font-size: 13px; margin: 6px 0 0; }
.rs-aviso { color: var(--ambar); font-size: 13px; margin: 8px 0 0; }
.rs-msg { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.rs-msg.err { color: var(--rojo); }
.rs-msg.ok { color: var(--verde); }
.rs-h3 { margin: 0 0 8px; font-size: 15px; }
.rs-sub { margin-top: 10px; gap: 6px; }
.rs-sub button.on { background: hsl(var(--primary) / .14); border-color: hsl(var(--primary) / .5); font-weight: 600; }
.rs-sub-k { display: block; font-size: 12px; }
#rs-kpis { margin: 12px 0; }
.rs-cob-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0; font-size: 13px; }
.rs-p { cursor: pointer; }
.rs-p:hover td { background: hsl(var(--mutedbg)); }
.rs-mas { font-size: 12px; margin-left: 4px; }
.rs-det td { background: hsl(var(--mutedbg) / .5); }
.rs-det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; padding: 4px 0; }
.rs-det-col h4, .rs-pool h4 { margin: 0 0 6px; font-size: 13px; }
.rs-mini { font-size: 13px; }
.rs-mini td { padding: 3px 6px; }
.rs-pools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 32px; }
.rs-notas p { margin: 6px 0 0; font-size: 13px; }
.rs-off td { opacity: .55; }
.rs-acc { white-space: nowrap; text-align: right; }
#rs-cot-dlg, #rs-rep-dlg { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.rs-linea { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rs-linea select { flex: 1 1 auto; }
.rs-linea input { width: 9rem; }
.rs-pie { margin-top: 14px; }
/* Los desplegables de la consola son el widget de select.js (.sx-trigger): en una fila de filtros no se estiran. */
#vResultados .fila .sx-trigger, #vResultados .fila select { width: auto; min-width: 150px; flex: 0 1 auto; }
#rs-cot-dlg .sx-trigger, #rs-rep-dlg .sx-trigger { width: 100%; }
#rs-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
#rs-kpis b { font-size: 20px; overflow-wrap: anywhere; }
.rs-tbl th { white-space: nowrap; }
.rs-tbl td { white-space: normal; }
/* `.dt-tbl` de datos.css es de ancho fijo: aquí las tablas ocupan su caja. */
.rs-tbl, .rs-mini { width: 100%; min-width: 0; table-layout: auto; }
/* La consola limita `td > div` a 320px: el detalle de un proyecto ocupa toda su fila. */
.rs-det-grid { max-width: none; }
.rs-det-col.rs-wide { grid-column: span 2; }
.rs-mini td:first-child { min-width: 7rem; white-space: normal; }

/* ── Vista general, aviso de provisional, fondo general, cotización v2 ───────────────────────── */
.rs-banner { border-color: var(--ambar); font-size: 13px; }
.rs-banner ul { margin: 6px 0 0; padding-left: 18px; }
.rs-banner p { margin: 6px 0 0; }
.rs-ambar { color: var(--ambar); }
.rs-rango { font-size: 12px; font-weight: 400; margin-left: 6px; }
.rs-margen { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin: 4px 0 12px; border: 1px solid hsl(var(--line)); border-radius: var(--radius, 8px); }
.rs-margen b { font-size: 28px; font-variant-numeric: tabular-nums; }
.rs-margen.ok { border-color: hsl(var(--primary) / .45); }
.rs-margen.no { border-color: var(--rojo); }
.rs-lin { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid hsl(var(--line)); }
.rs-lin .muted { font-size: 12px; max-width: 60ch; }
.rs-lin-v { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; text-align: right; }
.rs-cuadre-mal { color: var(--rojo); font-size: 13px; }
/* Las tres preguntas del detalle de un proyecto */
.rs-preg { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; padding: 4px 0; }
.rs-preg h4 { margin: 0 0 6px; font-size: 13px; }
.rs-preg p { margin: 4px 0; font-size: 13px; }
.rs-todo { margin-top: 8px; font-size: 13px; }
.rs-todo summary { cursor: pointer; color: var(--muted); }
/* Aviso numérico sobre la pestaña Base */
.rs-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--rojo); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
/* Cotización */
.rs-pct-info { margin: 4px 0 8px; font-size: 13px; }
.rs-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.rs-check input { width: auto; }
.rs-linea { flex-wrap: wrap; }
.rs-hint { flex: 1 0 100%; font-size: 12px; min-height: 0; }
.rs-hint:empty { display: none; }
.rs-lineas-acc { align-items: flex-end; margin-top: 6px; }
.rs-total-l { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.rs-total-l input { width: 8rem; }
.rs-sub button .ayuda { margin-left: 4px; }
@media (max-width: 480px) { .rs-lin { flex-direction: column; gap: 2px; } .rs-lin-v { text-align: left; } .rs-margen b { font-size: 24px; } }

/* Detalle de un proyecto a todo el ancho: la consola limita `td > div` a 320px, aquí la fila entera es del detalle. */
.rs-det td > div, .rs-det td > section, .rs-det td > details { max-width: none; width: 100%; }
.rs-preg { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); max-width: none; }
.rs-preg section { min-width: 0; }
.rs-lig { margin-top: 14px; }
.rs-lig h4 { margin: 0 0 6px; font-size: 13px; }
.rs-lig-tbl td { vertical-align: top; white-space: normal; }
.rs-lig-tbl td:first-child { white-space: nowrap; }
.rs-lig-tbl td > div + div { margin-top: 6px; }
.rs-clip { max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-det-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
