/* --- Reset + base --- */
:root {
  --verde-camim: #2E7D32;
  --verde-claro: #c8e6c9;
  --verde-fundo: #e8f5e9;
  --cinza-bg: #f5f5f5;
  --cinza-borda: #e0e0e0;
  --texto: #212121;
  --texto-suave: #616161;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--cinza-bg);
  color: var(--texto);
  font-size: 14px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }

/* --- Header --- */
.topo {
  background: linear-gradient(135deg, var(--verde-fundo) 0%, var(--verde-claro) 100%);
  border-bottom: 1px solid var(--cinza-borda);
}
.topo-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px;
}
.topo h1 {
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--verde-camim);
}
.topo p {
  margin: 0;
  color: var(--texto-suave);
  font-size: 13px;
}

/* --- Grid 3 colunas --- */
.grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 380px 1fr 360px;
  gap: 16px;
  height: calc(100vh - 110px);
}
.col {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--cinza-borda);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.col-titulo {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--texto-suave);
  border-bottom: 1px solid var(--cinza-borda);
  background: #fafafa;
  border-radius: 6px 6px 0 0;
}
.col-titulo i { margin-right: 6px; color: var(--verde-camim); }

.col-titulo-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.col-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--verde-camim);
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.12s, transform 0.12s;
}
.col-cta i { color: #fff !important; margin: 0; font-size: 10px; }
.col-cta:hover { background: #1b5e20; transform: translateY(-1px); }

/* --- Atalhos (grid 2 colunas mini) --- */
.atalhos {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.atalho {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fafafa;
  border: 1px solid var(--cinza-borda);
  border-left: 3px solid var(--cor, var(--verde-camim));
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
  position: relative;
  min-width: 0;
}
.atalho:hover {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.atalho i {
  color: var(--cor, var(--verde-camim));
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.atalho-titulo {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.atalho-cadeado {
  font-size: 10px !important;
  flex-shrink: 0;
}
.lvl-verde   { color: #2e7d32 !important; }
.lvl-prata   { color: #9e9e9e !important; }
.lvl-dourado { color: #f0ad4e !important; }

/* Legenda dos cadeados — rodapé sticky da coluna de atalhos */
.atalhos-legenda {
  border-top: 1px solid var(--cinza-borda);
  background: #fafafa;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: 0 0 6px 6px;
  flex-shrink: 0;
}
.atalhos-legenda .lg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--texto-suave);
  line-height: 1.3;
}
.atalhos-legenda .lg-item i {
  font-size: 9px;
  width: 10px;
  text-align: center;
}

/* --- Bloco MVV cinematográfico (direita) --- */
.col-mvv {
  background: #0a0f0c;
  border-color: #0a0f0c;
  position: relative;
  overflow: hidden;
}
.col-mvv .col-titulo {
  background: #0a0f0c;
  color: #c8e6c9;
  border-bottom-color: rgba(200, 230, 201, 0.12);
  position: relative;
  z-index: 3;
}
.col-mvv .col-titulo i { color: #66bb6a; }

.mvv {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px 28px;
  border-radius: 0 0 6px 6px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(46, 125, 50, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(102, 187, 106, 0.20) 0%, transparent 50%),
    linear-gradient(135deg, #0a0f0c 0%, #102a18 50%, #0a0f0c 100%);
  min-height: 0;
  overflow: hidden;
}

/* Aura: estática (sem scale), mantém o brilho central sem animação cara */
.mvv-aura {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(102, 187, 106, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.mvv-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  contain: layout style paint;  /* isola repaints da coluna */
}

.mvv-slide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(8px) translateZ(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  will-change: opacity, transform;
}
.mvv-slide.is-in {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}
.mvv-slide.is-out {
  opacity: 0;
  transform: translateY(-8px) translateZ(0);
}

.mvv-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #66bb6a;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mvv-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #66bb6a);
}
.mvv-label .mvv-label-num {
  color: rgba(200, 230, 201, 0.45);
  font-weight: 500;
}

.mvv-text {
  font-family: Georgia, 'Times New Roman', Times, serif;  /* fonte system, sem network */
  font-size: 22px;
  line-height: 1.36;
  color: #e8f5e9;
  font-weight: 500;
  letter-spacing: 0.005em;
}

/* Cada palavra entra com fade + slide para cima, em cascata via --d (delay).
   Tudo GPU (opacity + transform). Sem repaint da fonte. */
.mvv-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) translateZ(0);
  animation: mvv-word-in 0.6s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
@keyframes mvv-word-in {
  to { opacity: 1; transform: translateY(0) translateZ(0); }
}

/* Keywords brilham (glow estatico, leve). */
.mvv-text .kw {
  font-style: italic;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(102, 187, 106, 0.85);
}

/* Barra de progresso embaixo */
.mvv-progress {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 4px;
  margin-top: 18px;
}
.mvv-progress .mvv-bar {
  flex: 1;
  height: 2px;
  background: rgba(200, 230, 201, 0.18);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
.mvv-progress .mvv-bar .mvv-bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #66bb6a, #c8e6c9);
  transform-origin: left;
  transform: scaleX(0);
}
.mvv-progress .mvv-bar.is-active .mvv-bar-fill {
  animation: mvv-bar-fill linear forwards;
}
.mvv-progress .mvv-bar.is-done .mvv-bar-fill {
  transform: scaleX(1);
}
@keyframes mvv-bar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mvv-text .word,
  .mvv-progress .mvv-bar .mvv-bar-fill { animation: none !important; opacity: 1 !important; transform: none !important; }
  .mvv-slide { transition: opacity 0.3s ease !important; transform: none !important; }
}

/* --- Widget de avisos (substitui o iframe) --- */
.aw {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 10px 12px 12px;
  gap: 10px;
  background: #fafafa;
  border-radius: 0 0 6px 6px;
}
.aw-loading, .aw-empty, .aw-error, .aw-postos-empty {
  font-size: 12px;
  color: var(--texto-suave);
  padding: 8px 4px;
}
.aw-error { color: #b91c1c; }
.aw-error a { color: var(--verde-camim); text-decoration: underline; margin-left: 4px; }

.aw-section { display: flex; flex-direction: column; gap: 6px; }
.aw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--texto-suave);
  font-weight: 600;
}
.aw-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  font-feature-settings: "tnum";
}
.aw-count-off { background: var(--verde-claro); color: var(--verde-camim); }
.aw-count-on  { background: #fee2e2; color: #b91c1c; }
.aw-updated   { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; color: #9ca3af; }

/* Lista de avisos */
.aw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aw-item-link {
  display: block;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--cinza-borda);
  border-left: 3px solid #f97316;
  border-radius: 4px;
  transition: background 0.12s, box-shadow 0.12s;
}
.aw-item-link:hover { background: #fffbeb; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.aw-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--texto);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--texto-suave);
}
.aw-meta-posto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-item-foot { font-size: 10px; color: #9ca3af; margin-top: 2px; }

.aw-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.aw-pill-warn { background: #fef3c7; color: #92400e; }
.aw-pill-down { background: #fee2e2; color: #991b1b; }

.aw-more { padding-top: 2px; }
.aw-more a {
  font-size: 11px;
  color: var(--verde-camim);
  text-decoration: underline;
}

/* Grid de postos (bolinhas com letra) */
.aw-postos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  padding-top: 2px;
}
.aw-posto {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  user-select: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.aw-posto:hover { transform: scale(1.08); box-shadow: 0 2px 6px rgba(0,0,0,0.18); }
.aw-posto.lvl-ok       { background: #16a34a; }
.aw-posto.lvl-warn     { background: #eab308; animation: aw-blink 1.4s ease-in-out infinite; }
.aw-posto.lvl-critical { background: #f97316; animation: aw-blink 1.0s ease-in-out infinite; }
.aw-posto.lvl-down     { background: #dc2626; animation: aw-blink 0.7s ease-in-out infinite; }

@keyframes aw-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-posto { animation: none !important; }
}

/* --- Scrollbar discreta na coluna de atalhos --- */
.atalhos::-webkit-scrollbar { width: 6px; }
.atalhos::-webkit-scrollbar-track { background: transparent; }
.atalhos::-webkit-scrollbar-thumb { background: var(--cinza-borda); border-radius: 3px; }
.atalhos::-webkit-scrollbar-thumb:hover { background: #bdbdbd; }

/* --- Responsivo: empilha em telas estreitas --- */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .col-camila iframe { height: 400px; }
  .aw { max-height: 500px; }
}
