/* Oficina Bica · colores y estilo de los gráficos SVG (Graficos.js) y tarjeta flotante estilo Tableau. */

.Grafico svg { display: block; max-width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.Grafico .Eje { fill: var(--Suave); font-size: 11px; }
.Grafico .LineaGrilla { stroke: #e9eef4; }
.Grafico .LineaCero { stroke: #9fb0c3; }
.Grafico .Conector { stroke: #9fb0c3; stroke-dasharray: 3 3; }
.Grafico .Guia { stroke: #8ea2b8; stroke-dasharray: 3 3; }
.Grafico .Zona { fill: transparent; cursor: crosshair; }
.Grafico .Referencia { stroke: #947020; stroke-dasharray: 6 4; }
.Grafico .EtiquetaReferencia { fill: #947020; font-size: 10.5px; font-weight: 650; }
.Grafico .ValorBarra { fill: var(--Tinta); font-size: 10.5px; font-weight: 650; }
.Grafico .Trazo, .Minilinea .Trazo { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.Grafico .Trazo.Discontinuo { stroke-dasharray: 6 4; }
.Grafico .Nodo, .Minilinea .Nodo { stroke: #fff; stroke-width: 1.5; transition: r 0.12s; }
.Grafico .Nodo.Activo { r: 6; }
.Grafico rect.Relleno, .Grafico path.Relleno { cursor: pointer; transition: opacity 0.15s; }
.Grafico rect.Relleno:hover, .Grafico path.Relleno:hover { opacity: 0.8; }
.Grafico .CentroDona { fill: var(--Tinta); font-size: 17px; font-weight: 700; }
.Minilinea { display: block; }
.Minilinea .Trazo { stroke-width: 2; }
/* Minigráfico de las tarjetas KPI (cerebro): año actual sólido, año anterior punteado en gris */
.MiniComparacion { display: block; width: 100%; overflow: visible; }
.MiniComparacion .Trazo { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.MiniComparacion .TrazoPrevio { stroke: #9aa7b8; stroke-width: 1.6; stroke-dasharray: 4 3; }
.MiniComparacion .PuntoMini { stroke-width: 7; }
.MiniComparacion .PuntoMini.Previo { stroke: #9aa7b8; }
.MiniComparacion .CeroMini { stroke: rgba(36, 55, 78, 0.2); stroke-width: 1; stroke-dasharray: 2 3; }

.Relleno.Azul, .Nodo.Azul { fill: #254b8d; }       .Trazo.Azul { stroke: #254b8d; }
.Relleno.Cian, .Nodo.Cian { fill: #0089be; }       .Trazo.Cian { stroke: #0089be; }
.Relleno.Verde, .Nodo.Verde { fill: #21895c; }     .Trazo.Verde { stroke: #21895c; }
.Relleno.Lima, .Nodo.Lima { fill: #8dbb19; }       .Trazo.Lima { stroke: #8dbb19; }
.Relleno.Naranjo, .Nodo.Naranjo { fill: #e89411; } .Trazo.Naranjo { stroke: #e89411; }
.Relleno.Rojo, .Nodo.Rojo { fill: #d34d4f; }       .Trazo.Rojo { stroke: #d34d4f; }
.Relleno.Violeta, .Nodo.Violeta { fill: #6b5797; } .Trazo.Violeta { stroke: #6b5797; }
.Relleno.Marino, .Nodo.Marino { fill: #183760; }   .Trazo.Marino { stroke: #183760; }

/* Tonos del balance: activos en naranjos, pasivos en celestes, patrimonio en verde */
.Relleno.Ambar, .Nodo.Ambar { fill: #f5a623; }     .Trazo.Ambar { stroke: #f5a623; }
.Relleno.Terracota, .Nodo.Terracota { fill: #c2560f; } .Trazo.Terracota { stroke: #c2560f; }
.Relleno.Celeste, .Nodo.Celeste { fill: #4fb3e8; } .Trazo.Celeste { stroke: #4fb3e8; }
.Punto.Ambar { background: #f5a623; } .Punto.Terracota { background: #c2560f; } .Punto.Celeste { background: #4fb3e8; }
.Ambar { --Color: #f5a623; } .Terracota { --Color: #c2560f; } .Celeste { --Color: #4fb3e8; }
.Degradado.Celeste stop { stop-color: #4fb3e8; } .Degradado.Ambar stop { stop-color: #f5a623; } .Degradado.Terracota stop { stop-color: #c2560f; }

.Degradado .Inicio { stop-opacity: 0.22; }
.Degradado .Fin { stop-opacity: 0; }
.Degradado.Azul stop { stop-color: #254b8d; } .Degradado.Cian stop { stop-color: #0089be; } .Degradado.Verde stop { stop-color: #21895c; }
.Degradado.Lima stop { stop-color: #8dbb19; } .Degradado.Naranjo stop { stop-color: #e89411; } .Degradado.Rojo stop { stop-color: #d34d4f; }
.Degradado.Violeta stop { stop-color: #6b5797; }

.Leyenda { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--Suave); }
/* Botón de leyenda del recuadro: oculta, el gráfico usa también ese alto (Medidas lo descuenta solo si se ve) */
[data-leyenda="Oculta"] .Leyenda { display: none; }
.Punto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; flex: none; }
.Punto.Azul { background: #254b8d; } .Punto.Cian { background: #0089be; } .Punto.Verde { background: #21895c; }
.Punto.Lima { background: #8dbb19; } .Punto.Naranjo { background: #e89411; } .Punto.Rojo { background: #d34d4f; }
.Punto.Violeta { background: #6b5797; } .Punto.Marino { background: #183760; }

/* Tarjeta flotante estilo Tableau, en Liquid Glass */
.TooltipGrafico {
  position: fixed; z-index: 100; min-width: 190px; max-width: 300px; padding: 10px 13px; pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(236, 244, 252, 0.5));
  -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 16px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -8px 18px rgba(255, 255, 255, 0.2), 0 14px 34px rgba(24, 55, 96, 0.2);
  color: var(--Tinta); font-size: 12.5px;
}
.TooltipGrafico strong { display: block; font-size: 13px; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(37, 75, 141, 0.14); }
.FilasTooltip div.Destacado b { color: var(--Azul); }

/* Descargar o copiar (botón ⤓ junto al título de cada recuadro) */
.ZonaExportar { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.Exportar { position: relative; }
.Exportar summary {
  list-style: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--Azul);
  background: var(--Vidrio); -webkit-backdrop-filter: var(--DesenfoqueVidrio); backdrop-filter: var(--DesenfoqueVidrio); border: 1px solid var(--BordeVidrio); box-shadow: inset 0 1px 1px #fff, 0 2px 6px rgba(31, 56, 104, 0.15);
}
.Exportar summary::-webkit-details-marker { display: none; }
.Exportar[open] summary, .Exportar summary:hover { background: var(--Azul); color: #fff; }
/* Menú casi opaco: va dentro de un recuadro de vidrio y, transparente, el gráfico de atrás lo hacía ilegible */
.MenuExportar {
  position: absolute; top: 30px; left: -8px; z-index: 70; display: grid; gap: 2px; width: 270px; padding: 6px; border-radius: 14px;
  border: 1px solid #dfe6ef; background: rgba(255, 255, 255, 0.98); box-shadow: 0 18px 40px rgba(24, 55, 96, 0.24), 0 2px 6px rgba(24, 55, 96, 0.1);
}
.MenuExportar button { display: grid; gap: 1px; padding: 8px 12px; border: 0; border-radius: 9px; background: none; color: var(--Tinta); font: inherit; text-align: left; cursor: pointer; }
.MenuExportar button b { font-size: 13.5px; font-weight: 650; }
.MenuExportar button small { font-size: 11.5px; line-height: 1.3; color: var(--Suave); }
.MenuExportar button + button { border-top: 1px solid #eef2f7; border-radius: 0 0 9px 9px; }
.MenuExportar button:hover { background: rgba(37, 75, 141, 0.08); }
.MenuExportar button:hover b { color: var(--Azul); }
/* Expandir el gráfico a toda la ventana (botón ⤢ junto a ⤓) */
.BotonExpandir, .BotonLeyenda { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--Azul);
  background: var(--Vidrio); border: 1px solid var(--BordeVidrio); box-shadow: inset 0 1px 1px #fff, 0 2px 6px rgba(31, 56, 104, 0.15); }
.BotonExpandir:hover, .Expandido .BotonExpandir, .BotonLeyenda:hover, .BotonLeyenda[aria-pressed="true"] { background: var(--Azul); color: #fff; }
/* Íconos SVG (no caracteres): quedan centrados igual que ⓘ y ⤓ en cualquier fuente */
:is(.BotonExpandir, .BotonLeyenda) .Icono { width: 13px; height: 13px; }
.BotonLeyenda[hidden] { display: none; }
.Visor.Expandido { position: fixed !important; inset: 10px; z-index: 60; margin: 0 !important; display: flex; flex-direction: column; min-height: 0 !important;
  background: rgba(255, 255, 255, 0.97); box-shadow: 0 20px 50px rgba(24, 55, 96, 0.25); }
.Visor.Expandido > .VisorCuerpo { flex: 1; min-height: 0; height: auto !important; }
.AvisoExportar { font-size: 11.5px; color: #1f7a50; white-space: nowrap; }

/* PDF: al imprimir un recuadro solo se ve ese recuadro */
.FiltrosImpresos { display: none; margin: 4px 0 0; font-size: 12px; color: #56647a; }
@media print {
  /* Panel completo: sin barra lateral ni botones; cada recuadro crece para mostrar todo su contenido */
  body.ImprimiendoPanel { background: #fff !important; height: auto !important; overflow: visible !important; display: block !important; }
  body.ImprimiendoPanel :is(.Lateral, .Pie, .Cuenta, .Filtros, .ZonaExportar, .Info, .BotonLeyenda, .BotonExpandir, .BotonAnalista, .BarraMovil) { display: none !important; }
  body.ImprimiendoPanel .FiltrosImpresos { display: block !important; }
  body.ImprimiendoPanel :is(.Principal, #Vista, .Visor, .VisorCuerpo, .Desplazable, .ContenedorTabla, .HojaCorporativa, .HojaDosColumnas) { height: auto !important; max-height: none !important; overflow: visible !important; }
  body.ImprimiendoPanel :is(.Kpi, .Pulse, .Visor) { break-inside: avoid; box-shadow: none !important; }
  body.Imprimiendo { background: #fff !important; height: auto !important; overflow: visible !important; display: block !important; }
  body.Imprimiendo * { visibility: hidden; }
  body.Imprimiendo .Visor.Imprimir, body.Imprimiendo .Visor.Imprimir * { visibility: visible; }
  body.Imprimiendo .Visor.Imprimir { position: absolute; inset: 0 auto auto 0; width: 100%; box-shadow: none !important; border: 0 !important; background: #fff !important; }
  body.Imprimiendo .Visor.Imprimir .VisorCuerpo { height: auto !important; overflow: visible !important; }
  body.Imprimiendo .Visor.Imprimir .Segmentado, body.Imprimiendo .Visor.Imprimir .ZonaExportar, body.Imprimiendo .Visor.Imprimir .Info { display: none !important; }
  body.Imprimiendo .HojaCorporativa, body.Imprimiendo .HojaDosColumnas, body.Imprimiendo .ContenedorTabla { height: auto !important; max-height: none !important; overflow: visible !important; }
}

/* Treemap y masas patrimoniales */
.Treemap, .Masas { position: relative; width: 100%; }
.Azul { --Color: #254b8d; } .Cian { --Color: #0089be; } .Verde { --Color: #21895c; } .Lima { --Color: #8dbb19; }
.Naranjo { --Color: #e89411; } .Rojo { --Color: #d34d4f; } .Violeta { --Color: #6b5797; } .Marino { --Color: #183760; }
.TreemapGrupo { position: absolute; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--Color) 14%, #fff); box-shadow: inset 0 0 0 2px #fff; }
.TreemapTitulo { position: absolute; left: 0; right: 0; top: 0; height: 20px; padding: 2px 9px; font-size: 11px; font-weight: 750; color: var(--Color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: 0.5px; }
.TreemapCelda {
  position: absolute; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 6px 8px; overflow: hidden; cursor: pointer;
  color: #fff; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 10px; opacity: var(--Tono, 1); transition: filter 0.15s;
  background: linear-gradient(160deg, color-mix(in srgb, var(--Color) 78%, #fff), var(--Color));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.TreemapCelda:hover { filter: brightness(1.1); }
.TreemapCelda b { font-size: 12px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.TreemapCelda small { font-size: 11px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.Masas { display: flex; justify-content: center; gap: 18px; }
.ColumnaMasa { flex: 0 1 340px; display: flex; flex-direction: column; min-width: 0; }
.CabezaMasa { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px 6px; border-bottom: 2px solid var(--Azul); margin-bottom: 6px; }
.CabezaMasa strong { font-size: 13px; color: var(--Azul); text-transform: uppercase; letter-spacing: 0.6px; }
.CabezaMasa small { font-weight: 700; font-size: 12.5px; }
.AreaMasa { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.PilaMasa { display: flex; flex-direction: column; gap: 3px; }
.BloqueMasa {
  flex-basis: 0; min-height: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; padding: 4px 8px; overflow: hidden; cursor: pointer;
  border-radius: 12px; color: #fff; text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--Color) 75%, #fff), var(--Color));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(24, 55, 96, 0.12);
}
.BloqueMasa:hover { filter: brightness(1.1); }
.BloqueMasa b { font-size: 12.5px; }
.BloqueMasa small { font-size: 11.5px; opacity: 0.92; }
.FilasTooltip { display: grid; gap: 4px; }
.FilasTooltip div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.FilasTooltip span { color: var(--Suave); }
.FilasTooltip b { font-weight: 700; text-align: right; }
.TooltipGrafico small { display: block; margin-top: 6px; color: var(--Suave); font-size: 11.5px; }

.Dona { display: grid; grid-template-columns: minmax(170px, 230px) 1fr; gap: 20px; align-items: center; height: 100%; }
.Dona .Grafico svg { width: 100%; }
.ListaDona { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; max-height: 100%; overflow: auto; }
.ListaDona li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 8px; }
.ListaDona li:nth-child(odd) { background: #f4f8fc; }
.ListaDona strong { font-weight: 700; }
.ListaDona small { color: var(--Suave); min-width: 9ch; text-align: right; }

@media (max-width: 640px) {
  .Dona { grid-template-columns: 1fr; }
  .Dona .Grafico { max-width: 200px; margin: 0 auto; }
}

/* Radar de competencias: áreas translúcidas (la segunda serie, punteada) sobre una red gris */
.SvgRadar .RedRadar { fill: none; }
.SvgRadar .AreaRadar { fill-opacity: 0.18; stroke-width: 2; stroke: currentColor; }
.SvgRadar .AreaRadar.Azul { color: #254b8d; } .SvgRadar .AreaRadar.Naranjo { color: #e89411; } .SvgRadar .AreaRadar.Cian { color: #0089be; }
.SvgRadar .AreaRadar.Verde { color: #21895c; } .SvgRadar .AreaRadar.Violeta { color: #6b5797; }
.SvgRadar .AreaRadar.Discontinua { stroke-dasharray: 5 4; fill-opacity: 0.08; }
/* Clic (o toque) en un gráfico: la tarjeta queda fija hasta tocar otra parte del panel */
.TooltipGrafico.Fijo { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.45), 0 10px 28px rgba(15, 23, 42, 0.18); }
.TooltipGrafico.Fijo::after { content: "Fija · toca fuera del gráfico para soltarla"; display: block; margin-top: 4px; font-size: 10px; color: #56647a; }
