/* Demo do fluxo de dados. Tudo com prefixo td-dd-. Usa as variáveis da página (:root). */
.td-dd {
  --td-dd-borda: rgba(245, 242, 234, .09);
  --td-dd-suave: rgba(245, 242, 234, .72);
  --td-dd-fraco: rgba(245, 242, 234, .62);
  --td-dd-vidro: rgba(245, 242, 234, .035);
  --td-dd-azul-claro: #A9C4E6;
  --td-dd-verde: #7FD6A6;
  position: relative;
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--marfim, #F5F2EA);
  font-family: var(--texto, "Montserrat"), system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  container-type: inline-size;
}
.td-dd *, .td-dd *::before, .td-dd *::after { box-sizing: border-box; }
.td-dd-btn {
  appearance: none; -webkit-appearance: none;
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: inherit; cursor: pointer;
}
.td-dd-btn:focus-visible { outline: 2px solid var(--dourado, #C9A24B); outline-offset: 2px; }
.td-dd-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.td-dd-ico--peq { width: 12px; height: 12px; stroke-width: 2.2; }

.td-dd-cabeca { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.td-dd-selo {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(201, 162, 75, .35); background: rgba(201, 162, 75, .08);
  color: var(--marfim, #F5F2EA); font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.td-dd-selo-ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--dourado, #C9A24B); }

.td-dd-quadro {
  border-radius: 20px; border: 1px solid var(--td-dd-borda); overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 50% 28%, rgba(62, 111, 168, .16), transparent 70%),
    var(--navy-fundo, #060F1F);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

/* Diagrama */
.td-dd-fluxo { padding: 22px 22px 8px; }
.td-dd-svg { display: block; width: 100%; height: auto; overflow: visible; }
.td-dd-svg--estreito { display: none; }
.td-dd-fio { fill: none; stroke: rgba(62, 111, 168, .4); stroke-width: 1.5; stroke-dasharray: 3 7; animation: td-dd-corre 1.4s linear infinite; }
.td-dd-fio--out { stroke: rgba(201, 162, 75, .28); }
.td-dd-fio--ativo { stroke: rgba(201, 162, 75, .85); stroke-width: 2; }
@keyframes td-dd-corre { to { stroke-dashoffset: -20; } }
.td-dd-part { fill: var(--td-dd-azul-claro); opacity: .95; }
.td-dd-part--ouro { fill: var(--dourado, #C9A24B); }
.td-dd-no-caixa { fill: var(--navy-medio, #132C4F); stroke: rgba(245, 242, 234, .14); stroke-width: 1; transition: stroke .3s, fill .3s; }
.td-dd-no-ico { fill: none; stroke: var(--td-dd-azul-claro); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.td-dd-no-txt { fill: var(--marfim, #F5F2EA); font-family: var(--texto, "Montserrat"), system-ui, sans-serif; font-size: 14px; font-weight: 600; }
.td-dd-no-txt--peq { font-size: 11.5px; }
.td-dd-svg--estreito .td-dd-no--fonte .td-dd-no-txt { font-size: 12px; }
.td-dd-no--saida .td-dd-no-ico { stroke: var(--dourado, #C9A24B); }
.td-dd-no--ativo .td-dd-no-caixa { stroke: var(--dourado, #C9A24B); stroke-width: 1.5; fill: #1A3862; }
.td-dd-cil { fill: var(--navy-medio, #132C4F); stroke: var(--dourado, #C9A24B); stroke-width: 1.6; }
.td-dd-cil-linha { fill: none; stroke: rgba(201, 162, 75, .55); stroke-width: 1.2; }
.td-dd-cil-topo { fill: #1F3F6B; stroke: var(--dourado, #C9A24B); stroke-width: 1.6; }
.td-dd-luz { fill: var(--td-dd-verde); animation: td-dd-pisca 1.6s ease-in-out infinite; }
.td-dd-luz--2 { animation-delay: .8s; }
@keyframes td-dd-pisca { 50% { opacity: .25; } }
.td-dd-onda { fill: none; stroke: rgba(62, 111, 168, .5); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: td-dd-onda 3.2s ease-out infinite; }
.td-dd-onda--2 { animation-delay: 1.6s; }
@keyframes td-dd-onda { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
.td-dd-banco-txt { fill: var(--marfim, #F5F2EA); font-family: var(--display, "Poppins"), sans-serif; font-size: 16px; font-weight: 600; }
.td-dd-banco-sub { fill: var(--td-dd-suave); font-family: var(--texto, "Montserrat"), sans-serif; font-size: 12px; }
.td-dd--pausa .td-dd-fio, .td-dd--pausa .td-dd-luz, .td-dd--pausa .td-dd-onda { animation-play-state: paused; }
.td-dd--final .td-dd-onda { display: none; }

/* Painel e campanha */
.td-dd-base { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; padding: 8px 22px 22px; }
.td-dd-dash, .td-dd-camp { min-width: 0; padding: 16px; border-radius: 14px; border: 1px solid var(--td-dd-borda); background: rgba(10, 27, 51, .85); }
.td-dd-dash-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.td-dd-dash-t { margin: 0; font-family: var(--display, "Poppins"), sans-serif; font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--marfim, #F5F2EA); }
.td-dd-ao-vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--td-dd-suave); }
.td-dd-ao-vivo-ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--td-dd-verde); box-shadow: 0 0 0 0 rgba(127, 214, 166, .6); animation: td-dd-vivo 2s infinite; }
@keyframes td-dd-vivo { 70% { box-shadow: 0 0 0 6px rgba(127, 214, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 214, 166, 0); } }

.td-dd-abas { display: flex; gap: 6px; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: rgba(6, 15, 31, .7); overflow-x: auto; scrollbar-width: none; }
.td-dd-aba { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--td-dd-suave); white-space: nowrap; transition: background .25s, color .25s; }
.td-dd-aba .td-dd-ico { width: 15px; height: 15px; }
.td-dd-aba:hover { color: var(--marfim, #F5F2EA); }
.td-dd-aba--ativa { background: var(--marfim, #F5F2EA); color: var(--navy, #0A1B33); }

.td-dd-painel[hidden] { display: none; }
.td-dd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.td-dd-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 11px; border-radius: 11px; background: var(--td-dd-vidro); border: 1px solid var(--td-dd-borda); }
.td-dd-kpi-r { font-size: 11px; color: var(--td-dd-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-dd-kpi-v { font-family: var(--display, "Poppins"), sans-serif; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-dd-kpi-d { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--td-dd-verde); }
.td-dd-graf { padding: 12px; border-radius: 11px; background: var(--td-dd-vidro); border: 1px solid var(--td-dd-borda); }
.td-dd-graf-t { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--td-dd-fraco); }

.td-dd-hbars { display: flex; flex-direction: column; gap: 9px; }
.td-dd-hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 48px; align-items: center; gap: 10px; }
.td-dd-hbar-r { font-size: 12px; color: var(--td-dd-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-dd-hbar-v { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.td-dd-hbar-svg { display: block; width: 100%; height: 10px; }
.td-dd-trilho { fill: rgba(245, 242, 234, .07); }
.td-dd-barra { fill: var(--azul, #3E6FA8); }
.td-dd-barra--ouro { fill: var(--dourado, #C9A24B); }
.td-dd-marco { fill: rgba(245, 242, 234, .5); }
.td-dd-painel--anima .td-dd-hbar .td-dd-barra { transform-box: fill-box; transform-origin: left center; animation: td-dd-cresce-x .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--td-dd-i, 0) * .09s); }
@keyframes td-dd-cresce-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.td-dd-vbars-svg { display: block; width: 100%; height: 150px; }
.td-dd-grade { fill: none; stroke: rgba(245, 242, 234, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.td-dd-painel--anima .td-dd-barra--v { transform-box: fill-box; transform-origin: center bottom; animation: td-dd-cresce-y .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--td-dd-i, 0) * .09s); }
@keyframes td-dd-cresce-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.td-dd-eixo { display: flex; margin-top: 6px; }
.td-dd-eixo-i { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; font-size: 11px; color: var(--td-dd-fraco); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-dd-eixo-i b { font-size: 12px; color: var(--marfim, #F5F2EA); font-weight: 700; }
.td-dd-linha .td-dd-eixo-i { flex: 0 0 auto; width: 0; overflow: visible; }
.td-dd-linha .td-dd-eixo { justify-content: space-between; padding: 0 2px; }
.td-dd-linha-area { position: relative; }
.td-dd-linha-svg { display: block; width: 100%; height: 150px; }
.td-dd-linha-traco { fill: none; stroke: var(--dourado, #C9A24B); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.td-dd-linha-ponta { position: absolute; right: 0; top: -2px; padding: 3px 8px; border-radius: 7px; background: rgba(201, 162, 75, .16); color: var(--marfim, #F5F2EA); font-size: 11.5px; font-weight: 700; }
.td-dd-painel--anima .td-dd-linha-svg { animation: td-dd-revela 1.2s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes td-dd-revela { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.td-dd-painel--anima .td-dd-kpi { animation: td-dd-entra .5s ease-out both; animation-delay: calc(var(--td-dd-i, 0) * .07s); }
@keyframes td-dd-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.td-dd-camp { display: flex; flex-direction: column; border-color: rgba(201, 162, 75, .4); background: linear-gradient(160deg, rgba(201, 162, 75, .1), rgba(10, 27, 51, .9) 45%); }
.td-dd-camp-topo { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.td-dd-camp-selo { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--dourado, #C9A24B); color: var(--navy, #0A1B33); }
.td-dd-camp-titulo { margin: 0; font-family: var(--display, "Poppins"), sans-serif; font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--marfim, #F5F2EA); }
.td-dd-camp-sub { margin: 2px 0 0; font-size: 12px; line-height: 1.4; color: var(--td-dd-suave); }
.td-dd-camp-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.td-dd-camp-item { display: flex; gap: 11px; align-items: flex-start; margin: 0; padding: 11px; border-radius: 11px; background: rgba(6, 15, 31, .55); border: 1px solid var(--td-dd-borda); }
.td-dd-camp-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: rgba(62, 111, 168, .22); color: var(--td-dd-azul-claro); }
.td-dd-camp-item--cortar .td-dd-camp-ico { background: rgba(233, 140, 120, .16); color: #F0A898; }
.td-dd-camp-txt { display: flex; flex-direction: column; min-width: 0; }
.td-dd-camp-r { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dourado, #C9A24B); }
.td-dd-camp-t { font-size: 13px; font-weight: 600; }
.td-dd-camp-d { font-size: 11.5px; color: var(--td-dd-suave); }
.td-dd--on .td-dd-camp-item { animation: td-dd-entra .6s ease-out both; }
.td-dd--on .td-dd-camp-item:nth-child(2) { animation-delay: .5s; }
.td-dd--on .td-dd-camp-item:nth-child(3) { animation-delay: 1s; }

@container (max-width: 900px) {
  .td-dd-base { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 720px) {
  .td-dd-svg--largo { display: none; }
  .td-dd-svg--estreito { display: block; }
  .td-dd-fluxo { padding: 14px 10px 4px; }
  .td-dd-base { padding: 6px 10px 12px; gap: 10px; }
  .td-dd-dash, .td-dd-camp { padding: 12px; }
  .td-dd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-dd-aba { padding: 8px 6px; font-size: 12px; }
  .td-dd-aba .td-dd-ico { display: none; }
}
@container (max-width: 400px) {
  .td-dd-hbar { grid-template-columns: 78px minmax(0, 1fr) 38px; gap: 8px; }
  .td-dd-kpi-v { font-size: 17px; }
  .td-dd-eixo-i { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .td-dd-fio, .td-dd-luz, .td-dd-onda, .td-dd-ao-vivo-ponto, .td-dd-camp-item,
  .td-dd-painel--anima .td-dd-barra, .td-dd-painel--anima .td-dd-linha-svg, .td-dd-painel--anima .td-dd-kpi { animation: none; }
}
