/* menuchef-admin/estilo/v2-graficos.css — os gráficos do painel v2: linha, colunas, barras, funil, metas, mapa de calor, tabelas.
   Cor de série NUNCA por atributo (o svg.js recusa fill/stroke): vem da classe (v2-s-* traço, v2-f-* preenchimento) e dos tokens,
   então o claro e o escuro valem sozinhos. Largura e posição por CSSOM (--p, --x, --y, --cols). */

.v2-chart { position: relative; width: 100%; min-height: 120px; }
.v2-chart svg { display: block; width: 100%; overflow: visible; }
.v2-chart text { font-family: var(--fonte-texto); font-size: 11.5px; fill: var(--texto-2); }
.v2-chart .v2-g-grade { stroke: var(--grade); stroke-width: 1; }
.v2-chart .v2-g-eixo { stroke: var(--cinza-claro); stroke-width: 1; }
.v2-chart .v2-g-ev { stroke: var(--cinza); stroke-width: 1; stroke-dasharray: 2 3; }
.v2-chart .v2-g-ev-t { fill: var(--texto); font-weight: 600; font-size: 11.5px; }
.v2-chart .v2-xh { stroke: var(--cinza); stroke-width: 1; }
.v2-chart .v2-g-vt { fill: var(--texto); font-weight: 700; font-size: 12px; }
.v2-chart .v2-hit { fill: transparent; touch-action: pan-y; }
.v2-chart .v2-linha { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v2-chart .v2-tracejado { stroke-dasharray: 5 4; }
.v2-chart .v2-area { opacity: .1; stroke: none; }
.v2-chart .v2-ponto { stroke: var(--superficie); stroke-width: 2; }
.v2-chart .v2-ponto-aberto { fill: var(--superficie); stroke-width: 2; }
.v2-chart .v2-barra.v2-inc { fill-opacity: .28; stroke-width: 1.5; stroke-dasharray: 3 2; }
.v2-s-serie { stroke: var(--serie); } .v2-s-2 { stroke: var(--serie-2); } .v2-s-cinza { stroke: var(--cinza); } .v2-s-cc { stroke: var(--cinza-claro); } .v2-s-ruim { stroke: var(--tom-ruim); } .v2-s-bom { stroke: var(--tom-bom); }
.v2-f-serie { fill: var(--serie); } .v2-f-2 { fill: var(--serie-2); } .v2-f-cinza { fill: var(--cinza); } .v2-f-cc { fill: var(--cinza-claro); } .v2-f-ruim { fill: var(--tom-ruim); } .v2-f-bom { fill: var(--tom-bom); }
.v2-chart .v2-ponto-aberto.v2-s-serie, .v2-chart .v2-ponto-aberto.v2-s-2, .v2-chart .v2-ponto-aberto.v2-s-cc { fill: var(--superficie); }
#v2-dica { position: fixed; z-index: 100; left: 0; top: 0; pointer-events: none; background: var(--texto); color: var(--fundo); border-radius: 10px; padding: 8px 11px; font-size: 0.8125rem; line-height: 1.4; max-width: 260px; opacity: 0; transition: opacity .08s; box-shadow: 0 6px 24px color-mix(in srgb, var(--texto) 25%, transparent); }
#v2-dica b { font-weight: 700; }
#v2-dica.v2-on { opacity: 1; }

.v2-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8125rem; color: var(--texto-2); margin-bottom: 10px; }
.v2-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.v2-legenda i { width: 14px; height: 4px; border-radius: 2px; background: var(--serie); display: inline-block; }
.v2-legenda i.v2-q { height: 10px; width: 10px; border-radius: 3px; }
.v2-legenda i.v2-tr { background: transparent; border-top: 2px dashed var(--serie); height: 0; }
.v2-legenda i.v2-c-2 { background-color: var(--serie-2); } .v2-legenda i.v2-c-cinza { background-color: var(--cinza); } .v2-legenda i.v2-c-cc { background-color: var(--cinza-claro); }
.v2-legenda i.v2-lis, .v2-lis { background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--superficie) 3px 5px); }
.v2-c-serie { background-color: var(--serie); } .v2-c-2 { background-color: var(--serie-2); } .v2-c-cinza { background-color: var(--cinza); } .v2-c-cc { background-color: var(--cinza-claro); } .v2-c-ruim { background-color: var(--tom-ruim); } .v2-c-bom { background-color: var(--tom-bom); } .v2-c-aten { background-color: var(--tom-atencao); }

/* barras horizontais, funis, metas */
.v2-hb { display: grid; gap: 12px; }
.v2-hb-l { display: grid; grid-template-columns: minmax(96px, 30%) minmax(0, 1fr) 8.5rem; gap: 4px 14px; align-items: center; }
.v2-hb-l.v2-hb-e { grid-template-columns: minmax(110px, 26%) minmax(0, 1fr) 8.5rem; }
.v2-hb-n { font-size: 0.875rem; font-weight: 500; line-height: 1.25; min-width: 0; }
.v2-hb-n small { display: block; color: var(--texto-2); font-weight: 400; font-size: 0.75rem; }
.v2-hb-t { height: 18px; border-radius: 0 4px 4px 0; position: relative; display: flex; gap: 2px; min-width: 0; }
.v2-hb-t.v2-cheio { background: var(--fundo-suave); border-radius: 4px; }
.v2-hb-f { height: 100%; width: calc(var(--p, 0) * 1%); border-radius: 0 4px 4px 0; min-width: 2px; }
.v2-hb-f.v2-seg { border-radius: 4px; }
.v2-hb-f:first-child { border-radius: 0 4px 4px 0; }
.v2-hb-t.v2-cheio .v2-hb-f:first-child { border-radius: 4px; }
.v2-hb-v { font-size: 0.875rem; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-hb-v span { font-weight: 400; color: var(--texto-2); }
.v2-passo { grid-column: 2 / 4; font-size: 0.75rem; color: var(--texto-2); display: flex; gap: 6px; align-items: center; margin-top: -2px; }
.v2-passo .v2-ic { font-size: 0.95em; }
.v2-meta { position: absolute; top: -4px; bottom: -4px; left: calc(var(--p, 0) * 1%); width: 3px; background: var(--texto); border-radius: 2px; }
.v2-lg-l { display: grid; gap: 8px; }
.v2-lg-l li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: baseline; font-size: 0.875rem; }
.v2-lg-l li i { width: 12px; height: 12px; border-radius: 3px; display: block; align-self: center; }
.v2-lg-l li b { font-variant-numeric: tabular-nums; }
.v2-lg-l li small { color: var(--texto-2); display: block; font-size: 0.75rem; }

/* tabelas que viram cartões no celular */
.v2-rt { display: grid; gap: 0; }
.v2-rt-h, .v2-rt-r { display: grid; grid-template-columns: var(--cols); gap: 10px 14px; align-items: center; padding: 11px 6px; }
.v2-rt-h { font-size: 0.75rem; font-weight: 700; color: var(--texto-2); border-bottom: 1.5px solid var(--contorno); padding-top: 4px; align-items: end; line-height: 1.25; }
.v2-rt-r { border-bottom: 1px solid var(--linha); font-size: 0.9rem; }
.v2-rt-r:last-child { border-bottom: 0; }
.v2-rt-r.v2-dest { background: color-mix(in srgb, var(--tom-atencao) 10%, transparent); border-radius: 10px; }
.v2-rt-r > div { min-width: 0; font-variant-numeric: tabular-nums; }
.v2-rt .v2-d, .v2-rt-h .v2-d { text-align: right; }
.v2-rt .v2-k { font-weight: 600; }
.v2-rt .v2-k small { display: block; font-weight: 400; color: var(--texto-2); font-size: 0.75rem; }
.v2-mb { display: block; height: 6px; border-radius: 0 3px 3px 0; background: var(--serie); margin-top: 6px; width: calc(var(--p, 0) * 1%); min-width: 2px; }

/* o mapa de calor: UMA matiz (mar) em 5 degraus; o número fica na célula (a cor nunca fala sozinha) */
.v2-hm { display: grid; grid-template-columns: var(--rot, 88px) repeat(var(--cols, 3), minmax(0, 1fr)); gap: 3px; font-variant-numeric: tabular-nums; }
.v2-hm-h { font-size: 0.75rem; font-weight: 700; color: var(--texto-2); padding: 2px 4px 6px; text-align: center; line-height: 1.2; }
.v2-hm-r { font-size: 0.8125rem; font-weight: 600; display: flex; align-items: center; line-height: 1.2; }
.v2-hm-r small { display: block; font-weight: 400; color: var(--texto-2); font-size: 0.6875rem; }
.v2-hm-c { height: 44px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; color: var(--texto); position: relative; background: color-mix(in srgb, var(--serie) var(--m, 0%), var(--superficie)); }
.v2-hm-c.v2-n1 { --m: 12%; } .v2-hm-c.v2-n2 { --m: 26%; } .v2-hm-c.v2-n3 { --m: 42%; } .v2-hm-c.v2-n4 { --m: 60%; } .v2-hm-c.v2-n5 { --m: 80%; }
.v2-hm-c.v2-jovem { background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--superficie) 75%, transparent) 4px 6px); border: 1.5px dashed var(--cinza); }
.v2-hm-c.v2-poucos { background: transparent; border: 1.5px dashed var(--grade); color: var(--texto-2); font-weight: 500; font-size: 0.75rem; }
.v2-hm-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; font-size: 0.75rem; color: var(--texto-2); }
.v2-hm-leg i { display: inline-block; width: 18px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.v2-hm-leg .v2-n1 { background: color-mix(in srgb, var(--serie) 12%, var(--superficie)); } .v2-hm-leg .v2-n2 { background: color-mix(in srgb, var(--serie) 26%, var(--superficie)); }
.v2-hm-leg .v2-n3 { background: color-mix(in srgb, var(--serie) 42%, var(--superficie)); } .v2-hm-leg .v2-n4 { background: color-mix(in srgb, var(--serie) 60%, var(--superficie)); }
.v2-hm-leg .v2-n5 { background: color-mix(in srgb, var(--serie) 80%, var(--superficie)); }
.v2-hm-leg .v2-poucos { border: 1.5px dashed var(--grade); } .v2-hm-leg .v2-jovem { border: 1.5px dashed var(--cinza); background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--superficie) 75%, transparent) 3px 5px); }

/* listas da Hoje e da Conferência (sem o recuo e a bolinha do navegador) */
.v2-semaf, .v2-alr, .v2-lg-l, .v2-ant-l { margin: 0; padding: 0; list-style: none; }
.v2-semaf { display: grid; gap: 0; }
.v2-semaf li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--linha); font-size: 0.9rem; }
.v2-semaf li:last-child { border: 0; }
.v2-semaf small { display: block; color: var(--texto-2); font-size: 0.75rem; }
.v2-semaf li > b { font-variant-numeric: tabular-nums; }
.v2-alr { display: grid; gap: 0; }
.v2-alr li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--linha); align-items: start; }
.v2-alr li:last-child { border: 0; }
.v2-alr h4 { font-size: 0.9375rem; font-weight: 600; margin: 0; }
.v2-alr p { font-size: 0.8125rem; color: var(--texto-2); margin: 0; }
.v2-alr .v2-st { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.v2-comp { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; }
.v2-comp > div { min-width: 0; }
.v2-comp .v2-num { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); display: block; line-height: 1.1; white-space: nowrap; }
.v2-comp .v2-kpi-t { margin-bottom: 4px; }
.v2-lis-faixa { display: grid; gap: 14px; }

@media (max-width: 899px) { .v2-comp { grid-template-columns: 1fr 1fr; } .v2-comp > div:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .v2-hb-l, .v2-hb-l.v2-hb-e { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-hb-l .v2-hb-t { grid-column: 1 / 3; grid-row: 2; }
  .v2-hb-l .v2-passo { grid-column: 1 / 3; }
  .v2-rt-h { display: none; }
  .v2-rt-r { grid-template-columns: 1fr 1fr; padding: 14px 12px; margin-bottom: 10px; border: 1.5px solid var(--linha); border-radius: 16px; background: var(--fundo-suave); gap: 8px 12px; }
  .v2-rt-r:last-child { border: 1.5px solid var(--linha); }
  .v2-rt-r > div { text-align: left !important; }
  .v2-rt-r > div.v2-k { grid-column: 1 / -1; font-size: 1rem; }
  .v2-rt-r > div[data-l]::before { content: attr(data-l); display: block; font-size: 0.6875rem; font-weight: 600; color: var(--texto-2); line-height: 1.25; margin-bottom: 1px; }
  .v2-alr li { grid-template-columns: auto minmax(0, 1fr); }
  .v2-alr .v2-st { grid-column: 2; white-space: normal; }
  .v2-hm { grid-template-columns: minmax(64px, 84px) repeat(var(--cols, 3), minmax(0, 1fr)); }
}

.v2-g-ev-m { fill: var(--superficie); stroke: var(--serie); stroke-width: 1.5; }
.v2-acontecimentos { margin-top: var(--v2-esp-4); font-size: 0.8125rem; color: var(--texto-2); }
.v2-acontecimentos summary { cursor: pointer; padding: var(--v2-esp-2) 0; }
.v2-acontecimentos ul { display: grid; gap: var(--v2-esp-2); padding-left: var(--v2-esp-6); }

/* Gráficos ligados pela mesma régua de dias. */
.v2-grafico-sincronizado { min-width: 0; animation: v2-ladrilho-entra var(--v2-inicio-duracao) both; }
.v2-grafico-sincronizado > h2 { margin: 0 0 var(--v2-esp-3); font-size: 1.1rem; }
.v2-gs-legenda { display: flex; gap: var(--v2-esp-2); flex-wrap: wrap; }
.v2-gs-legenda-item { display: inline-flex; gap: var(--v2-esp-2); align-items: center; min-height: var(--v2-inicio-toque); background: transparent; border: 0; padding: var(--v2-esp-1) var(--v2-esp-2); color: var(--texto); font: inherit; cursor: pointer; }
.v2-gs-legenda-item i { width: var(--v2-esp-3); height: var(--v2-esp-3); border-radius: var(--v2-esp-1); background: var(--v2-assunto); }
.v2-gs-legenda-item[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.v2-gs-area { min-width: 0; touch-action: pan-y; }
.v2-gs-area:focus-visible, .v2-gs-legenda-item:focus-visible, .v2-ladrilho:focus-visible, [data-limpar-foco]:focus-visible { outline: 2px solid var(--foco); outline-offset: var(--v2-esp-1); }
.v2-gs-svg { display: block; width: 100%; height: auto; overflow: visible; }
.v2-gs-grade { stroke: var(--grade); stroke-width: 1; }
.v2-gs-eixo { fill: var(--texto-2); font-size: 12px; font-family: var(--fonte-numero); }
.v2-gs-serie { fill: none; stroke: var(--v2-assunto); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: var(--v2-traco); animation: v2-gs-desenha 500ms ease-out both; transition: opacity 180ms; }
.v2-gs-cursor { stroke: var(--texto-2); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.v2-gs-esmaecida { opacity: var(--v2-inicio-opacidade); }
.v2-gs-oculta { visibility: hidden; }
.v2-gs-dica { display: block; margin: var(--v2-esp-2) 0; min-height: 2.5em; color: var(--texto); font-size: .85rem; font-variant-numeric: tabular-nums; }
.v2-gs-ajuda { margin: var(--v2-esp-2) 0; }
.v2-gs-tabela { font-size: .8rem; margin-top: var(--v2-esp-3); }
.v2-gs-tabela summary { cursor: pointer; color: var(--serie); }
.v2-gs-tabela table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.v2-gs-tabela th, .v2-gs-tabela td { padding: var(--v2-esp-2) var(--v2-esp-1); text-align: right; overflow-wrap: anywhere; border-bottom: 1px solid var(--linha); }
@keyframes v2-gs-desenha { from { stroke-dashoffset: var(--v2-traco); } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .v2-gs-serie { animation: none !important; transition: none !important; stroke-dasharray: none; } }

.v2-gs-ponto { fill: var(--v2-assunto); transition: opacity 180ms; }
@media (prefers-reduced-motion: reduce) { .v2-gs-ponto { transition: none !important; } }
.v2-mini-sincronizada { cursor: crosshair; touch-action: pan-y; }
.v2-mini-sincronizada svg { overflow: visible; }
.v2-mini-cursor { stroke: var(--texto-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.v2-mini-ponto { fill: var(--v2-assunto); }
.v2-mini-dica { position: absolute; bottom: 100%; left: 0; right: 0; z-index: 1; font-size: .7rem; line-height: 1.35; color: var(--texto); background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--v2-esp-1); padding: var(--v2-esp-1); pointer-events: none; }
