/* Radar de Lives v2 — página de detalhes da live */
[data-theme="dark"] { --chart: #D08A00; --chart-soft: rgba(208, 138, 0, .14); }
[data-theme="light"] { --chart: #A15C00; --chart-soft: rgba(161, 92, 0, .10); }

.live-card__foot { gap: 8px; }
.btn .count { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.lv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lv-head { margin-top: 18px; display: flex; gap: 18px; align-items: flex-start; }
.lv-thumb { width: 168px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); flex: none; position: relative; display: grid; place-items: center; color: var(--muted); }
.lv-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-head__body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.lv-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lv-tags .plat-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); font-weight: 600; }
.lv-tags .plat-chip svg.i { width: 13px; height: 13px; }
.lv-title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.lv-who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.lv-who .avatar { width: 26px; height: 26px; font-size: 10px; }
.status-ended { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.status-ended svg.i { width: 13px; height: 13px; }

.collector { margin-top: 14px; display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.collector svg.i { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.collector.is-ok svg { color: var(--ok); }
.collector.is-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.collector.is-warn svg { color: var(--warn); }
.collector.is-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.collector.is-bad svg { color: var(--bad); }
.collector b { color: var(--text-2); font-weight: 600; }

.kpis { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kpi { padding: 14px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi__label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi__label svg.i { width: 14px; height: 14px; }
.kpi__value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__sub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.charts { margin-top: 14px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 10px; min-width: 0; }
.chart-card h3 { margin: 0; font-size: 13px; font-weight: 650; }
.chart-card .chart-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chart { position: relative; margin-top: 10px; height: 190px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart svg:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 4px; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart-soft); }
.chart .bar { fill: var(--chart); }
.chart .bar.is-hover { fill: var(--yellow); }
.chart .xhair { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.chart-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.tip { position: absolute; pointer-events: none; z-index: 5; min-width: 110px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: 12px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.tip[hidden] { display: none; }
.tip strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.tip span { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tip span i { width: 12px; height: 2px; background: var(--chart); border-radius: 2px; display: inline-block; }
.table-view { margin-top: 6px; font-size: 12px; color: var(--muted); }
.table-view summary { cursor: pointer; width: max-content; }
.table-view table { margin-top: 8px; border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.table-view .tv-scroll { max-height: 200px; overflow: auto; }

.lv-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.lv-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.comments-panel .filters { align-items: flex-start; }
.comments { list-style: none; margin: 0; padding: 0; max-height: 720px; overflow: auto; }
.cmt { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.cmt:last-child { border-bottom: 0; }
.cmt.is-new { animation: enter .35s var(--ease) both; }
.cmt .avatar { width: 32px; height: 32px; }
.cmt__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cmt__author { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmt__time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.cmt__text { margin-top: 2px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.cmt__tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); }
.tag--pergunta, .tag--compra, .tag--preco { color: var(--text-2); border-color: var(--border-strong); }
.tag--reclamacao { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.tag--marca { color: var(--yellow-ink); border-color: color-mix(in srgb, var(--yellow) 50%, transparent); }
.money { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--on-yellow); background: var(--yellow); padding: 1px 7px; border-radius: 4px; }
.money svg.i { width: 12px; height: 12px; }
.new-bar { display: flex; justify-content: center; padding: 8px; border-bottom: 1px solid var(--border); }
.more { display: flex; justify-content: center; padding: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card__head h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.card__head h2 svg.i { color: var(--yellow-ink); }
.card__body { padding: 14px 16px; }
.summary { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.summary p { margin: 0 0 8px; }
.summary ul { margin: 0 0 10px; padding-left: 18px; }
.summary strong { color: var(--text); }
.summary-empty { font-size: 13px; color: var(--muted); }

.products { list-style: none; margin: 0; padding: 4px 0; }
.product { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.product:last-child { border-bottom: 0; }
.product__img { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; color: var(--muted); position: relative; }
.product__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product__title { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product__meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.product__price { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.supporters { list-style: none; margin: 0; padding: 4px 0; counter-reset: rank; }
.supporter { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; }
.supporter::before { counter-increment: rank; content: counter(rank); width: 18px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.supporter__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supporter__value { font-weight: 600; font-variant-numeric: tabular-nums; }
.empty-small { padding: 18px 16px; font-size: 12px; color: var(--muted); }

.lv-skeleton .skeleton { border-radius: var(--radius); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--border); }
  .charts, .lv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .lv-head { flex-direction: column; }
  .lv-thumb { width: 100%; }
  .lv-thumb.no-img { display: none; }
  .lv-title { font-size: 20px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--border); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--border) !important; }
}
