@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;700&display=swap');

:root {
  --ambar: #FF9E1B; --ambar-txt: #FF8A00; --ambar-claro: #FFC22E;
  --grafite: #1F2227; --tinta2: #3A3E44;
  --offwhite: #F6F5F2; --branco: #FFFFFF;
  --linha: #E3E3DF; --txt2: #7A7E84; --dado: #C9CBCF;
  --d-txt: #F6F5F2; --d-txt2: #9A9EA5; --d-grade: #34383F; --d-linha: #3A3E45;
  --ok: #1FA35C; --warn: #F2B705; --err: #E5484D; --off: #A3A7AD;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 400; color: var(--grafite);
  background: var(--offwhite); font-size: 15px; line-height: 1.5;
}
a { color: inherit; }
b, strong { font-weight: 700; }

/* ---------- estrutura: menu lateral + barra superior ---------- */
body.app { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--grafite); color: var(--d-txt); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid #15171B; }
.side-marca { display: block; padding: 22px 22px 18px; font-size: 20px; text-decoration: none; color: var(--d-txt); border-bottom: 1px dashed var(--d-linha); }
.side-marca b { color: var(--ambar); }
.side-marca small { display: block; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--d-txt2); margin-top: 2px; }
.side-nav { flex: 1; padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.side-sec { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: #6C7078; padding: 14px 10px 6px; font-weight: 700; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; color: #C9CCD2; text-decoration: none; font-size: 14px; border-left: 2px solid transparent; }
.side-nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.side-nav a:hover { background: #262A30; color: var(--d-txt); }
.side-nav a.on { background: #2A2E34; color: #fff; font-weight: 700; border-left-color: var(--ambar); }
.side-nav a.on svg { stroke: var(--ambar); }
.badge { margin-left: auto; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.side-user { border-top: 1px dashed var(--d-linha); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-user a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--d-txt); font-size: 13px; min-width: 0; }
.side-user a > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { display: block; color: var(--d-txt2); font-size: 11px; }
.side-user .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--ambar-claro), var(--ambar-txt)); color: var(--grafite); font-weight: 700; display: grid; place-items: center; flex: none; }
.side-user .linkbtn { color: var(--d-txt2); font-size: 12px; }
.side-user form { margin: 0; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topo { height: 58px; background: var(--branco); border-bottom: 1px solid var(--linha); display: flex; align-items: center; gap: 18px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.topo-l { flex: 1; font-size: 14px; color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-l a { color: var(--txt2); text-decoration: none; } .topo-l a:hover { color: var(--grafite); }
.topo-l .sep { margin: 0 8px; color: var(--dado); }
.crumb-on { color: var(--grafite); font-weight: 700; }
.topo-busca { position: relative; margin: 0; }
.topo-busca svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--txt2); stroke-width: 1.8; }
.topo-busca input { width: 300px; padding: 7px 10px 7px 34px; background: var(--offwhite); border-color: transparent; }
.topo-r { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--txt2); white-space: nowrap; }
.ao-vivo { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .14em; font-size: 10.5px; }
.ao-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pisca 2s ease-in-out infinite; }
.relogio { text-transform: capitalize; }
main { width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; flex: 1; }
footer.rod { padding: 14px 28px 22px; color: var(--txt2); font-size: 11.5px; border-top: 1px dashed var(--linha); }

/* ---------- cabeçalho de página e indicadores ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 2px 0 2px; }
.page-head .sub { font-size: 13.5px; }
.ph-luz { display: flex; align-items: center; gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.kpi { background: var(--branco); border: 1px solid var(--linha); padding: 16px 18px 14px; position: relative; }
.kpi.destaque { background: var(--grafite); color: var(--d-txt); border-color: var(--grafite); }
.kpi.destaque::before { content: ""; position: absolute; top: -1px; left: -1px; width: 12px; height: 12px; border: solid var(--ambar); border-width: 2px 0 0 2px; }
.kpi-l { font-size: 10.5px; letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; color: var(--txt2); font-weight: 700; }
.kpi.destaque .kpi-l { color: var(--ambar-claro); }
.kpi-v { font-size: 30px; line-height: 1.2; margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 13px; font-weight: 700; color: var(--ambar-txt); margin-left: 5px; }
.kpi.destaque .kpi-v small { color: var(--ambar); }
.kpi-n { font-size: 12px; color: var(--txt2); margin-top: 4px; }
.kpi.destaque .kpi-n { color: var(--d-txt2); }
.mini-bar { display: block; height: 4px; background: #ECEBE7; margin-top: 6px; min-width: 60px; }
.kpi.destaque .mini-bar { background: #34383F; margin-top: 10px; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ambar-claro), var(--ambar-txt)); }

/* ---------- semáforo da frota ---------- */
.g-status { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 16px; align-items: start; }
.alarmes-rec { max-height: 200px; overflow: auto; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { background: var(--branco); border: 1px solid var(--linha); padding: 16px 18px 18px; text-decoration: none; display: flex;
  flex-direction: column; gap: 2px; position: relative; overflow: hidden; transition: border-color .15s, transform .15s; }
.tile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--off); }
.tile.normal::after { background: var(--ok); } .tile.alerta::after { background: var(--warn); } .tile.falha::after { background: var(--err); }
.tile:hover { border-color: var(--dado); transform: translateY(-1px); }
.tile.sel { border-color: var(--grafite); box-shadow: inset 0 0 0 1px var(--grafite); }
.tile-luz { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #F1F1EE; }
.tile-luz i { width: 16px; height: 16px; border-radius: 50%; background: var(--off); }
.tile.normal .tile-luz { background: rgba(31,163,92,.12); } .tile.normal .tile-luz i { background: var(--ok); box-shadow: 0 0 10px rgba(31,163,92,.6); }
.tile.alerta .tile-luz { background: rgba(242,183,5,.15); } .tile.alerta .tile-luz i { background: var(--warn); box-shadow: 0 0 10px rgba(242,183,5,.7); }
.tile.falha .tile-luz { background: rgba(229,72,77,.12); } .tile.falha .tile-luz i { background: var(--err); box-shadow: 0 0 10px rgba(229,72,77,.6); }
.tile-n { font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile-t { font-weight: 700; font-size: 14px; }
.tile-d { font-size: 12px; color: var(--txt2); margin-top: auto; padding-top: 6px; }
.painel { background: var(--branco); border: 1px solid var(--linha); padding: 14px 18px; }
.painel-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.painel-h a { font-size: 12.5px; color: var(--ambar-txt); text-decoration: none; font-weight: 700; }
.alarmes-rec { display: flex; flex-direction: column; }
.al-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px dashed var(--linha); text-decoration: none; }
.al-item:hover b { text-decoration: underline; }
.al-txt { min-width: 0; font-size: 13px; line-height: 1.35; }
.al-txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-txt small { color: var(--txt2); font-size: 12px; }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--off); }
.sev.critico { background: var(--err); } .sev.importante { background: #F08A24; } .sev.secundario { background: var(--warn); } .sev.aviso { background: var(--off); }
.graf { margin-bottom: 16px; }

/* ---------- lista de usinas ---------- */
.lista { padding: 0; }
.lista-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--linha); flex-wrap: wrap; margin: 0; }
.lista-f { display: flex; gap: 8px; flex-wrap: wrap; }
.lista-f select { padding: 6px 8px; font-size: 13px; }
.lista-f .btn { padding: 6px 12px; font-size: 13px; }
.tabwrap.flat { border: 0; }
table.usinas td { vertical-align: middle; padding: 9px 12px; }
table.usinas tbody tr { cursor: pointer; }
table.usinas tbody tr:hover { background: #FBF7F0; }
table.usinas tr.row-falha td:first-child { box-shadow: inset 3px 0 0 var(--err); }
table.usinas tr.row-alerta td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.usinas tr.row-offline, table.usinas tr.row-conectando { color: #6C7078; }
.u-nome { display: flex; gap: 10px; align-items: flex-start; min-width: 240px; }
.u-nome .luz { margin-top: 5px; }
.u-nome .tag { font-size: 9.5px; padding: 0 5px; }
.clima-c { display: flex; align-items: center; gap: 8px; }
.clima-c b { display: block; font-size: 13px; }
.clima-c small { display: block; font-size: 11.5px; color: var(--txt2); white-space: nowrap; }
.spark-c { width: 150px; }
.spark { width: 132px; height: 34px; display: block; overflow: visible; }
.spark .base { stroke: #E3E3DF; stroke-width: 1; }
.spark .area { fill: rgba(255,158,27,.22); }
.spark .ln { fill: none; stroke: var(--ambar-txt); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark .now { stroke: #C9CBCF; stroke-width: 1; stroke-dasharray: 2 2; }
.spark.offline .ln, .spark.conectando .ln { stroke: var(--off); } .spark.offline .area, .spark.conectando .area { fill: rgba(163,167,173,.18); }
.spark.falha .ln { stroke: var(--err); } .spark.falha .area { fill: rgba(229,72,77,.12); }
.spark-vazio { font-size: 11.5px; color: var(--dado); }
td.n .mini-bar { width: 70px; margin-left: auto; }

/* ---------- clima na página da usina ---------- */
.clima-card { display: flex; align-items: center; gap: 16px; background: var(--branco); border: 1px solid var(--linha); padding: 12px 18px; }
.cc-main b { display: block; font-size: 26px; line-height: 1.1; }
.cc-main span { font-size: 12.5px; color: var(--txt2); }
.clima-card dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0 0 0 8px; padding-left: 16px; border-left: 1px dashed var(--linha); font-size: 12.5px; }
.clima-card dt { color: var(--txt2); } .clima-card dd { margin: 0; font-weight: 700; text-align: right; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--txt2); font-weight: 700; }
h1 { font-size: 28px; font-weight: 700; margin: 4px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.lede { color: var(--txt2); font-size: 16px; margin: 0 0 22px; max-width: 820px; }
hr.tr { border: 0; border-top: 1px dashed var(--linha); margin: 26px 0; }
.demo { background: var(--grafite); color: var(--d-txt); font-size: 13px; text-align: center; padding: 6px; }

/* ---------- moldura com cantinhos âmbar ---------- */
.frame { position: relative; border: 1px dashed var(--linha); background: var(--branco); padding: 20px 22px; }
.frame::before, .frame::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--ambar); border-style: solid; }
.frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.frame.dark { background: var(--grafite); border-color: var(--d-linha); color: var(--d-txt); }

/* ---------- métricas ---------- */
.metricas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.metrica { padding: 4px 22px; border-left: 1px dashed var(--linha); }
.metrica:first-child { border-left: 0; padding-left: 0; }
.metrica .v { font-size: 34px; line-height: 1.15; letter-spacing: -.01em; }
.metrica .v small { font-size: 15px; font-weight: 700; color: var(--ambar-txt); margin-left: 4px; }
.metrica .n { font-size: 13px; color: var(--txt2); margin-top: 2px; }

/* ---------- status (semáforo) ---------- */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--off); }
.st.normal::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(31,163,92,.15); }
.st.alerta::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(242,183,5,.18); }
.st.falha::before { background: var(--err); box-shadow: 0 0 0 3px rgba(229,72,77,.16); }
.st.offline::before, .st.conectando::before { background: var(--off); }
.statusbar { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.statusbar a { text-decoration: none; }
.luz { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.luz i { width: 10px; height: 10px; border-radius: 50%; background: var(--off); flex: none; }
.luz.normal i { background: var(--ok); box-shadow: 0 0 0 3px rgba(31,163,92,.16), 0 0 8px rgba(31,163,92,.45); }
.luz.alerta i { background: var(--warn); box-shadow: 0 0 0 3px rgba(242,183,5,.2), 0 0 8px rgba(242,183,5,.5); }
.luz.falha i { background: var(--err); box-shadow: 0 0 0 3px rgba(229,72,77,.18), 0 0 8px rgba(229,72,77,.5); animation: pisca 1.6s ease-in-out infinite; }
.luz.offline i { background: var(--off); }
.luz.conectando i { background: transparent; border: 1.5px dashed var(--off); }
@keyframes pisca { 50% { opacity: .45; } }

/* ---------- filtros ---------- */
.filtros { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 22px 0 12px; }
.filtros label { display: flex; flex-direction: column; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--txt2); gap: 4px; font-weight: 700; }
input, select, textarea {
  font: inherit; font-size: 14px; border: 1px solid var(--linha); background: var(--branco); color: var(--grafite);
  padding: 8px 10px; border-radius: 0; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ambar-txt); }
button, .btn {
  font: inherit; font-size: 14px; font-weight: 700; background: var(--grafite); color: var(--offwhite); border: 0;
  padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block;
}
button.sec, .btn.sec { background: var(--branco); color: var(--grafite); border: 1px solid var(--linha); }
button:hover, .btn:hover { background: var(--tinta2); }
button.sec:hover { background: var(--offwhite); }

/* ---------- tabela ---------- */
.tabwrap { overflow-x: auto; background: var(--branco); border: 1px dashed var(--linha); }
table.acdc { width: 100%; border-collapse: collapse; font-size: 14px; }
table.acdc th { text-align: left; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--txt2); font-weight: 700; padding: 11px 12px; border-bottom: 1px dashed var(--linha); white-space: nowrap; }
table.acdc td { padding: 10px 12px; border-bottom: 1px dashed var(--linha); vertical-align: top; }
table.acdc tr:last-child td { border-bottom: 0; }
table.acdc td.n, table.acdc th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.acdc tbody tr:hover { background: #FBFAF8; }
table.acdc a.nome { font-weight: 700; text-decoration: none; }
table.acdc a.nome:hover { text-decoration: underline; }
.sub { color: var(--txt2); font-size: 12.5px; }
.tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta2); border: 1px solid var(--linha); padding: 1px 6px; white-space: nowrap; }
.nalarm { font-weight: 700; color: var(--ambar-txt); }
.vazio { padding: 28px; text-align: center; color: var(--txt2); }

/* ---------- grades ---------- */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.g3 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.ficha { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.ficha dt { color: var(--txt2); }
.ficha dd { margin: 0; }
.chart-title { font-weight: 700; font-size: 16px; margin: 0; }
.chart-sub { color: var(--d-txt2); font-size: 12.5px; margin: 2px 0 12px; }
.chart-box { position: relative; height: 260px; }
.msg { padding: 10px 14px; border: 1px dashed var(--ambar-txt); background: #FFF8EC; margin: 12px 0; font-size: 14px; }
.msg.err { border-color: var(--grafite); background: var(--branco); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-l { background: var(--grafite); color: var(--d-txt); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-l .marca { color: var(--d-txt); }
.login-l h1 { font-size: 34px; max-width: 460px; }
.login-l p { color: var(--d-txt2); max-width: 440px; }
.login-r { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-r form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.login-r label { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--txt2); font-weight: 700; display: flex; flex-direction: column; gap: 4px; }


@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .g-status { grid-template-columns: 1fr; }
  .topo-busca input { width: 200px; }
}
@media (max-width: 900px) {
  body.app { display: block; }
  .side { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-marca { border: 0; padding: 12px 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; padding: 0 8px 8px; width: 100%; }
  .side-sec, .side-user { display: none; }
  .topo { position: static; padding: 0 16px; } .topo-r { display: none; } .topo-busca input { width: 100%; }
  main { padding: 18px 16px 40px; }
  .kpis, .kpis.k4 { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .clima-card { width: 100%; flex-wrap: wrap; }
  .metricas { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .metrica:nth-child(3) { border-left: 0; padding-left: 0; }
  .g2, .g3, .login-wrap { grid-template-columns: 1fr; }
  .login-l { padding: 32px; }
  nav.menu { gap: 12px; }
  .top .in { flex-wrap: wrap; gap: 12px; }
  .hide-m { display: none; }
}

/* ================= equipamento ================= */
.eq-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.eq-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.eq-side select { min-width: 240px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head p { margin: 0; }
.tag.warn { color: var(--ambar-txt); border-color: var(--ambar-txt); }

/* fluxo DC -> inversor -> AC */
.flow { display: grid; grid-template-columns: 1fr 80px 1fr 80px 1fr; align-items: center; margin-bottom: 22px; }
.flow-node { background: var(--branco); border: 1px dashed var(--linha); padding: 16px 18px; }
.flow-node.core { background: var(--grafite); color: var(--d-txt); border-color: var(--d-linha); position: relative; }
.flow-node.core .eyebrow { color: var(--ambar-claro); }
.flow-node.core .sub { color: var(--d-txt2); }
.flow-node.core::before, .flow-node.core::after { content: ""; position: absolute; width: 10px; height: 10px; border: solid var(--ambar); }
.flow-node.core::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.flow-node.core::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.flow-v { font-size: 28px; line-height: 1.2; }
.flow-v small { font-size: 13px; font-weight: 700; color: var(--ambar-txt); margin-left: 4px; }
.flow-arrow { height: 2px; background: var(--linha); position: relative; margin: 0 8px; overflow: hidden; }
.flow-arrow.on { background: rgba(255,138,0,.25); }
.flow-arrow.on span { position: absolute; top: 0; left: -30%; width: 30%; height: 2px; background: var(--ambar-txt); animation: flui 1.6s linear infinite; }
@keyframes flui { to { left: 100%; } }

/* barras e medidores */
.gauge { height: 4px; background: var(--linha); margin: 8px 0 4px; }
.gauge span { display: block; height: 100%; background: linear-gradient(90deg, var(--ambar-claro), var(--ambar-txt)); }
.bar { height: 8px; background: #F1F0EC; }
.bar span { display: block; height: 100%; background: var(--ambar); }
tr.low .bar span { background: var(--grafite); }
tr.low td { background: #FFF8EC; }
table.acdc.tight td, table.acdc.tight th { padding: 7px 10px; }

/* fases */
.phases { display: flex; gap: 18px; align-items: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--linha); }
.phase { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.phase-bar { width: 26px; height: 90px; background: #F1F0EC; display: flex; align-items: flex-end; }
.phase-bar span { display: block; width: 100%; background: var(--ambar); }
.ficha.mini { grid-template-columns: auto auto; font-size: 13px; margin-left: auto; gap: 3px 14px; }

/* gráfico com seletor */
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.daynav { display: flex; gap: 6px; align-items: center; }
.daynav input { background: #2A2E34; color: var(--d-txt); border-color: var(--d-linha); color-scheme: dark; }
.dark-btn { background: #2A2E34; border: 1px solid var(--d-linha); color: var(--d-txt); padding: 6px 12px; }
.dark-btn:hover { background: #34383F; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 14px; }
.chips .grp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .grp-chips > span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--d-txt2); margin-right: 2px; }
.chip { font: inherit; font-size: 12.5px; font-weight: 400; background: transparent; color: var(--d-txt2); border: 1px dashed var(--d-linha); padding: 3px 9px; cursor: pointer; }
.chip:hover { color: var(--d-txt); background: transparent; }
.chip.on { color: var(--grafite); background: var(--chip, var(--ambar)); border: 1px solid var(--chip, var(--ambar)); font-weight: 700; }
.chart-box.tall { height: 340px; }
details.grp { border-top: 1px dashed var(--linha); padding: 8px 0; }
details.grp summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
details.grp table { margin-top: 6px; background: var(--branco); }

/* cartões do sinóptico da usina */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { display: block; text-decoration: none; background: var(--branco); border: 1px dashed var(--linha); padding: 14px 16px; position: relative; transition: border-color .15s; }
.card:hover { border-color: var(--ambar-txt); }
.card:hover::after { content: ""; position: absolute; top: -1px; left: -1px; width: 10px; height: 10px; border: solid var(--ambar); border-width: 2px 0 0 2px; }
.card.off { opacity: .7; }
.card-top { display: flex; align-items: center; gap: 4px; }
.card-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-v { font-size: 26px; margin-top: 8px; }
.card-v small { font-size: 12px; font-weight: 700; color: var(--ambar-txt); margin-left: 4px; }
.card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt2); margin-top: 6px; }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 6px; }
  .flow-arrow { height: 18px; width: 2px; margin: 0 auto; }
  .eq-side { align-items: flex-start; }
}

/* login e utilitários */
.marca { text-decoration: none; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.marca b { font-weight: 700; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--tinta2); font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { background: none; }
.sev-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; } .sev-tag .sev { margin-top: 0; }
.acoes { display: flex; gap: 8px; align-items: center; } .acoes form { margin: 0; }
.al-orient { max-width: 420px; line-height: 1.4; }
.sec-head form { margin: 0; }
.rep { font-size: 11px; font-weight: 700; color: var(--txt2); border: 1px solid var(--linha); padding: 0 5px; margin-left: 4px; }
.ao-vivo.off { color: var(--txt2); } .ao-vivo.off i { background: var(--off); animation: none; } #auto-t { font-variant-numeric: tabular-nums; }

/* ================= logo vivo ================= */
.logo-acdc { display: block; overflow: visible; color: #F6F5F2; }
.logo-acdc .vazio { fill: rgba(255,255,255,.09); stroke: rgba(255,158,27,.28); stroke-width: 1.2; }
.logo-acdc rect.fill { transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.logo-acdc .simbolo { filter: drop-shadow(0 0 var(--glow, 4px) rgba(255,158,27,.45)); }
.logo-acdc .brilho { animation: logo-brilho var(--vel, 4s) linear infinite; }
@keyframes logo-brilho { from { transform: translateX(0); } to { transform: translateX(440px); } }
.logo-acdc.noite .brilho { animation: none; opacity: 0; }
.logo-acdc.noite .cheio { animation: logo-respira 5s ease-in-out infinite; }
.logo-acdc.noite .simbolo { filter: none; }
@keyframes logo-respira { 50% { opacity: .55; } }
.logo-acdc.recorde .peca { animation: logo-festa 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.logo-acdc.recorde .peca[data-k="1"] { animation-delay: .12s; } .logo-acdc.recorde .peca[data-k="2"] { animation-delay: .24s; }
.logo-acdc.recorde .peca[data-k="3"] { animation-delay: .36s; } .logo-acdc.recorde .peca[data-k="4"] { animation-delay: .48s; }
.logo-acdc.recorde .peca[data-k="5"] { animation-delay: .6s; }
@keyframes logo-festa { 0%, 70%, 100% { filter: none; } 80% { filter: brightness(1.35) drop-shadow(0 0 6px #FFC22E); } }
@media (prefers-reduced-motion: reduce) { .logo-acdc .brilho, .logo-acdc .cheio, .logo-acdc .peca { animation: none !important; } }

.side-marca { display: block; padding: 20px 20px 14px; text-decoration: none; border-bottom: 1px dashed var(--d-linha); }
.side-marca .logo-acdc { width: 100%; max-width: 190px; height: auto; }
.side-marca small { display: block; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--d-txt2); margin-top: 8px; }
.logo-info { margin-top: 12px; font-size: 11.5px; color: var(--d-txt2); cursor: help; }
.logo-info .li-top { display: flex; justify-content: space-between; align-items: baseline; }
.logo-info .li-top b { color: var(--ambar); font-size: 13px; }
.logo-info .li-bar { height: 3px; background: #34383F; margin: 5px 0 4px; }
.logo-info .li-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FF8A00, #FFC22E); transition: width 1.4s cubic-bezier(.2,.7,.2,1); }
.logo-info .li-bot { display: flex; justify-content: space-between; }
.login-l .logo-acdc { width: 100%; max-width: 420px; height: auto; }
.perfil-opc { display: grid; gap: 8px; }
.perfil { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--linha); padding: 10px 12px; cursor: pointer; }
.perfil:has(input:checked) { border-color: var(--ambar-txt); background: #FFF8EC; }
.perfil input { margin-top: 3px; accent-color: var(--ambar-txt); }
.perfil b { display: block; font-size: 14px; } .perfil small { color: var(--txt2); font-size: 12px; }
.senha-l { display: flex; gap: 6px; } .senha-l input { flex: 1; min-width: 0; }
