/* Sistema de Obras | identidade visual "planta técnica viva".
   Carregado depois de estilo.css e modulos.css: aqui ficam o movimento e o acabamento que dão a cara de tecnologia
   e engenharia. As animações ficam desligadas para quem pediu "reduzir movimento" (bloco no fim deste arquivo).
   Nenhum estilo é embutido nas páginas: a política de segurança só aceita arquivos. */

:root {
  --fonte-titulo: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --fonte-mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", monospace;
  --tec-fundo: #030d20;
  --tec-azul: #0a2850;
  --tec-linha: #7fb6ff;
  --tec-brilho: #60d6ff;
  --tec-alerta: #ffb020;
  --tec-vidro: rgba(6, 20, 45, 0.7);
  --brilho-tema: #7fb6ff;
  --curva: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --brilho-tema: color-mix(in srgb, var(--destaque) 52%, #ffffff); }
}

h1, h2, .kpi-valor, .entrada-texto h2, .heroi-saudacao { font-family: var(--fonte-titulo); }
h1 { font-weight: 700; letter-spacing: -0.015em; }

.planta { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* ================================================================ entrada */

#entrada {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  grid-template-columns: minmax(360px, 1.1fr) minmax(380px, 1fr);
  background:
    radial-gradient(1100px 700px at 80% 18%, rgba(42, 120, 214, 0.30), transparent 62%),
    radial-gradient(800px 560px at 4% 100%, rgba(96, 214, 255, 0.14), transparent 58%),
    linear-gradient(160deg, #0b2f63 0%, #061b3a 46%, #030d20 100%);
}
.entrada-marca { background: none; z-index: 1; padding: 44px 56px; }
.entrada-marca::before, .entrada-marca::after { display: none; }
.entrada-marca::before {
  display: block;
  inset: 0;
  right: -40%;
  width: auto; height: auto; border: 0; border-radius: 0; top: 0;
  background: linear-gradient(90deg, rgba(3, 13, 32, 0.62) 0%, rgba(3, 13, 32, 0.28) 55%, transparent 100%);
  z-index: -1;
}

.entrada-logo-caixa { position: relative; width: fit-content; }
.entrada-logo { display: block; filter: drop-shadow(0 0 18px rgba(96, 214, 255, 0.35)); animation: logo-entra 1s var(--curva) both; }
.entrada-logo-caixa::after {   /* brilho que atravessa a logo de tempos em tempos */
  content: "";
  position: absolute;
  inset: -6px -10px;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  background-size: 260% 100%;
  background-position: 130% 0;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: brilho-logo 7s ease-in-out 1.6s infinite;
}
@keyframes logo-entra { from { opacity: 0; transform: translateY(-10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes brilho-logo { 0%, 62% { background-position: 130% 0; } 92%, 100% { background-position: -40% 0; } }

.entrada-texto { max-width: 520px; }
.entrada-texto h2 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 18px; text-shadow: 0 2px 30px rgba(3, 13, 32, 0.6); }
.entrada-texto h2 .linha { display: block; animation: sobe 0.9s var(--curva) both; }
.entrada-texto h2 .linha:nth-child(2) { animation-delay: 0.14s; color: #bfe0ff; }
.entrada-texto p { animation: sobe 0.9s var(--curva) 0.3s both; text-shadow: 0 1px 16px rgba(3, 13, 32, 0.7); }
.entrada-pontos li { animation: sobe 0.7s var(--curva) both; }
.entrada-pontos li:nth-child(1) { animation-delay: 0.5s; }
.entrada-pontos li:nth-child(2) { animation-delay: 0.62s; }
.entrada-pontos li:nth-child(3) { animation-delay: 0.74s; }
.entrada-pontos li::before { border-color: var(--tec-brilho); }
@keyframes sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.entrada-rodape { display: flex; align-items: center; gap: 10px; font-family: var(--fonte-mono); font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }
.ponto-vivo { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; animation: pulso-verde 2s ease-out infinite; }
@keyframes pulso-verde { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } }

.entrada-formulario { background: none; z-index: 1; padding: 32px 40px 32px 16px; }
.entrada-formulario > section {
  position: relative;
  max-width: 440px;
  padding: 34px 34px 30px;
  border: 1px solid rgba(127, 182, 255, 0.28);
  border-radius: 18px;
  background: var(--tec-vidro);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  color: #fff;
  animation: cartao-entra 0.8s var(--curva) 0.25s both;
}
.entrada-formulario > section::before, .entrada-formulario > section::after {   /* cantoneiras, como numa prancha de desenho */
  content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--tec-brilho); pointer-events: none;
}
.entrada-formulario > section::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; border-top-left-radius: 18px; }
.entrada-formulario > section::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; border-bottom-right-radius: 18px; }
@keyframes cartao-entra { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }

.entrada-formulario h1 { color: #fff; font-size: 1.65rem; line-height: 1.15; }
.entrada-formulario .sub { color: rgba(214, 230, 255, 0.78); }
.entrada-formulario label { color: rgba(228, 238, 255, 0.92); }
.entrada-formulario input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(127, 182, 255, 0.34);
  color: #fff;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.entrada-formulario input::placeholder { color: rgba(214, 230, 255, 0.4); }
.entrada-formulario input:hover { border-color: rgba(127, 182, 255, 0.6); }
.entrada-formulario input:focus-visible { outline: none; border-color: var(--tec-brilho); box-shadow: 0 0 0 3px rgba(96, 214, 255, 0.22), 0 0 26px rgba(96, 214, 255, 0.18); background: rgba(255, 255, 255, 0.09); }
.entrada-formulario input:-webkit-autofill, .entrada-formulario input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 100px #0b2650 inset;
  transition: background-color 9999s;
}
.entrada-formulario button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 214, 255, 0.55);
  background: linear-gradient(135deg, #2a78d6 0%, #1a5cb5 100%);
  box-shadow: 0 8px 24px rgba(42, 120, 214, 0.35);
  padding: 12px 22px;
  transition: transform 0.15s var(--curva), box-shadow 0.15s, border-color 0.15s;
}
.entrada-formulario button::after {   /* reflexo que passa pelo botão ao passar o mouse */
  content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%);
  transform: translateX(-120%); transition: transform 0.6s var(--curva);
}
.entrada-formulario button:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(42, 120, 214, 0.5); border-color: var(--tec-brilho); background: linear-gradient(135deg, #3487e8 0%, #1f68c8 100%); }
.entrada-formulario button:hover::after { transform: translateX(120%); }
.entrada-formulario button.secundario { background: transparent; box-shadow: none; color: #dbe9ff; border-color: rgba(127, 182, 255, 0.4); }
.entrada-formulario button.secundario:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(127, 182, 255, 0.8); box-shadow: none; }
.entrada-formulario button.texto { background: none; box-shadow: none; border: 0; color: var(--tec-brilho); padding: 2px 4px; margin: 14px 0 0; display: block; font-weight: 600; font-size: 0.9rem; }
.entrada-formulario button.texto::after { display: none; }
.entrada-formulario button.texto:hover { background: none; box-shadow: none; transform: none; text-decoration: underline; }
.entrada-formulario button:disabled { transform: none; }
.entrada-formulario .msg.erro { background: rgba(217, 45, 32, 0.2); color: #ffd3ce; border: 1px solid rgba(255, 140, 128, 0.4); }
.entrada-formulario .msg.ok { background: rgba(61, 220, 151, 0.16); color: #c9f6e1; border: 1px solid rgba(61, 220, 151, 0.4); }
.entrada-formulario .msg.aviso { background: rgba(255, 176, 32, 0.16); color: #ffe7b8; border: 1px solid rgba(255, 176, 32, 0.4); }
.entrada-formulario .pequeno, .entrada-formulario .passos { color: rgba(214, 230, 255, 0.82); }
.entrada-formulario code, .entrada-formulario .chave { background: rgba(255, 255, 255, 0.1); color: #fff; }
.entrada-formulario .codigos { color: #fff; }
.entrada-formulario .qr { border-color: rgba(127, 182, 255, 0.4); box-shadow: 0 0 40px rgba(96, 214, 255, 0.22); }
#tela-carregando p { margin: 0; text-align: center; color: rgba(214, 230, 255, 0.85); font-family: var(--fonte-mono); }
#tela-carregando p::after { content: ""; display: block; height: 2px; margin-top: 14px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--tec-brilho), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: carregando 1.4s ease-in-out infinite; }
@keyframes carregando { from { background-position: -60% 0; } to { background-position: 160% 0; } }

/* o selo animado (cadeado do login e escudo do 2FA) */
.selo { width: 84px; height: 84px; margin: -4px 0 8px; }
.selo.selo-pequeno { width: 62px; height: 62px; }
.selo svg { width: 100%; height: 100%; overflow: visible; }
.selo-orbita, .selo-orbita2 { fill: none; stroke: rgba(96, 214, 255, 0.6); stroke-width: 1.2; transform-origin: 48px 48px; }
.selo-orbita { stroke-dasharray: 3 7; animation: giro 22s linear infinite; }
.selo-orbita2 { stroke: rgba(127, 182, 255, 0.5); stroke-dasharray: 22 12; animation: giro 14s linear infinite reverse; }
.selo-escudo { fill: rgba(96, 214, 255, 0.1); stroke: var(--tec-brilho); stroke-width: 2.2; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(96, 214, 255, 0.6)); }
.selo-visto, .selo-cadeado { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.selo-visto { stroke-dasharray: 40; stroke-dashoffset: 40; animation: desenha 3.6s ease-in-out 0.3s infinite; }
.selo-cadeado { stroke-width: 2.6; }
@keyframes giro { to { transform: rotate(360deg); } }
@keyframes desenha { 0% { stroke-dashoffset: 40; } 28%, 78% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -40; } }

/* o campo do código de 6 dígitos */
.otp { position: relative; height: 64px; margin: 6px 0 0; }
.otp-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; height: 100%; }
.otp-slots span {
  display: grid; place-items: center;
  border: 1px solid rgba(127, 182, 255, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font: 700 1.75rem var(--fonte-mono);
  color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.otp-slots span.cheio { border-color: rgba(96, 214, 255, 0.7); background: rgba(96, 214, 255, 0.1); animation: pop 0.18s var(--curva); }
.otp:focus-within .otp-slots span.ativo { border-color: var(--tec-brilho); box-shadow: 0 0 0 3px rgba(96, 214, 255, 0.22), 0 0 26px rgba(96, 214, 255, 0.3); transform: translateY(-2px); }
.otp:focus-within .otp-slots span.ativo:empty::after { content: ""; width: 2px; height: 28px; background: var(--tec-brilho); animation: piscar 1s steps(2, start) infinite; }
@keyframes pop { from { transform: scale(0.88); } to { transform: scale(1); } }
@keyframes piscar { to { visibility: hidden; } }
.entrada-formulario .otp input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  background: transparent; border: 0; box-shadow: none; color: transparent; caret-color: transparent; font-size: 1.6rem; opacity: 1;
}
.entrada-formulario .otp input::selection { background: transparent; }
.entrada-formulario .otp input:focus-visible { box-shadow: none; background: transparent; }
.otp.texto { height: auto; }
.otp.texto .otp-slots { display: none; }
.entrada-formulario .otp.texto input { position: static; height: auto; padding: 14px; color: #fff; caret-color: var(--tec-brilho); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(127, 182, 255, 0.4); font: 600 1.25rem var(--fonte-mono); letter-spacing: 0.12em; text-align: center; border-radius: 12px; }
.otp-relogio { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 0.82rem; color: rgba(214, 230, 255, 0.7); }
.otp-relogio svg { width: 24px; height: 24px; flex: none; transform: rotate(-90deg); }
.relogio-fundo { fill: none; stroke: rgba(127, 182, 255, 0.25); stroke-width: 2.4; }
.relogio-arco { fill: none; stroke: var(--tec-brilho); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 56.55; stroke-dashoffset: 0; }
.otp-relogio.urgente .relogio-arco { stroke: var(--tec-alerta); }

/* ================================================================ estrutura do sistema */

.conteudo {
  background-image:
    linear-gradient(rgba(10, 40, 80, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 40, 80, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  background-color: var(--fundo);
}

.lateral {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(185deg, var(--primaria) 0%, var(--primaria-escura) 38%, #030c1e 130%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.07), 10px 0 36px rgba(3, 13, 32, 0.22);
}
.lateral-marca { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent); }
.lateral-marca::after {   /* o brilho que passa pela marca da obra */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.18) 50%, transparent 62%);
  background-size: 300% 100%; background-position: 140% 0;
  animation: brilho-marca 9s ease-in-out 2s infinite;
}
@keyframes brilho-marca { 0%, 70% { background-position: 140% 0; } 96%, 100% { background-position: -40% 0; } }
.marca-mpe { filter: drop-shadow(0 0 12px rgba(96, 214, 255, 0.28)); }

.nav-item { position: relative; overflow: hidden; transition: background 0.18s, color 0.18s, transform 0.18s var(--curva); }
.nav-item .icone { transition: transform 0.2s var(--curva), color 0.2s; }
.nav-item:hover { transform: translateX(3px); }
.nav-item:hover .icone { transform: scale(1.14); color: var(--brilho-tema); }
.nav-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04));
  box-shadow: inset 3px 0 0 var(--brilho-tema), 0 0 24px rgba(127, 182, 255, 0.12);
  transform: none;
}
.nav-item[aria-current="page"] .icone { color: var(--brilho-tema); }
.nav-item[aria-current="page"]::after { content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--brilho-tema); animation: pulso-tema 2.4s ease-out infinite; }
@keyframes pulso-tema { 0% { box-shadow: 0 0 0 0 rgba(127, 182, 255, 0.7); } 70%, 100% { box-shadow: 0 0 0 8px rgba(127, 182, 255, 0); } }
.nav-item .selo-menu { margin-left: auto; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em; padding: 1px 7px; border-radius: 999px; background: rgba(255, 176, 32, 0.18); color: #ffd48a; }
.nav-item[aria-current="page"] .selo-menu { display: none; }
.nav-titulo { margin: 14px 14px 4px; font-size: 0.7rem; font-weight: 700; color: rgba(255, 255, 255, 0.42); }

.barra-topo { position: sticky; background: rgba(255, 255, 255, 0.88); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); }
.barra-topo::after {   /* fio de luz embaixo da barra */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--destaque) 45%, var(--brilho-tema) 55%, transparent 100%);
  background-size: 40% 100%; background-repeat: no-repeat; animation: fio 7s ease-in-out infinite; opacity: 0.9;
}
@keyframes fio { 0%, 100% { background-position: -30% 0; } 50% { background-position: 130% 0; } }
.trilha-pagina { font-family: var(--fonte-titulo); }
.sino:hover { box-shadow: 0 0 0 4px var(--destaque-suave); }

.aba.entra { animation: aba-entra 0.5s var(--curva); }
@keyframes aba-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.cabeca-pagina h1 { position: relative; padding-left: 16px; }
.cabeca-pagina h1::before { content: ""; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--brilho-tema), var(--destaque)); }

button:not(.texto):not(.chip):not(.nav-item):not(.sino):not(.botao-menu):active { transform: translateY(1px); }
.cartao { transition: box-shadow 0.2s, border-color 0.2s; }
.cartao:hover { border-color: var(--primaria-media); box-shadow: 0 1px 2px rgba(10, 30, 60, 0.06), 0 10px 30px rgba(10, 30, 60, 0.08); }

/* indicadores */
.kpi { position: relative; overflow: hidden; transition: transform 0.2s var(--curva), box-shadow 0.2s; }
.kpi::before { content: ""; position: absolute; right: -22px; top: -22px; width: 82px; height: 82px; border-radius: 50%; background: radial-gradient(circle, var(--destaque-suave) 0%, transparent 70%); pointer-events: none; }
.kpi::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--destaque), transparent); transform-origin: left; transform: scaleX(0.2); transition: transform 0.5s var(--curva); }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(10, 30, 60, 0.12); }
.kpi:hover::after { transform: scaleX(1); }
.kpi-valor { font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi.alerta::after { background: linear-gradient(90deg, #d92d20, transparent); }

.obra-card { position: relative; overflow: hidden; }
.obra-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, var(--primaria-suave), transparent 70%); pointer-events: none; }
.obra-card:hover { transform: translateY(-4px); }

/* ================================================================ faixas com a planta viva (Painel e Visão geral da obra) */

.heroi, .obra-banner { position: relative; overflow: hidden; isolation: isolate; color: #fff; }
.heroi {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
  min-height: 176px; padding: 26px 30px; margin: 0 0 20px; border-radius: 18px;
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(96, 214, 255, 0.2), transparent 60%),
    linear-gradient(115deg, var(--primaria-escura) 0%, var(--primaria) 65%, #123b78 100%);
  box-shadow: 0 14px 40px rgba(6, 27, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.obra-banner {
  min-height: 176px; padding: 26px 30px;
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(115deg, var(--primaria-escura) 0%, var(--primaria) 70%, color-mix(in srgb, var(--primaria) 70%, #fff) 130%);
  box-shadow: 0 14px 40px rgba(6, 27, 58, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.heroi > .planta, .obra-banner > .planta { z-index: -1; }
.heroi::before, .obra-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 13, 32, 0.5) 0%, rgba(3, 13, 32, 0.18) 55%, transparent 100%); pointer-events: none; }
.heroi:empty { display: none; }
.heroi-logo { display: block; width: 190px; max-width: 100%; height: auto; filter: drop-shadow(0 0 14px rgba(96, 214, 255, 0.35)); animation: logo-entra 0.9s var(--curva) both; }
.heroi-texto { flex: 1 1 320px; min-width: 0; }
.heroi-saudacao { margin: 0 0 4px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; animation: sobe 0.8s var(--curva) 0.1s both; }
.heroi-resumo { margin: 0; color: rgba(225, 238, 255, 0.86); max-width: 56ch; animation: sobe 0.8s var(--curva) 0.22s both; }
.heroi-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.heroi-acoes button { margin: 0; }
.obra-banner .banner-marca { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 34px rgba(96, 214, 255, 0.35); animation: logo-entra 0.9s var(--curva) both; }
.obra-banner .banner-texto h1 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); text-shadow: 0 2px 22px rgba(3, 13, 32, 0.5); }
.obra-banner .banner-texto { animation: sobe 0.8s var(--curva) 0.1s both; }

/* ================================================================ módulos habilitados e páginas de área */

.modulos-obra { margin: 0 0 20px; }
.modulos-obra h2 { display: flex; align-items: center; gap: 10px; }
.modulos-obra .area-titulo { margin: 14px 0 8px; font-size: 0.88rem; font-weight: 700; color: var(--suave); font-family: var(--fonte-titulo); }
.modulo-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.modulo-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-height: 92px;
  margin: 0; padding: 14px 16px 14px 18px; text-align: left; border-radius: 12px;
  border: 1px solid var(--borda); background: #fff; color: var(--texto); font-weight: 400;
  transition: transform 0.2s var(--curva), box-shadow 0.2s, border-color 0.2s;
}
.modulo-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--destaque); }
.modulo-card strong { font-family: var(--fonte-titulo); font-size: 1rem; line-height: 1.2; }
.modulo-card span.nota { font-size: 0.82rem; color: var(--suave); }
.modulo-card.construido { cursor: pointer; }
.modulo-card.construido:hover { transform: translateY(-3px); border-color: var(--destaque); box-shadow: 0 10px 26px rgba(10, 30, 60, 0.12); background: #fff; }
.modulo-card.embreve { cursor: default; background: repeating-linear-gradient(135deg, #fbfcfe 0, #fbfcfe 10px, #f4f7fb 10px, #f4f7fb 20px); }
.modulo-card.embreve::before { background: repeating-linear-gradient(180deg, var(--tec-alerta) 0 6px, #1b2433 6px 12px); }
.modulo-card.embreve:hover { background: repeating-linear-gradient(135deg, #fbfcfe 0, #fbfcfe 10px, #f4f7fb 10px, #f4f7fb 20px); }
.modulo-estado { align-self: flex-start; margin-top: auto; font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--ok-fundo); color: var(--ok); }
.modulo-card.embreve .modulo-estado { background: var(--aviso-fundo); color: var(--aviso); }

.area-heroi { margin: 0 0 20px; }
.area-passos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 0 20px; }
.area-passo { position: relative; padding: 16px 18px 16px 58px; border: 1px solid var(--borda); border-radius: 12px; background: #fff; }
.area-passo::before { content: attr(data-n); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 700 0.9rem var(--fonte-mono); color: var(--primaria); background: var(--destaque-suave); border: 1px solid var(--primaria-media); }
.area-passo strong { display: block; font-family: var(--fonte-titulo); }
.area-passo p { margin: 2px 0 0; font-size: 0.9rem; color: var(--suave); }
.obra-andaime { position: relative; height: 150px; margin: 0 0 18px; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #0b2f63, #061b3a); }
.funcoes-lista { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.funcoes-lista li { font-size: 0.78rem; padding: 2px 9px; border-radius: 999px; background: var(--primaria-suave); color: var(--primaria); border: 1px solid var(--primaria-media); }

/* ================================================================ sala de reunião e sala de crise */

.sala-topo {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: 22px 26px; margin-bottom: 18px; border-radius: 18px;
  background:
    radial-gradient(600px 240px at 88% 0%, rgba(96, 214, 255, 0.22), transparent 60%),
    linear-gradient(115deg, var(--primaria-escura), var(--primaria) 70%, #12408a);
  box-shadow: 0 14px 40px rgba(6, 27, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.sala-topo.crise {
  background:
    radial-gradient(600px 260px at 90% 40%, rgba(255, 176, 32, 0.2), transparent 62%),
    linear-gradient(115deg, #1c0d0a, #3a1209 55%, #5b1d0c 130%);
  box-shadow: 0 14px 40px rgba(60, 14, 6, 0.4), inset 0 1px 0 rgba(255, 190, 120, 0.15);
}
.sala-topo > .planta { z-index: -2; }
.sala-topo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 13, 32, 0.55), rgba(3, 13, 32, 0.12) 70%, transparent); pointer-events: none; }
.sala-topo.crise::before { background: linear-gradient(90deg, rgba(20, 6, 3, 0.6), rgba(20, 6, 3, 0.15) 70%, transparent); }
.sala-identidade h2 { color: #fff; font-family: var(--fonte-titulo); font-size: clamp(1.5rem, 2.4vw, 2rem); text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4); }
.sala-topo .sub { color: rgba(225, 238, 255, 0.82); }
#sala-voltar { color: rgba(225, 238, 255, 0.85); }
#sala-voltar:hover { color: #fff; }
.sala-topo .etiqueta { background: rgba(255, 255, 255, 0.16); color: #fff; }
.sala-topo .etiqueta.alerta { background: rgba(255, 176, 32, 0.24); color: #ffe0a6; border: 1px solid rgba(255, 176, 32, 0.5); }
.sala-topo .selo-ao-vivo { background: rgba(217, 45, 32, 0.22); color: #ffd3ce; border: 1px solid rgba(255, 140, 128, 0.5); }
.sala-topo .acoes .botao-link.secundario, .sala-topo .acoes button.secundario { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.sala-topo .acoes .botao-link.secundario:hover, .sala-topo .acoes button.secundario:hover { background: rgba(255, 255, 255, 0.2); border-color: #fff; }
.sala-topo .acoes button.perigo { background: rgba(217, 45, 32, 0.22); color: #ffd3ce; border-color: rgba(255, 140, 128, 0.6); }
.sala-topo .acoes button.perigo:hover { background: #d92d20; color: #fff; border-color: #ff8c80; }
.sala-medidores { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 12px 0 0; }
.medidor { display: grid; gap: 1px; padding: 8px 14px; min-width: 112px; border-radius: 12px; background: rgba(3, 13, 32, 0.42); border: 1px solid rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.medidor-rotulo { font-size: 0.72rem; color: rgba(225, 238, 255, 0.7); }
.medidor-valor { font: 700 1.35rem var(--fonte-mono); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.medidor.ao-vivo .medidor-valor { color: #ffd3ce; }
.gravidade { display: flex; gap: 4px; margin-top: 4px; }
.gravidade i { display: block; width: 30px; height: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.gravidade i.ligado { background: var(--tec-alerta); box-shadow: 0 0 12px rgba(255, 176, 32, 0.7); }
.gravidade i.ligado.critico { background: #ff5a47; box-shadow: 0 0 12px rgba(255, 90, 71, 0.8); }

.palco-moldura {
  width: 100%;   /* sem isso, a altura mínima esticava a largura além da coluna */
  border-radius: 20px;
  background-color: #050f24;
  box-shadow: 0 18px 44px rgba(3, 13, 32, 0.4), 0 0 0 1px rgba(127, 182, 255, 0.22);
}
.palco-moldura::before, .palco-moldura::after { content: ""; position: absolute; z-index: 2; width: 26px; height: 26px; pointer-events: none; border: 0 solid var(--tec-brilho); }
.palco-moldura::before { left: 10px; top: 10px; border-left-width: 2px; border-top-width: 2px; border-top-left-radius: 8px; }
.palco-moldura::after { right: 10px; bottom: 10px; border-right-width: 2px; border-bottom-width: 2px; border-bottom-right-radius: 8px; }
.palco.ao-vivo .palco-moldura { box-shadow: 0 18px 44px rgba(3, 13, 32, 0.4), 0 0 0 1px rgba(96, 214, 255, 0.7), 0 0 38px rgba(96, 214, 255, 0.25); }
.palco-aviso { background: radial-gradient(420px 260px at 50% 40%, rgba(42, 120, 214, 0.28), transparent 70%); overflow: hidden; }
.palco-aviso::before, .palco-aviso::after { content: ""; position: absolute; left: 50%; top: 38%; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; border: 1px solid rgba(96, 214, 255, 0.45); animation: onda 3.4s ease-out infinite; pointer-events: none; }
.palco-aviso::after { animation-delay: 1.7s; }
.palco-aviso > * { position: relative; z-index: 1; }
.palco.compacto .palco-aviso::before, .palco.compacto .palco-aviso::after { display: none; }
@keyframes onda { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
.palco-aviso h3 { font-family: var(--fonte-titulo); }
.palco-aviso button { background: linear-gradient(135deg, #3487e8, #1f68c8); color: #fff; border-color: var(--tec-brilho); box-shadow: 0 10px 30px rgba(42, 120, 214, 0.45); }
.palco-aviso button:hover { background: linear-gradient(135deg, #3d93f5, #2573dc); border-color: #fff; }
.call-conectando { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(5, 15, 36, 0.9); color: #fff; text-align: center; animation: some-aos-poucos 0.5s ease 6s forwards; pointer-events: none; }
.call-conectando p { margin: 0; font-family: var(--fonte-mono); font-size: 0.9rem; color: rgba(225, 238, 255, 0.85); }
.call-conectando i { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(96, 214, 255, 0.25); border-top-color: var(--tec-brilho); animation: giro 0.9s linear infinite; }
@keyframes some-aos-poucos { to { opacity: 0; visibility: hidden; } }

.pauta-cartao { padding: 0; overflow: hidden; border-radius: 16px; }
.pauta-colunas { gap: 0; }
.pauta-colunas > div { padding: 20px 22px 18px; }
.pauta-colunas > div + div { border-left: 1px solid var(--borda); background: linear-gradient(180deg, #f9fbfe, #fff); }
.pauta-colunas h3, .pauta-colunas label { display: flex; align-items: center; gap: 9px; font-family: var(--fonte-titulo); font-size: 1rem; font-weight: 700; color: var(--primaria); }
.pauta-colunas h3::before, .pauta-colunas label::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--destaque); box-shadow: 0 0 0 3px var(--destaque-suave); }
.pauta-colunas .texto-livre { padding: 12px 14px; border-radius: 10px; background: var(--primaria-suave); border-left: 4px solid var(--destaque); }
.pauta-colunas textarea { border-radius: 12px; background: #fff; min-height: 130px; }
.sala-lateral { border-radius: 16px; overflow: hidden; }
.abas-sala button[aria-selected="true"] { box-shadow: 0 2px 10px rgba(10, 30, 60, 0.18), inset 0 -2px 0 var(--destaque); }
.folha { box-shadow: 0 8px 24px rgba(10, 30, 60, 0.1); }

/* ================================================================ assistente */

.chat-fab { background: linear-gradient(135deg, var(--primaria), color-mix(in srgb, var(--primaria) 60%, #2a78d6)); box-shadow: 0 8px 26px rgba(6, 20, 45, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
.chat-fab::before { content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 1px solid var(--brilho-tema); opacity: 0; animation: anel-fab 3.6s ease-out 2s infinite; pointer-events: none; }
@keyframes anel-fab { 0% { transform: scale(0.96); opacity: 0.7; } 80%, 100% { transform: scale(1.16); opacity: 0; } }
.chat-cab { background: linear-gradient(120deg, var(--primaria-escura), var(--primaria)); }
.chat-gaveta { background: linear-gradient(#fff, #f7f9fc); }
.balao { animation: balao-entra 0.3s var(--curva); }
@keyframes balao-entra { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.balao.usuario { background: linear-gradient(135deg, var(--primaria), color-mix(in srgb, var(--primaria) 70%, #2a78d6)); }
.balao.ia { background: #fff; border: 1px solid var(--primaria-media); box-shadow: 0 2px 10px rgba(10, 30, 60, 0.05); }
.balao.ia.pensando { font-style: normal; color: var(--suave); display: grid; gap: 8px; }
.balao.ia.pensando .balao-texto::after { content: none; }
.balao.ia.pensando .balao-texto { font-size: 0.86rem; }
.pensando-pontos { display: flex; align-items: center; gap: 5px; height: 14px; }
.pensando-pontos i { width: 8px; height: 8px; border-radius: 50%; background: var(--destaque); animation: ponto 1.2s ease-in-out infinite; }
.pensando-pontos i:nth-child(2) { animation-delay: 0.15s; }
.pensando-pontos i:nth-child(3) { animation-delay: 0.3s; }
.pensando-pontos b { margin-left: 8px; font: 600 0.78rem var(--fonte-mono); color: var(--suave); }
@keyframes ponto { 0%, 70%, 100% { transform: translateY(0); opacity: 0.45; } 35% { transform: translateY(-6px); opacity: 1; } }
.assistente-sugestoes .sugestao { transition: transform 0.15s var(--curva), border-color 0.15s, background 0.15s; animation: sobe 0.45s var(--curva) both; }
.assistente-sugestoes .sugestao:nth-child(2) { animation-delay: 0.06s; }
.assistente-sugestoes .sugestao:nth-child(3) { animation-delay: 0.12s; }
.assistente-sugestoes .sugestao:nth-child(4) { animation-delay: 0.18s; }
.assistente-sugestoes .sugestao:hover { transform: translateX(3px); }
.assistente-seguintes { display: grid; gap: 6px; }
.assistente-seguintes > span { font-size: 0.78rem; font-weight: 700; color: var(--suave); font-family: var(--fonte-titulo); }
.assistente-seguintes .sugestao { text-align: left; }

/* com o painel do assistente aberto sobra pouca largura: a sala passa a uma coluna só */
@media (max-width: 1700px) {
  body.chat-aberto .sala-grade { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ movimento reduzido */

@media (prefers-reduced-motion: reduce) {
  .entrada-logo, .entrada-texto h2 .linha, .entrada-texto p, .entrada-pontos li, .entrada-formulario > section,
  .heroi-logo, .heroi-saudacao, .heroi-resumo, .obra-banner .banner-marca, .obra-banner .banner-texto,
  .assistente-sugestoes .sugestao, .balao, .aba.entra { animation: none; }
  .entrada-logo-caixa::after, .lateral-marca::after, .barra-topo::after, .nav-item[aria-current="page"]::after,
  .ponto-vivo, .selo-orbita, .selo-orbita2, .selo-visto, .palco-aviso::before, .palco-aviso::after, .chat-fab::before,
  #tela-carregando p::after, .call-conectando i { animation: none; }
  .selo-visto { stroke-dashoffset: 0; }
  .nav-item:hover, .kpi:hover, .obra-card:hover, .modulo-card.construido:hover { transform: none; }
  .pensando-pontos i { animation: none; opacity: 0.7; }
}

/* ================================================================ telas pequenas */

@media (max-width: 960px) {
  #entrada { grid-template-columns: 1fr; }
  .entrada-marca { padding: 26px 24px 8px; gap: 14px; }
  .entrada-marca::before { right: 0; }
  .entrada-formulario { padding: 8px 16px 32px; }
  .entrada-formulario > section { padding: 26px 22px 24px; margin: 0 auto; }
  .selo { width: 64px; height: 64px; }
  .otp { height: 56px; }
  .otp-slots { gap: 6px; }
  .otp-slots span { font-size: 1.4rem; border-radius: 10px; }
  .heroi, .obra-banner { padding: 20px 18px; }
  .heroi-logo { width: 150px; }
  .pauta-colunas > div + div { border-left: 0; border-top: 1px solid var(--borda); }
}
@media (max-width: 560px) {
  .sala-topo { padding: 18px 16px; }
  .medidor { min-width: 0; flex: 1 1 40%; }
}
@media print {
  .planta, .heroi, .obra-banner::before { display: none !important; }
}
