/* Tema Parzbyte · gráficos do Corbel: números com mini gráfico, medidor, colunas com grade, mapa de calor, rosca e dica. */


.info { display: inline-grid; place-items: center; border-radius: 50%; color: var(--faint); cursor: help; }
.info .ico { width: 14px; height: 14px; }
.info:hover { color: var(--muted); }

.kpi { display: grid; gap: 12px; min-width: 0; padding: 18px 20px 16px; border-radius: var(--r); }
.kpi__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kpi__fig { display: grid; gap: 8px; min-width: 0; }
.kpi .stat__val { font-size: var(--fs-4xl); white-space: nowrap; }
.kpi .info { color: var(--muted); }
.kpi .stat__meta { flex-wrap: wrap; }
.kpi .more-link { justify-self: start; width: 100%; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--muted); }
.kpi .more-link:hover { color: var(--primary-ink); }
.kpi__mini { display: flex; flex: none; align-items: flex-end; justify-content: flex-end; width: 84px; height: 44px; }

.mbars { display: flex; align-items: stretch; gap: 5px; height: 42px; }
.mbar { position: relative; width: 13px; overflow: hidden; border-radius: 5px; background: var(--well); }
.mbar > i { position: absolute; inset: 0; border-radius: 5px; background: var(--c2); }
.mbar:last-child > i { background: var(--primary); }

.spark { width: 84px; height: 40px; overflow: visible; }
.spark__line { fill: none; stroke: var(--c1); stroke-width: 2.2px; stroke-linecap: round; stroke-linejoin: round; }
.spark__dot { fill: var(--surface); stroke: var(--c1); stroke-width: 2.2px; }

.ring { position: relative; width: 46px; height: 46px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5px; }
.ring__track { stroke: var(--well); }
.ring__fill { stroke: var(--c3); stroke-linecap: round; stroke-dasharray: 0 100; }
.ring__pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-2xs); font-weight: 600; }

.eq { display: flex; align-items: stretch; gap: 3px; height: 42px; }
.eq__bar { position: relative; width: 5px; overflow: hidden; border-radius: 3px; background: var(--well); }
.eq__bar > i { position: absolute; inset: 0; border-radius: 3px; background: var(--c2); }
.eq__bar:last-child > i { background: var(--primary); }

.gauge { position: relative; width: 100%; max-width: 290px; margin: 2px auto 0; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge__ticks line { stroke: var(--primary); stroke-width: 2px; stroke-linecap: round; opacity: .14; transition: opacity .25s; }
.gauge__ticks line.is-lit { opacity: .85; }
.gauge__track, .gauge__arc { fill: none; stroke-width: 16px; stroke-linecap: round; }
.gauge__track { stroke: var(--well); }
.gauge__arc { stroke: url(#gauge-grad); stroke-dasharray: 0 100; }
.gauge__knob circle:first-child { fill: var(--surface); stroke: var(--primary); stroke-width: 3px; }
.gauge__knob circle:last-child { fill: var(--primary); }
.gauge__c { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 2px; }
.gauge__c p { display: flex; align-items: center; gap: 6px; }
.gauge__c b { font-family: var(--display); font-size: var(--fs-display); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.gauge__c small { color: var(--faint); font-size: var(--fs-xs); }

.chart { position: relative; padding-bottom: 28px; }
.plot { position: relative; height: 238px; }
.plot__grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.gl { position: relative; height: 0; padding-left: 44px; }
.gl i { display: block; border-top: 1px dashed var(--line-2); }
.gl span { position: absolute; top: -8px; left: 0; width: 36px; color: var(--faint); font-size: var(--fs-2xs); text-align: right; }
.plot__avg { position: absolute; top: 0; left: 44px; right: 0; z-index: 2; height: 0; border-top: 1.5px dashed var(--c4); pointer-events: none; }
.plot__avg span { position: absolute; top: -21px; right: 0; padding: 1px 7px; border-radius: 6px; background: var(--sea-soft); color: var(--sea); font-size: var(--fs-2xs); font-weight: 600; }
.cols { position: absolute; inset: 0 0 0 44px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col { position: relative; display: flex; justify-content: center; height: 100%; border-radius: 10px; }
.col:focus-visible { outline-offset: -2px; }
.col__track { position: relative; width: min(30px, 66%); height: 100%; overflow: hidden; border-radius: 999px; }
.col__fill {
  position: absolute; inset: 0; border-radius: 999px; transition: background-color .25s;
  background: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 7px), var(--hatch-bg);
}
.col:hover .col__fill { background-color: color-mix(in srgb, var(--primary) 12%, transparent); }
.col.is-fc .col__fill {
  border: 1.5px dashed color-mix(in srgb, var(--primary) 50%, transparent);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--hatch) 55%, transparent) 0 2px, transparent 2px 7px);
}
.col__x { position: absolute; bottom: -25px; color: var(--faint); font-size: var(--fs-2xs); transition: color .2s; }
.col.is-on .col__x { color: var(--text); font-weight: 600; }
.hl { position: absolute; top: 0; bottom: 0; left: 0; z-index: 1; width: 30px; overflow: hidden; border-radius: 999px; pointer-events: none; }
.hl__fill {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary) 40%, var(--primary-ink));
  box-shadow: inset 0 1px #ffffff59;
}
.hl.is-fc .hl__fill {
  background: repeating-linear-gradient(-45deg, #ffffff47 0 2px, transparent 2px 7px), linear-gradient(180deg, var(--primary-2), var(--primary));
}
.hl__cap { position: absolute; top: 7px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #ffffff4d; }
.tip {
  position: absolute; top: 0; left: 0; z-index: 3; min-width: 164px; padding: 10px 12px;
  border-radius: 12px; background: var(--ink-btn); color: var(--on-ink-btn);
  box-shadow: var(--shadow-pop); font-size: var(--fs-xs); pointer-events: none;
}
.tip__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-weight: 600; }
.tip__h em { padding: 1px 6px; border-radius: 5px; background: #8ec3ea40; font-size: var(--fs-2xs); font-style: normal; }
.tip dl { display: grid; gap: 4px; margin: 0; }
.tip dl div { display: flex; justify-content: space-between; gap: 18px; }
.tip dt { opacity: .68; }
.tip dd { margin: 0; font-weight: 600; }
.tip .up { color: #5ee6b4; }
.tip .down { color: #ff9ea2; }
:root[data-theme="dark"] .tip .up { color: #08775a; }
:root[data-theme="dark"] .tip .down { color: #c22d34; }

.scale { gap: 4px; color: var(--faint); font-size: var(--fs-2xs); }
.scale span { margin: 0 3px; }
.sw { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.heat { display: grid; grid-template-columns: 98px repeat(7, minmax(0, 1fr)); align-items: center; gap: 7px; }
.heat__d { color: var(--faint); font-size: var(--fs-2xs); font-weight: 500; text-align: center; }
.heat__p { color: var(--faint); font-size: var(--fs-2xs); white-space: nowrap; }
.heat__short { display: none; }
.cell { height: 32px; }
.cell i { display: block; height: 100%; border-radius: 10px; background: var(--c, var(--heat-0)); transition: background-color .35s, box-shadow .2s; }
.cell.is-hot i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--primary); }
.htip {
  position: absolute; top: 0; left: 0; z-index: 3; display: grid; gap: 1px; padding: 7px 11px;
  border-radius: 10px; background: var(--ink-btn); color: var(--on-ink-btn);
  box-shadow: var(--shadow-pop); font-size: var(--fs-xs); white-space: nowrap; opacity: 0; pointer-events: none;
}
.htip b { font-weight: 600; }
.htip span { opacity: .72; }

.legend { display: grid; gap: 2px; margin-top: 14px; }
.legend button { display: flex; align-items: center; gap: 9px; width: 100%; margin-left: -8px; padding: 6px 8px; border-radius: 9px; transition: background-color .2s, opacity .25s; }
.legend button:hover { background: var(--well); }
.legend button.is-dim { opacity: .42; }
.legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend__l { flex: 1; color: var(--muted); font-size: var(--fs-sm); text-align: left; }
.legend__v { font-size: var(--fs-sm); font-weight: 600; }
.donut { position: relative; width: 168px; aspect-ratio: 1; }
.donut svg { display: block; width: 100%; height: 100%; overflow: visible; }
.donut__track { fill: none; stroke: var(--well); stroke-width: 20px; }
.donut__seg { fill: none; stroke-width: 20px; stroke-dasharray: 0 100; cursor: pointer; }
.donut__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut__c b { font-family: var(--display); font-size: var(--fs-4xl); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.donut__c small { color: var(--faint); font-size: var(--fs-xs); }

@media (max-width: 700px) {
  .heat { grid-template-columns: 50px repeat(7, minmax(0, 1fr)); gap: 5px; }
  .heat__long { display: none; }
  .heat__short { display: inline; }
  .cell { height: 26px; }
  .cell i { border-radius: 7px; }
  .plot { height: 210px; }
  .gl { padding-left: 38px; }
  .gl span { width: 32px; }
  .plot__avg, .cols { left: 38px; }
}
@media (max-width: 560px) {
  .kpi { gap: 8px; padding: 14px; }
  .kpi__mini { display: none; }
  .kpi .stat__val { font-size: var(--fs-3xl); }
  .kpi .stat__meta > span:last-child { display: none; }
  .kpi .more-link { padding-top: 8px; font-size: var(--fs-xs); }
  .donut { grid-row: 1; justify-self: center; width: 160px; }
  .scale .sw:nth-child(n+4) { display: none; }
}
