/* Demonstração animada ("Veja como funciona") — dados fictícios. */
.dm { max-width: 560px; margin: 0 auto; }
.dm-bar {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-bottom: none;
  border-radius: 12px 12px 0 0; padding: 8px 12px; font-size: 11px; color: var(--text-faint);
}
.dm-bar i { width: 8px; height: 8px; border-radius: 50%; background: #2b3530; display: inline-block; }
.dm-bar span { margin-left: 8px; background: var(--bg); border-radius: 999px; padding: 2px 12px; }

.dm-stage {
  position: relative; height: 500px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: 0 0 12px 12px;
  font-size: 12px; color: var(--text);
}
.dm-screen { position: absolute; inset: 0; padding: 14px; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.dm-screen.is-on { opacity: 1; }

.dm-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.dm-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dm-btn {
  background: var(--card); border: 1px solid #34413a; border-radius: 8px; padding: 7px 10px;
  font-weight: 600; font-size: 12px; white-space: nowrap; color: var(--text);
}
.dm-fname { color: var(--text-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.dm-field label { display: block; font-size: 10px; color: var(--text-dim); margin-bottom: 3px; }
.dm-field .v {
  height: 28px; line-height: 26px; padding: 0 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; font-size: 12px; white-space: nowrap; overflow: hidden;
}
.dm-field .v.on { border-color: rgba(99,200,50,.6); }
.dm-gen { margin-bottom: 12px; }
.dm-go {
  display: inline-block; background: var(--green); color: #0b1a07; font-weight: 700;
  border-radius: 8px; padding: 9px 16px; font-size: 13px;
}
.dm-go.press, .dm-btn.press { transform: scale(.95); }

.dm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.dm-kpi, .dm-card { background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 7px 8px; }
.dm-kpi small, .dm-card small { display: block; font-size: 9px; letter-spacing: .04em; color: var(--text-dim); text-transform: uppercase; }
.dm-kpi b { font-size: 15px; }
.dm-kpi.hi { border-color: var(--green); }
.dm-kpi.hi b { color: var(--green); }
.dm-donuts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.dm-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.dm-donut {
  --p: 0; width: 66px; height: 66px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #4b5a54 0);
}
.dm-donut::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.dm-donut span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; z-index: 1; }
.dm-donut-wrap em { font-style: normal; font-size: 10px; color: var(--text-dim); line-height: 1.3; }
.dm-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.dm-card b { font-size: 14px; }
.dm-card.hi { border-color: var(--green); }
.dm-card.hi b { color: var(--green); }
.dm-concl { background: rgba(99,200,50,.08); border: 1px solid rgba(99,200,50,.45); border-radius: 9px; padding: 7px 9px; font-size: 11px; line-height: 1.4; color: var(--text-dim); margin-bottom: 10px; }
.dm-concl b { color: var(--green); font-size: 9px; letter-spacing: .06em; display: block; margin-bottom: 2px; }
.dm-hide { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.dm-show { opacity: 1; transform: none; }
.dm-cta.pulse { animation: dmPulse 1s ease-in-out 3; }
@keyframes dmPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(99,200,50,.25); } }

.dm-cursor {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 5; pointer-events: none;
  transition: transform 1s cubic-bezier(.45,.05,.25,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.dm-cursor.click::after {
  content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--green); animation: dmRipple .5s ease-out;
}
@keyframes dmRipple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.dm-balloon {
  position: absolute; z-index: 6; max-width: 230px; padding: 8px 11px;
  background: #1c2b1a; border: 1px solid var(--green); border-radius: 10px;
  font-size: 12px; line-height: 1.4; color: var(--text); opacity: 0; transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease, left .5s ease, top .5s ease; box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.dm-balloon.on { opacity: 1; transform: none; }
.dm-balloon b { color: var(--green); }

.dm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dm-dots { display: flex; gap: 6px; }
.dm-dots i { width: 8px; height: 8px; border-radius: 50%; background: #2b3530; transition: background .3s; }
.dm-dots i.on { background: var(--green); }
.dm-note { font-size: 11px; color: var(--text-faint); }
.dm-replay { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.dm-steps { margin: 14px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.dm-link { display: block; text-align: center; margin-top: 14px; background: var(--green); color: #0b1a07; font-weight: 700; border-radius: 10px; padding: 12px; text-decoration: none; }

@media (max-width: 560px) {
  .dm-stage { height: 630px; }
  .dm-kpis { grid-template-columns: 1fr 1fr; }
  .dm-balloon { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .dm-cursor, .dm-balloon { display: none; }
  .dm-hide { opacity: 1; transform: none; }
}

/* Detalhamento e histórico */
.dm-tb { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.dm-tb th { text-align: left; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); padding: 4px 6px; border-bottom: 1px solid var(--border); font-weight: 600; }
.dm-tb td { padding: 7px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dm-tb td.g { color: var(--green); }
.dm-tb tr.dm-hide { transform: none; }
.dm-tb i { font-style: normal; font-size: 9px; margin-left: 4px; }
.dm-tb i.up { color: var(--green); }
.dm-total td { font-weight: 700; transition: background .5s ease, box-shadow .5s ease; }
.dm-total.glow td { background: rgba(99,200,50,.16); }
.dm-total.glow td:first-child { box-shadow: inset 3px 0 0 var(--green); color: var(--green); }
.dm-total.glow { animation: dmGlow 1.2s ease-in-out 3; }
@keyframes dmGlow { 50% { filter: brightness(1.35); } }
.dm-metodo { background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 11px; line-height: 1.6; color: var(--text-dim); }
.dm-metodo small { display: block; font-size: 9px; letter-spacing: .06em; margin-bottom: 2px; }
.dm-metodo b { color: var(--green); }
.dm-hist .dm-go { margin-top: 6px; }
@media (max-width: 560px) { .dm-tb-h th, .dm-tb-h td { font-size: 9.5px; padding: 6px 3px; } .dm-tb-h i { display: block; margin: 0; } }

/* tabelas sem estourar a largura */
.dm-tb { table-layout: fixed; }
.dm-tb td, .dm-tb th { overflow-wrap: anywhere; }
.dm-detail .dm-tb th:nth-child(1) { width: 42%; } .dm-detail .dm-tb th:nth-child(2) { width: 27%; } .dm-detail .dm-tb th:nth-child(3) { width: 31%; }
.dm-tb-h th:nth-child(1) { width: 21%; } .dm-tb-h th:nth-child(2) { width: 17%; } .dm-tb-h th:nth-child(3) { width: 16%; } .dm-tb-h th:nth-child(4) { width: 25%; } .dm-tb-h th:nth-child(5) { width: 21%; }
@media (max-width: 560px) {
  .dm-screen { padding: 12px 10px; }
  .dm-tb th { font-size: 8px; letter-spacing: 0; padding: 4px 3px; }
  .dm-tb td { font-size: 10.5px; padding: 6px 3px; }
  .dm-tb-h td { font-size: 9.5px; }
}

/* o site define min-width:480px e nowrap para tabelas no celular: aqui não vale */
.dm .dm-tb { min-width: 0; }
.dm .dm-tb thead th { white-space: normal; }

/* Variante com usina conectada */
.dm-conn { border: 1px solid var(--green); background: rgba(99,200,50,.08); border-radius: 8px; padding: 6px 9px; margin-bottom: 8px; font-size: 11px; color: var(--text-dim); }
.dm-conn b { color: var(--text); }
.dm-conn i { color: var(--green); font-style: normal; font-weight: 700; margin-left: 4px; }
.dm-busca { display: flex; align-items: center; gap: 8px; margin: -6px 0 10px; }
.dm-cmsg { font-size: 10px; color: var(--green); line-height: 1.3; }

.dm-usinabox { margin: -2px 0 8px; }
.dm-usinabox .dm-conn { margin-bottom: 6px; }
.dm-usinabox .dm-busca { margin: 0 0 6px; }
