/* Parque de equipamentos. Reuso tokens do app.css; o destaque é o gráfico de fluxo. */
.gst { display: flex; flex-direction: column; gap: 16px }

.gst-kpi { position: relative; cursor: pointer; border-top: 3px solid var(--line); transition: border-color .15s }
.gst-kpi:hover { border-top-color: var(--faint) }
.gst-kpi.on { border-top-color: var(--steel); box-shadow: 0 0 0 1px var(--steel) inset }
.gst-kpi:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px }
.gst-i { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; font-size: .75rem; border-width: 1px }
.gst-regra { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .7188rem; color: var(--muted); line-height: 1.5; cursor: default }

/* Cards como menu: o ativo se liga ao painel de gráficos logo abaixo */
.gst-menu { gap: 12px }
.gst-kpi:not(.on) { background: var(--surface2); box-shadow: none }
.gst-kpi:not(.on) .val { color: var(--muted) }
.gst-kpi.on::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; background: var(--surface);
  border-right: 1px solid var(--steel); border-bottom: 1px solid var(--steel); transform: translateX(-50%) rotate(45deg) }

.gst-palco { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 0; padding: 0 }
.gst-g { padding: 16px 18px; min-width: 0; display: flex; flex-direction: column }
.gst-g + .gst-g { border-left: 1px solid var(--line) }
.gst-g header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; min-height: 26px }
.gst-g h4 { font-family: var(--disp); font-size: .875rem; font-weight: 600; color: var(--vault) }
.gst-g footer { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .7188rem; color: var(--faint) }
.gst-ano { display: flex; gap: 4px }
.gst-ano button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); line-height: 1 }
.gst-ano button:hover:not(:disabled) { border-color: var(--steel); color: var(--steel) }
.gst-ano button:disabled { opacity: .35; cursor: default }
.gst-leg { color: var(--muted) }
.gst-leg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px }
.gst-leg.up::before { background: var(--ok) }
.gst-leg.dn::before { background: var(--alert) }
.gst-saldo { margin-left: auto; font-family: var(--disp); font-size: .9375rem }
.gst-saldo.pos { color: var(--ok) }
.gst-saldo.neg { color: var(--alert) }

.gst-svg-wrap { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin }
.gst-svg { display: block; width: 100%; height: auto; max-height: 220px }
.gst-sep { stroke: var(--line); stroke-width: 1 }
.gst-ano-x { font: 600 9px var(--ui); fill: var(--muted) }
.gst-base { stroke: var(--line) }
.gst-hit { fill: transparent }
.gst-up { fill: var(--ok) }
.gst-dn { fill: var(--alert) }
.gst-up.dim, .gst-dn.dim { opacity: .22 }
.gst-up.neutro.semdata { fill: var(--faint) }
.gst-v { font: 600 9px var(--ui); fill: var(--txt); text-anchor: middle }
.gst-v.dn { fill: var(--alert) }
.gst-x { font: 500 9px var(--ui); fill: var(--faint); text-anchor: middle }
.gst-bar.clic { cursor: pointer; outline: none }
.gst-bar.clic:hover .gst-hit, .gst-bar.clic:focus-visible .gst-hit { fill: var(--surface2) }
.gst-bar.fora rect:not(.gst-hit) { opacity: .3 }
.gst-bar.on .gst-x { fill: var(--steel); font-weight: 700 }
.gst-vazio { padding: 28px; text-align: center; color: var(--muted); font-size: .8125rem }
.gst-nota { font-size: .7188rem; color: var(--faint); margin-top: 8px }

.gst-pz { display: grid; grid-template-columns: 200px minmax(0, 236px); gap: 20px; align-items: center; justify-content: center; flex: 1 }
.gst-rosca { width: 200px; height: 200px }
.gst-fatia { stroke: var(--surface); stroke-width: 1.5; transition: opacity .15s }
.gst-fatia.clic { cursor: pointer; outline: none }
.gst-fatia.clic:hover, .gst-fatia.clic:focus-visible { opacity: .8 }
.gst-fatia.fora { opacity: .25 }
.gst-tot { font: 700 15px var(--disp); fill: var(--vault); text-anchor: middle }
.gst-tot-l { font: 500 8px var(--ui); fill: var(--faint); text-anchor: middle }
.gst-leg-l { display: flex; flex-direction: column; gap: 1px; min-width: 0 }
.gst-li { display: grid; grid-template-columns: 9px minmax(0, 1fr) 44px 34px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 5px; font-size: .75rem; text-align: left }
.gst-li:hover:not(:disabled) { background: var(--surface2) }
.gst-li:disabled { cursor: default }
.gst-li.on { background: rgba(37, 99, 235, .08); font-weight: 600 }
.gst-li.fora { opacity: .45 }
.gst-li i { width: 9px; height: 9px; border-radius: 2px }
.gst-li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; padding-bottom: 4px }
.gst-li .n em { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p); background: var(--c); opacity: .35; border-radius: 1px }
.gst-li.on .n em, .gst-li:hover .n em { opacity: .8 }
.gst-li .q { text-align: right; font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums }
.gst-li .p { text-align: right; color: var(--faint); font-variant-numeric: tabular-nums }
.gst-limpa { font-size: .7188rem; color: var(--steel) }
.gst-limpa:hover { text-decoration: underline }

.gst-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px }
.gst-tools input { flex: 1 1 280px; max-width: 460px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .8125rem; background: var(--surface) }
.gst-tools input:focus { outline: none; border-color: var(--steel) }
.gst-chip { padding: 5px 10px; border-radius: 14px; background: rgba(37, 99, 235, .08); color: var(--steel); font-size: .7188rem; margin-right: 6px }
.gst-chip:hover { background: rgba(37, 99, 235, .16) }

.gst-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 6px }
.gst-tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .75rem }
.gst-tbl th { position: sticky; top: 0; z-index: 2; background: var(--surface2); text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line) }
.gst-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface) }
.gst-tbl tr:hover td { background: var(--surface2) }
.gst-tbl th:first-child, .gst-tbl td:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line) }
.gst-tbl th:first-child { z-index: 3 }

@media (max-width: 1100px) { .gst-palco { grid-template-columns: 1fr 1fr } .gst-palco .gst-g:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line) } .gst-palco .gst-g:nth-child(2) { border-left: 0 } }
@media (max-width: 700px) { .gst-palco { grid-template-columns: 1fr } .gst-palco .gst-g + .gst-g { border-left: 0; border-top: 1px solid var(--line) } }
@media (prefers-reduced-motion: reduce) { .gst-kpi { transition: none } }

.gst-segs { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px }
.gst-seg { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 7px; font-size: .8125rem; font-weight: 600; color: var(--muted) }
.gst-seg span { font-weight: 500; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--faint) }
.gst-seg:hover { color: var(--txt) }
.gst-seg.on { background: var(--vault); color: #fff }
.gst-seg.on span { color: rgba(255,255,255,.7) }
.gst-seg:focus-visible { outline: 2px solid var(--steel); outline-offset: 1px }
.gst-up.neutro { fill: var(--steel) }
.gst-li:disabled { background: none; color: var(--muted) }
.gst-tbl td.num { text-align: right; font-variant-numeric: tabular-nums }
