/* =============================================================================
   Identidade visual = a mesma do UYSI Regulação / APS: paleta "brand"/"azul", Inter, cartões brancos sobre fundo
   cinza-azulado, barra superior branca com o símbolo UYSI e o nome em degradê vivo.
   (valores copiados de uysi-aps/src/app/globals.css)
   ============================================================================= */
:root {
  --brand-50: #eef5fc; --brand-100: #d3e6f8; --brand-200: #a6ccf0; --brand-300: #6fabe4; --brand-400: #3f8bd6;
  --brand-500: #1e6fbf; --brand-600: #155a9e; --brand-700: #124a82; --brand-800: #123e6b; --brand-900: #0f3357;
  --azul-900: #0f2540;
  --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1; --s400: #94a3b8; --s500: #64748b; --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
  --verde: #059669; --verde-50: #ecfdf5; --verde-100: #d1fae5; --ambar: #d97706; --ambar-50: #fffbeb; --ambar-100: #fef3c7;
  --verm: #e11d48; --verm-50: #fff1f2; --verm-100: #ffe4e6;
  --wa: #e7ffdb; --wa-fundo: #efeae2;
  --sombra: 0 1px 2px rgba(15, 37, 64, 0.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, "Segoe UI", system-ui, sans-serif; background: var(--s100); color: var(--s800); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-700); }
img { display: block; }

/* ---------------------------------------------------------------- marca */
.letras-vivas {
  background-image: linear-gradient(100deg, #0b2f6b, #2b7fd0, #29b6e8, #2b7fd0, #0b2f6b);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: letrasVivas 8s linear infinite;
}
.eyebrow { color: var(--brand-600); font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; }
.icone-vivo svg { transition: transform 0.25s cubic-bezier(0.22, 1.2, 0.4, 1); }
.icone-vivo:hover svg, .grupo:hover .icone-vivo svg { transform: scale(1.14) rotate(-6deg); }
.respira { animation: respira 3.6s ease-in-out infinite; }
.surgir { animation: surgir 0.45s ease both; }

/* ---------------------------------------------------------------- barra superior */
.barra { position: sticky; top: 0; z-index: 40; height: 64px; background: #fff; border-bottom: 1px solid var(--s200); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.marca img { height: 40px; width: 40px; object-fit: contain; }
.marca .textos { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-left: 1px solid var(--s200); padding: 0 4px 0 10px; line-height: 1.2; } /* as duas linhas centralizadas uma sobre a outra, com qualquer fonte */
/* "UYSI ÁGUA" e a linha de baixo na MESMA largura (medido: 148 px cada). */
.marca .nome { font-size: 20px; font-weight: 800; letter-spacing: 0.2em; margin-right: -0.2em; white-space: nowrap; line-height: 1.05; }
.marca .sub { font-size: 9.5px; font-weight: 700; letter-spacing: 0.07em; margin: 0 -0.07em 0 0; color: var(--brand-700); text-transform: uppercase; white-space: nowrap; }
.divisor { width: 1px; height: 28px; background: var(--s200); flex: none; }
.bt-icone { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--s500); text-decoration: none; flex: none; border: 0; background: transparent; cursor: pointer; }
.bt-icone:hover { background: var(--s100); }
.bt-icone.ativo { background: var(--brand-50); color: var(--brand-700); }
.bt-icone svg { width: 20px; height: 20px; }
.menus { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.menus::-webkit-scrollbar { display: none; }
.menus a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--s500); text-decoration: none; font-weight: 600; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.menus a:hover { background: var(--s100); color: var(--s700); }
.menus a.ativo { background: var(--brand-50); color: var(--brand-700); }
.menus svg { width: 16px; height: 16px; }
.espaco { flex: 1; }
.status { display: flex; gap: 6px; }
.atuacao { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 12px; border: 1px solid var(--s200); background: var(--s50); white-space: nowrap; flex: none; }
.atuacao .escudo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-600); color: #fff; }
.atuacao .escudo svg { width: 16px; height: 16px; }
.atuacao b { display: block; font-size: 12.5px; color: var(--s800); line-height: 1.15; }
.atuacao small { display: block; font-size: 11px; color: var(--s500); line-height: 1.15; }
.conta { position: relative; flex: none; }
.conta > button { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; }
.conta > button:hover { background: var(--s100); }
.iniciais { width: 36px; height: 36px; border-radius: 10px; background: var(--s100); color: var(--s500); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.conta .seta { width: 14px; height: 14px; color: var(--s400); }
img.iniciais.foto { object-fit: cover; background: var(--s100); outline: 1px solid var(--s200); }
.iniciais.grande { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; flex: none; }
.iniciais.peq { width: 28px; height: 28px; border-radius: 8px; font-size: 10.5px; flex: none; }
.menu-conta .quem.com-foto { display: flex; align-items: center; gap: 10px; }

/* janela (modal) — como na Regulação: ícone em quadrado brand-50 */
.modal-fundo { position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 30px 70px rgba(15, 37, 64, 0.25); }
.modal-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-cab .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; }
.modal-cab .ic svg { width: 20px; height: 20px; }
.modal-cab b { display: block; font-size: 15px; }
.modal-cab small { color: var(--s500); font-size: 12px; }
.modal-cab .fechar { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--s400); cursor: pointer; font-size: 15px; }
.modal-cab .fechar:hover { background: var(--s100); color: var(--s700); }
.foto-previa { position: relative; width: 140px; height: 140px; margin: 0 auto 12px; border-radius: 28px; overflow: hidden; background: var(--brand-50); outline: 1px solid var(--s200); display: grid; place-items: center; cursor: pointer; transition: outline-color 0.15s, transform 0.15s; }
.foto-previa:hover, .foto-previa.arrastando { outline: 2px dashed var(--brand-500); transform: scale(1.02); }
.foto-previa img { width: 100%; height: 100%; object-fit: cover; }
.foto-previa em { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-600); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(15, 51, 87, 0.3); }
.foto-previa em svg { width: 16px; height: 16px; }
label.bt { user-select: none; }
label.bt:focus-visible { outline: 3px solid var(--brand-200); }
/* Campo de arquivo invisível mas "vivo" (display:none faz alguns navegadores ignorarem o clique). */
.so-leitor { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.foto-previa span { font-size: 42px; font-weight: 800; color: var(--brand-600); }
.menu-conta { position: absolute; right: 0; top: calc(100% + 8px); width: 256px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 20px 40px rgba(15, 37, 64, 0.16); outline: 1px solid var(--s200); z-index: 50; }
.menu-conta .quem { padding: 10px 12px; border-bottom: 1px solid var(--s100); margin-bottom: 4px; }
.menu-conta .quem b { display: block; font-size: 13px; }
.menu-conta .quem small { color: var(--s400); font-size: 11.5px; }
.menu-conta button, .menu-conta a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--s600); text-decoration: none; cursor: pointer; text-align: left; }
.menu-conta button:hover, .menu-conta a:hover { background: var(--s50); }
.menu-conta svg { width: 16px; height: 16px; color: var(--brand-600); }
.menu-conta .sair, .menu-conta .sair svg { color: var(--verm); }
.menu-conta .sair:hover { background: var(--verm-50); }
.engrenagem { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--s100); color: var(--s500); flex: none; }
.engrenagem:hover { color: var(--brand-700); }
.engrenagem.ativo { background: var(--brand-600); color: #fff; }
.engrenagem svg { width: 19px; height: 19px; }

/* ---------------------------------------------------------------- área de conteúdo */
main { padding: 24px 32px; max-width: 2400px; margin: 0 auto; }
.cab-pagina { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cab-pagina h1 { margin: 4px 0 2px; font-size: 24px; font-weight: 800; color: var(--s800); letter-spacing: -0.01em; }
.cab-pagina p { margin: 0; color: var(--s500); font-size: 13px; }
.cartao { background: #fff; border: 1px solid var(--s200); border-radius: 16px; box-shadow: var(--sombra); }
.pad { padding: 20px; }
h2 { font-size: 15px; font-weight: 800; margin: 0 0 12px; color: var(--s800); display: flex; align-items: center; gap: 8px; }
h2 .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
h2 .ic svg { width: 16px; height: 16px; }
.sub { color: var(--s500); margin: 0 0 16px; }

/* campos (h-11 rounded-xl, como na Regulação) */
label.campo, div.campo { display: grid; gap: 6px; margin-bottom: 14px; }
label.campo > span, div.campo > span { font-size: 12px; font-weight: 700; color: var(--s700); }
.inp { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--s300); padding: 0 12px; background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.inp:disabled { background: var(--s50); color: var(--s400); }
.dica { font-size: 12px; color: var(--s500); }
.bt { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--s300); background: #fff; color: var(--s700); font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; transition: transform 0.15s, background 0.15s; }
.bt:hover { background: var(--s50); }
.bt svg { width: 16px; height: 16px; }
.bt.pri { background: linear-gradient(135deg, var(--brand-600), var(--azul-900)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(15, 51, 87, 0.18); }
.bt.pri:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bt.peq { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 10px; }
.bt:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grade2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.abas { display: inline-flex; background: var(--s200); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.abas button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--s600); cursor: pointer; }
.abas button.ativo { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.aviso { padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.aviso.ok { background: var(--verde-50); color: #065f46; outline: 1px solid var(--verde-100); }
.aviso.erro { background: var(--verm-50); color: #9f1239; outline: 1px solid var(--verm-100); }
.aviso.info { background: var(--brand-50); color: var(--brand-800); outline: 1px solid var(--brand-100); }
.aviso.alerta { background: var(--ambar-50); color: #92400e; outline: 1px solid var(--ambar-100); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.troca { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 700; cursor: pointer; }
.troca input { width: 18px; height: 18px; accent-color: var(--brand-600); }
.chip { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--s100); color: var(--s600); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.chip.ok { background: var(--verde-50); color: var(--verde); }
.chip.alerta { background: var(--ambar-50); color: var(--ambar); }
.chip.erro { background: var(--verm-50); color: var(--verm); }

/* KPI com borda lateral colorida + ícone em círculo */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--s200); border-left: 4px solid var(--brand-600); border-radius: 16px; padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sombra); }
.kpi .bola { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex: none; }
.kpi .bola svg { width: 20px; height: 20px; }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--s800); }
.kpi .r { font-size: 12px; color: var(--s500); }
.kpi.verde { border-left-color: var(--verde); } .kpi.verde .bola { background: var(--verde-50); color: var(--verde); }
.kpi.ambar { border-left-color: var(--ambar); } .kpi.ambar .bola { background: var(--ambar-50); color: var(--ambar); }
.kpi.verm { border-left-color: var(--verm); } .kpi.verm .bola { background: var(--verm-50); color: var(--verm); }
table.tab { width: 100%; border-collapse: collapse; }
.tab th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--s500); padding: 8px 10px; border-bottom: 1px solid var(--s200); }
.tab td { padding: 10px; border-bottom: 1px solid var(--s100); vertical-align: top; }

/* ---------------------------------------------------------------- conversas */
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 64px - 48px - 76px); min-height: 420px; overflow: hidden; }
.lista-conv { border-right: 1px solid var(--s200); display: flex; flex-direction: column; min-height: 0; }
.lista-conv .topo { padding: 12px; border-bottom: 1px solid var(--s200); }
.lista-conv .itens { overflow-y: auto; flex: 1; }
.conv { padding: 12px; border-bottom: 1px solid var(--s100); cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.conv:hover { background: var(--s50); }
.conv.ativa { background: var(--brand-50); }
.conv .avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--brand-600); }
.conv .avatar svg { width: 18px; height: 18px; }
.conv .nome { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .ult { font-size: 12px; color: var(--s500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--verde); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; margin-left: auto; }
.painel { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.painel .cab { padding: 12px 16px; border-bottom: 1px solid var(--s200); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; background: var(--wa-fundo); display: flex; flex-direction: column; gap: 6px; }
.bolha { max-width: min(560px, 85%); padding: 8px 10px 6px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); white-space: pre-wrap; overflow-wrap: anywhere; }
.bolha.sai { align-self: flex-end; background: var(--wa); }
.bolha.nota { align-self: center; background: var(--ambar-50); font-size: 12px; }
/* Mensagem com a foto de quem escreveu (tela de Conversas). */
.linha-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.linha-msg.sai { align-self: flex-end; }
.linha-msg.nota { align-self: center; }
.linha-msg .bolha { max-width: min(560px, 78vw); }
.iniciais.robo { background: #fff; padding: 3px; object-fit: contain; }
.iniciais.cliente { background: #dbeafe; color: var(--brand-700); }
.envio .clipe { width: 44px; height: 44px; padding: 0; justify-content: center; flex: none; cursor: pointer; }
.envio .clipe svg { width: 18px; height: 18px; }
.envio .clipe.off { opacity: 0.45; pointer-events: none; }
.bolha .meta { font-size: 10.5px; color: var(--s500); text-align: right; margin-top: 3px; display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.bolha .meta .pago { color: var(--verm); font-weight: 700; }
.bolha .meta .gratis { color: var(--verde); font-weight: 700; }
.bolha .err { color: var(--verm); font-size: 12px; margin-top: 4px; }
.botoeswa { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.botoeswa button { border: 0; background: #fff; color: #027eb5; border-radius: 8px; padding: 8px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); }
.botoeswa button:disabled { color: var(--s400); cursor: default; }
.envio { padding: 10px; border-top: 1px solid var(--s200); display: flex; gap: 8px; background: #fff; }
.envio .inp { flex: 1; }
.vazio { color: var(--s500); text-align: center; padding: 40px 16px; }
.vazio .ic { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.vazio .ic svg { width: 26px; height: 26px; }
/* A lista do WhatsApp no simulador: janela centralizada que cabe na tela (antes grudava no rodapé e cortava). */
.folha { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; padding: 16px; z-index: 60; }
.folha .caixa { background: #fff; width: min(440px, 100%); max-height: calc(100dvh - 32px); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 70px rgba(15, 37, 64, 0.25); }
.folha .caixa h3 { margin: 0; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--s200); font-size: 15px; display: flex; align-items: center; justify-content: space-between; flex: none; }
.folha .fechar { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--s400); cursor: pointer; font-size: 15px; }
.folha .fechar:hover { background: var(--s100); color: var(--s700); }
.folha .ops { overflow-y: auto; }
.folha .op { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 11px 18px; border-bottom: 1px solid var(--s100); cursor: pointer; }
.folha .op:last-child { border-bottom: 0; }
.folha .op:hover { background: var(--brand-50); }
.folha .op b { display: block; font-size: 14px; color: var(--s800); }
.folha .op small { display: block; color: var(--s500); font-size: 12px; margin-top: 1px; }
.celular-cab { padding: 12px 16px; border-bottom: 1px solid var(--s200); display: flex; gap: 10px; align-items: center; }
.celular-cab img { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; background: var(--brand-50); padding: 3px; }

/* ---------------------------------------------------------------- login */
.uysi-login { position: relative; isolation: isolate; min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 40px; padding: 40px 16px; overflow: hidden;
  background: radial-gradient(circle at 78% 18%, rgba(127, 212, 242, 0.22), transparent 34%), linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #eef5fc 100%); }
.uysi-login::before { content: ""; position: fixed; inset: auto -18vw -10vh auto; z-index: -1; width: min(70vw, 960px); aspect-ratio: 1; background: url("brand/uysi-symbol.png") center / contain no-repeat; opacity: 0.05; transform: rotate(-8deg); pointer-events: none; }
.login-hero { flex: 1; max-width: 640px; }
/* A rede de água animada no lugar do texto da tela de entrada */
.login-rede { width: 100%; height: auto; display: block; }
.login-chamada { max-width: 520px; margin: 0 0 8px 40px; }
.login-chamada .eyebrow { color: var(--brand-600); font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.login-chamada h2 { margin: 6px 0 8px; font-size: 32px; line-height: 1.15; font-weight: 800; color: #12334c; letter-spacing: -0.01em; }
.login-chamada p { margin: 0; color: var(--s500); font-size: 15px; line-height: 1.5; }
.login-cartao { width: min(420px, 100%); background: #fff; border: 1px solid var(--s200); border-radius: 16px; padding: 32px; box-shadow: 0 24px 60px rgba(15, 37, 64, 0.12); flex: none; }
.login-cartao .topo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-cartao .topo img { width: 56px; height: 56px; object-fit: contain; }
.login-cartao h1 { margin: 2px 0 0; font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--s800); }
.login-cartao .topo small { color: var(--s400); font-size: 11.5px; }
.login-cartao .entrar { width: 100%; height: 44px; justify-content: center; font-size: 14px; margin-top: 4px; }
.senha { position: relative; }
.senha .inp { padding-right: 44px; }
.senha button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--s400); display: grid; place-items: center; cursor: pointer; }
.senha button:hover { color: var(--brand-700); }
.senha button svg { width: 18px; height: 18px; }
.rodape-marca { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--s100); color: var(--s400); font-size: 11px; }
.rodape-marca img { height: 30px; width: auto; opacity: 0.85; }

@keyframes letrasVivas { 0% { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes surgir { 0% { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes respira { 0%, to { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.07); opacity: 1; } }

@media (max-width: 1180px) { .status, .atuacao small { display: none; } }
@media (max-width: 1000px) { .login-hero { display: none; } .atuacao { display: none; } }
/* 4 menus (Conversas, Protocolos, Simulador, Economia): entre 860 e 1080 px o rótulo cortava; fica só o ícone (com title). */
@media (max-width: 1080px) { .menus a span { display: none; } .menus a { padding: 8px 10px; } }
@media (max-width: 860px) {
  .barra { gap: 6px; padding: 0 10px; }
  .marca .textos, .barra > .divisor { display: none; }
  .menus a span { display: none; }
  main { padding: 12px; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 64px - 24px); }
  .chat.com-conversa .lista-conv { display: none; }
  .chat:not(.com-conversa) .painel { display: none; }
  .grade2 { grid-template-columns: 1fr; }
  .login-cartao { padding: 24px; }
}

/* ---------------------------------------------------------------- configuração: menu lateral + seções em cartões */
.cfg { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.cfg-menu { position: sticky; top: 84px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.cfg-grupo { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--s400); padding: 12px 10px 4px; }
.cfg-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--s700); font-weight: 600; font-size: 13.5px; }
.cfg-menu a:hover { background: var(--s50); }
.cfg-menu a.ativo { background: var(--brand-50); color: var(--brand-700); }
.cfg-menu a .ic { width: 18px; height: 18px; flex: none; color: var(--s400); }
.cfg-menu a.ativo .ic { color: var(--brand-600); }
.cfg-menu a .ic svg { width: 18px; height: 18px; }
.cfg-menu a .t { flex: 1; min-width: 0; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--s300); flex: none; display: inline-block; }
.ponto.ok { background: var(--verde); }
.ponto.alerta { background: var(--ambar); }
.ponto.erro { background: var(--verm); }
.cfg-corpo { min-width: 0; }
.cfg-titulo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cfg-titulo > .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: none; }
.cfg-titulo > .ic svg { width: 22px; height: 22px; }
.cfg-titulo h2 { margin: 0; font-size: 18px; }
.cfg-titulo p { margin: 2px 0 0; color: var(--s500); font-size: 13px; }
.cfg-titulo > div { flex: 1; min-width: 0; }
.cfg-bloco { margin-bottom: 14px; }
.cfg-bloco h3 { margin: 0 0 12px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.cfg-bloco h3 .ic { width: 18px; height: 18px; color: var(--brand-600); display: inline-grid; }
.cfg-bloco h3 .ic svg { width: 18px; height: 18px; }
.cfg-bloco > label.campo:last-child { margin-bottom: 0; }
.cfg-bloco .grade2 + .troca { margin-top: 4px; }
.cfg-salvar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--s200); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(15, 37, 64, 0.1); margin-bottom: 14px; }
.cfg-salvar .espaco { flex: 1; }
.cfg-par { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.cfg-par > span:first-child { font-size: 12px; font-weight: 700; color: var(--s600); min-width: 150px; }
.copiavel { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 12px; background: var(--s50); border: 1px solid var(--s200); border-radius: 10px; }
.copiavel .mono { word-break: break-all; font-size: 12.5px; }
.cfg-pend { list-style: none; margin: 0; padding: 0; }
.cfg-pend li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--s100); }
.cfg-pend li:first-child { border-top: 0; padding-top: 0; }
.cfg-pend li > span { flex: 1; }
.cfg-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cfg-cartao { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; gap: 4px 10px; padding: 14px; text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.cfg-cartao:hover { border-color: var(--brand-300); transform: translateY(-1px); }
.cfg-cartao .ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; }
.cfg-cartao .ic svg { width: 19px; height: 19px; }
.cfg-cartao .chip { justify-self: start; width: max-content; }
.cfg-cartao small { grid-column: 1 / -1; color: var(--s500); font-size: 12px; line-height: 1.45; }
@media (max-width: 900px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg-menu { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .cfg-grupo { display: none; }
  .cfg-menu a { white-space: nowrap; flex: none; }
}
.cfg-bloco .troca { align-items: flex-start; }
.cfg-bloco .troca input { flex: none; margin-top: 1px; }
.cfg-bloco .troca:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- conversas: fila, puxar, transferir, painel do cliente */
.chat3 { grid-template-columns: 340px minmax(0, 1fr) 290px; height: calc(100vh - 64px - 48px); }
.chat3 .lista-conv .topo { display: grid; gap: 10px; }
.puxar-prox { width: 100%; justify-content: center; gap: 8px; height: 40px; }
.puxar-prox svg { width: 16px; height: 16px; }
.puxar-prox .contador { background: rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.puxar-prox:disabled { opacity: 0.55; cursor: default; }
.abas-conv { display: flex; gap: 2px; background: var(--s100); padding: 3px; border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.abas-conv button { flex: 1 0 auto; border: 0; background: transparent; padding: 6px 6px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--s600); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.abas-conv button.ativo { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.abas-conv button b:empty { display: none; }
.abas-conv button b { background: var(--brand-600); color: #fff; border-radius: 999px; font-size: 10.5px; min-width: 18px; padding: 0 5px; line-height: 18px; }
.abas-conv button[data-a="fila"] b { background: var(--ambar); }
.filtros-conv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px; }
.filtros-conv .inp { height: 36px; font-size: 13px; padding: 0 10px; }
.chat3 .conv { align-items: start; }
.chat3 .conv .avatar { font-size: 14px; }
.conv .etiquetas { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.conv .etiquetas:empty { display: none; }
.conv .etiquetas .chip { font-size: 10.5px; padding: 2px 7px; }
.conv .dir { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.conv .dir small { font-size: 11px; color: var(--s400); white-space: nowrap; }
.conv .dir .bt { height: 26px; padding: 0 10px; font-size: 12px; }
.chat3 .painel .cab { flex-wrap: nowrap; align-items: flex-start; }
.chat3 .painel .cab .quem { min-width: 0; flex: 1; }
.chat3 .painel .cab .acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chat3 .painel .cab .acoes svg { width: 14px; height: 14px; }
.chat3 .voltar { display: none; }
.modos-envio { display: flex; gap: 2px; padding: 8px 10px 0; background: #fff; border-top: 1px solid var(--s200); }
.modos-envio button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px 8px 0 0; font-weight: 700; font-size: 12.5px; color: var(--s500); cursor: pointer; border-bottom: 2px solid transparent; }
.modos-envio button.ativo { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.modos-envio button[data-modo="nota"].ativo { color: var(--ambar); border-bottom-color: var(--ambar); }
#envioConv .envio { border-top: 0; align-items: flex-end; }
#envioConv .envio textarea { resize: none; min-height: 44px; max-height: 140px; padding-top: 11px; line-height: 1.4; }
#envioConv .envio.modo-nota textarea { background: var(--ambar-50); border-color: var(--ambar-100); }
.aviso-envio { background: #fff; padding: 6px 12px 0; font-size: 12.5px; color: var(--s600); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aviso-envio.nota { color: var(--ambar); }
.nota-int { align-self: center; width: min(560px, 92%); background: var(--ambar-50); border: 1px dashed #f5c26b; border-radius: 10px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.nota-int .cab-nota { font-size: 11px; font-weight: 700; color: var(--ambar); margin-bottom: 3px; }
.evento-conv { align-self: center; display: flex; gap: 8px; align-items: baseline; background: rgba(255, 255, 255, 0.75); border-radius: 999px; padding: 3px 12px; font-size: 11.5px; color: var(--s600); max-width: 92%; text-align: center; }
.evento-conv small { color: var(--s400); white-space: nowrap; }
.cliente-conv { border-left: 1px solid var(--s200); overflow-y: auto; padding: 14px; background: var(--s50); }
.cliente-conv:empty::before { content: "Abra uma conversa para ver os dados do cliente."; color: var(--s400); font-size: 12.5px; }
.bloco-cli { background: #fff; border: 1px solid var(--s200); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.bloco-cli h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--s500); }
.bloco-cli dl { margin: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 5px 8px; font-size: 12.5px; }
.bloco-cli dt { color: var(--s500); }
.bloco-cli dd { margin: 0; overflow-wrap: anywhere; }
.cli-nome { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cli-nome .iniciais { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.prot-cli { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 7px 0; border-top: 1px solid var(--s100); text-decoration: none; color: inherit; font-size: 12.5px; }
.prot-cli:first-of-type { border-top: 0; padding-top: 0; }
.prot-cli .chip { grid-column: 2; justify-self: start; font-size: 10.5px; }
.setores-esc { display: grid; gap: 6px; }
.setor-op { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; border: 1px solid var(--s200); border-radius: 12px; padding: 9px 12px; cursor: pointer; }
.setor-op input { grid-row: span 2; width: 18px; height: 18px; accent-color: var(--brand-600); }
.setor-op small { color: var(--s500); font-size: 12px; }
.setor-op:has(input:checked) { border-color: var(--brand-400); background: var(--brand-50); }
/* O olho do topo da conversa abre/recolhe o painel do cliente (no computador também). */
.bt-cliente { display: inline-flex; }
.chat3 .bt-cliente { opacity: .75; }
.chat3.sem-cliente .bt-cliente { opacity: 1; color: var(--brand-600); border-color: var(--brand-200); }
.recolher-cli { margin-left: auto; padding: 0 8px; height: 24px; font-size: 14px; line-height: 1; }
@media (min-width: 1281px) {
  .chat3.sem-cliente { grid-template-columns: 340px minmax(0, 1fr); }
  .chat3.sem-cliente .cliente-conv { display: none; }
}
@media (max-width: 1280px) {
  .chat3 { grid-template-columns: 320px minmax(0, 1fr); }
  .chat3 .cliente-conv { display: none; }
  .chat3.mostra-cliente .cliente-conv { display: block; position: absolute; right: 0; top: 0; bottom: 0; width: 300px; z-index: 6; box-shadow: -8px 0 24px rgba(15, 37, 64, 0.12); }
  .chat3 { position: relative; }
}
@media (max-width: 860px) {
  .chat3 { grid-template-columns: 1fr; height: calc(100vh - 64px - 24px); }
  .chat3 .voltar { display: inline-flex; }
  .chat3 .painel .cab { flex-wrap: wrap; }
}
.marcas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; font-size: 13px; }
.marcas label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.marcas input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.setor-cfg.inativo { opacity: 0.6; }
.setor-cfg .cfg-par > span:first-child { min-width: 90px; }

/* ---- Rádio fixa na barra (formato do UYSI Laboratório) -------------------------------------- */
.radio-barra {
  display: flex; flex-shrink: 0; align-items: center; gap: 8px;
  border: 1px solid var(--uysi-linha); background: #f4f9ff;
  border-radius: 999px; padding: 4px 6px;
}
.radio-play {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: #1f58b6; color: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.1);
}
.radio-play:hover { background: #1a4c9f; }
.radio-play:disabled { opacity: .6; cursor: default; }
.radio-play svg { width: 14px; height: 14px; }
.radio-girando {
  width: 13px; height: 13px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: radioGira .8s linear infinite;
}
@keyframes radioGira { to { transform: rotate(360deg); } }

/* Equalizador: anima só enquanto toca; parado fica com 5px, para a barra não "sumir". */
.radio-eq-caixa { display: flex; height: 16px; align-items: flex-end; gap: 2px; }
.radio-eq-caixa span { width: 2px; height: 5px; border-radius: 999px; background: #1f7ae0; }
@keyframes radioEq { 0%, 100% { height: 3px; } 50% { height: 15px; } }
.radio-eq-caixa span.radio-eq { height: 6px; animation: radioEq .9s ease-in-out infinite; }

/* Nome da faixa só em tela grande — em tela média ele empurraria o resto da barra. */
.radio-textos { display: none; min-width: 0; max-width: 180px; line-height: 1.2; }
@media (min-width: 1280px) { .radio-textos { display: block; } }
.radio-titulo { margin: 0; font-size: 11px; font-weight: 700; color: #18348c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-apres { margin: 0; font-size: 10px; font-weight: 500; color: #5d6b8a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.radio-mudo { display: none; flex-shrink: 0; border: 0; background: none; padding: 0; cursor: pointer; color: #5d6b8a; }
.radio-mudo:hover { color: #18348c; }
.radio-mudo svg { width: 15px; height: 15px; display: block; }
@media (min-width: 1024px) { .radio-mudo { display: block; } }

.radio-volume { display: none; width: 64px; height: 4px; cursor: pointer; accent-color: #1f58b6; padding: 0; }
@media (min-width: 1280px) { .radio-volume { display: block; } }

.radio-oculto { position: fixed; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

@media print { .no-print { display: none !important; } }

/* Conversas: o pre-wrap vale só para o texto (a indentação do template virava linhas em branco na bolha). */
.linha-msg .bolha { white-space: normal; }
.txt-msg { white-space: pre-wrap; }
/* Painel do cliente (direita de Conversas): cabeçalho fixo + abas. */
.cliente-conv { padding: 0; display: flex; flex-direction: column; }
.pc-topo { background: #fff; border-bottom: 1px solid var(--s200); padding: 12px 14px 10px; }
.pc-quem { display: flex; align-items: center; gap: 10px; }
.pc-quem .iniciais { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-600); color: #fff; flex: none; }
.pc-quem b { display: block; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-quem small { color: var(--s500); font-size: 11.5px; }
.recolher-cli { padding: 0 8px; height: 26px; font-size: 14px; line-height: 1; flex: none; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pc-chips .chip { font-size: 11px; }
.pc-end { font-size: 12px; color: var(--s600); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-sit { margin-top: 8px; border-radius: 10px; padding: 7px 10px; font-size: 12px; background: var(--s50); border: 1px solid var(--s200); color: var(--s700); }
.pc-sit b { font-size: 14px; }
.pc-sit.atraso { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.pc-sit.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; font-weight: 600; }
.pc-abas { display: flex; gap: 2px; padding: 8px 10px 0; background: var(--s50); border-bottom: 1px solid var(--s200); position: sticky; top: 0; z-index: 2; }
.pc-abas button { flex: 1; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--s500); padding: 7px 4px 8px; border-bottom: 2px solid transparent; cursor: pointer; }
.pc-abas button.ativo { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.pc-abas .n { background: var(--s200); color: var(--s700); border-radius: 999px; padding: 0 6px; font-size: 10.5px; }
.pc-corpo { padding: 10px 14px 16px; }
.pc-sec { display: flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--s500); margin: 12px 0 6px; }
.pc-sec:first-child { margin-top: 2px; }
.pc-atualiza { margin-left: auto; border: 0; background: none; color: var(--s500); cursor: pointer; font-size: 14px; padding: 0 2px; }
.pc-atualiza:hover { color: var(--brand-600); }
.pc-dl { margin: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 5px 8px; font-size: 12.5px; }
.pc-dl dt { color: var(--s500); }
.pc-dl dd { margin: 0; overflow-wrap: anywhere; }
.pc-fats { background: #fff; border: 1px solid var(--s200); border-radius: 10px; }
.pc-fat { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 6px; padding: 8px 6px 8px 10px; border-top: 1px solid var(--s100); }
.pc-fat:first-child { border-top: 0; }
.pc-fat .l b, .pc-fat .r b { display: block; font-size: 13px; }
.pc-fat .l small { color: var(--s500); font-size: 11px; }
.pc-fat .r { text-align: right; display: grid; justify-items: end; gap: 2px; }
.pc-fat .r .chip { font-size: 10.5px; padding: 1px 6px; }
.pc-mais { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--s200); background: #fff; cursor: pointer; font-weight: 800; color: var(--s600); line-height: 1; }
.pc-mais:hover { border-color: var(--brand-300); color: var(--brand-700); }
.pc-mais:disabled { opacity: .6; }
.pc-menu { position: absolute; right: 6px; top: calc(100% - 4px); z-index: 8; background: #fff; border: 1px solid var(--s200); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 37, 64, .16); padding: 4px; min-width: 230px; }
.pc-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pc-menu button:hover { background: var(--brand-50); color: var(--brand-700); }
.pc-doc { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--s200); }
.pc-doc:first-of-type { border-top: 0; }
.pc-doc span { flex: 1; min-width: 0; }
.pc-doc b { display: block; font-size: 12.5px; font-weight: 600; }
.pc-doc small { color: var(--s500); font-size: 11px; }
.pc-doc .bt { padding: 0 8px; height: 28px; }
.pc-alerta { margin-top: 6px; font-size: 12px; color: #991b1b; background: #fef2f2; border-radius: 8px; padding: 6px 8px; }
.cons-barras { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.cons-barras div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; }
.cons-barras em { font-style: normal; font-size: 9.5px; color: var(--s600); font-weight: 600; }
.cons-barras span { width: 100%; max-width: 22px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #29b6e8, #155a9e); }
.cons-barras small { font-size: 9px; color: var(--s500); white-space: nowrap; }
.prot-cli { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 7px 0; border-top: 1px solid var(--s100); text-decoration: none; color: inherit; font-size: 12.5px; }

/* Áudio do atendente: prévia antes de mandar (gravação ou voz da IA). */
.previa-audio { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 12px 6px; border: 1px solid var(--brand-200); background: var(--brand-50); border-radius: 12px; font-size: 12.5px; }
.previa-audio audio { height: 34px; max-width: 280px; }
.previa-audio .rot { font-weight: 600; color: var(--brand-700); }
.previa-audio .gravando-rot { color: #b91c1c; }
.previa-audio .transc { color: var(--s600); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.previa-audio .espaco { flex: 1; }
.envio .clipe.gravando { background: #fee2e2; color: #b91c1c; border-color: #fecaca; animation: pulsoMic 1.2s ease-in-out infinite; }
@keyframes pulsoMic { 50% { box-shadow: 0 0 0 6px rgba(185, 28, 28, .12); } }

/* Avisos: mapa (Leaflet) e escolha de setores. */
.mapa-oc { height: 440px; border-radius: 12px; overflow: hidden; border: 1px solid var(--s200); background: var(--s100); position: relative; z-index: 0; }
.mapa-legenda { margin-top: 10px; font-size: 12.5px; color: var(--s600); }
.mapa-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.mapa-legenda i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; opacity: .75; }
.mapa-legenda i.pt { width: 10px; height: 10px; opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--s300); }
.mapa-legenda i.tr { background: none; border: 2px dashed var(--s400); }
.leaflet-tooltip.mapa-num { background: none; border: 0; box-shadow: none; color: #fff; font-weight: 800; font-size: 12px; padding: 0; }
.leaflet-tooltip.mapa-num::before { display: none; }
.chip-setor { --cor: #0ea5e9; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--s200); background: #fff; font: 600 12.5px/1 inherit; color: var(--s700); cursor: pointer; }
.chip-setor i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.chip-setor small { color: var(--s500); font-weight: 500; }
.chip-setor.ativo { border-color: var(--cor); background: color-mix(in srgb, var(--cor) 14%, #fff); color: var(--s900, #0f172a); }
.ponto-cor { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; }

/* Relatório */
.rel-periodo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 10px 14px; }
.rel-data { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--s600); }
.rel-data .inp { width: auto; height: 36px; }
.rel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.rel-kpi { position: relative; overflow: hidden; padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.rel-kpi > div { display: grid; gap: 2px; min-width: 0; }
.rel-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--k); }
.rel-kpi-ic { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--k); background: transparent; }
/* fundo claro na cor do quadro sem color-mix (o gerador de PDF não entende color-mix) */
.rel-kpi-ic::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--k); opacity: .12; }
.rel-kpi-ic svg { position: relative; }
.rel-kpi-ic svg { width: 19px; height: 19px; }
.rel-kpi small { font-size: 11px; font-weight: 700; color: var(--s500); text-transform: uppercase; letter-spacing: .04em; }
.rel-kpi b { font-size: 24px; color: var(--s900); line-height: 1.15; font-variant-numeric: tabular-nums; }
.rel-kpi span { font-size: 12px; color: var(--s500); overflow: hidden; text-overflow: ellipsis; }
.rel-kpi.grande b { font-size: 30px; }
.rel-kpis.menor .rel-kpi { padding: 12px 16px; align-items: center; }
.rel-kpis.menor .rel-kpi-ic { width: 32px; height: 32px; border-radius: 9px; }
.rel-kpis.menor .rel-kpi-ic svg { width: 16px; height: 16px; }
.rel-kpis.menor .rel-kpi b { font-size: 20px; }
.rel-secao { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--s200); }
.rel-secao h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-700); }
.rel-secao span { font-size: 12.5px; color: var(--s500); }
.rel-grade { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.rel-quadro { min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; }
.rel-quadro.c4 { grid-column: span 4; } .rel-quadro.c5 { grid-column: span 5; } .rel-quadro.c6 { grid-column: span 6; }
.rel-quadro.c7 { grid-column: span 7; } .rel-quadro.c8 { grid-column: span 8; } .rel-quadro.c12 { grid-column: 1 / -1; }
.rel-conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rel-conteudo > .rel-rosca, .rel-conteudo > .rel-vazio:only-child, .rel-conteudo > .rel-medidores:only-child { margin: auto 0; }
.rel-tit { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.rel-tit h2 { margin: 0; font-size: 15px; color: var(--s900); }
.rel-tit p { margin: 3px 0 0; font-size: 12.5px; color: var(--s500); }
.rel-csv { flex: none; border: 1px solid var(--s200); background: #fff; color: var(--s600); border-radius: 8px; padding: 4px 9px; font: 600 11.5px/1.2 inherit; cursor: pointer; }
.rel-csv:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.rel-vazio { padding: 22px 12px; text-align: center; color: var(--s400); font-size: 13px; background: var(--s50); border-radius: 12px; }
.rel-vazio.ok { color: var(--verde); background: var(--verde-50); font-weight: 600; }
/* gráficos em SVG */
.rel-svg { width: 100%; height: auto; display: block; overflow: visible; }
.rel-svg text { font-size: 11px; fill: var(--s400); font-family: inherit; }
.rel-svg line.g { stroke: var(--s100); stroke-width: 1; }
.rel-svg line.base { stroke: var(--s300); }
.rel-svg rect[fill="transparent"]:hover { fill: rgba(30, 111, 191, .06); }
.rel-destaque { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 10px; }
.rel-destaque div { display: grid; }
.rel-destaque b { font-size: 20px; color: var(--s900); font-variant-numeric: tabular-nums; }
.rel-destaque span { font-size: 11.5px; color: var(--s500); }
.rel-rosca { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.rel-rosca svg { width: 150px; height: 150px; flex: none; }
.rel-rosca .rc-n { font-size: 22px; font-weight: 800; fill: var(--s900); }
.rel-rosca .rc-r { font-size: 9px; fill: var(--s500); text-transform: uppercase; letter-spacing: .06em; }
.rel-rosca ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 150px; flex: 1; }
.rel-rosca li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 38px; align-items: center; gap: 8px; font-size: 13px; }
.rel-rosca li i { width: 10px; height: 10px; border-radius: 3px; }
.rel-rosca li span { color: var(--s700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-rosca li small { color: var(--s500); text-align: right; }
.rel-barras { display: grid; gap: 10px; }
.rel-barras .rb { display: flex; gap: 10px; align-items: center; }
.rb-pos { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--s500); background: var(--s100); }
.rb-meio { flex: 1; min-width: 0; display: grid; gap: 4px; }
.rb-linha { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.rb-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--s700); }
.rb-linha b { color: var(--s900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-linha b small { margin-left: 6px; font-weight: 500; color: var(--s400); font-size: 11.5px; }
.rb-b { height: 8px; background: var(--s100); border-radius: 999px; overflow: hidden; }
.rb-b i { display: block; height: 100%; border-radius: 999px; }
.rel-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.rel-semana div { border-radius: 10px; padding: 8px 4px; text-align: center; display: grid; gap: 1px; }
.rel-semana small { font-size: 11px; font-weight: 700; opacity: .8; }
.rel-semana b { font-size: 14px; font-variant-numeric: tabular-nums; }
.rel-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; font-size: 12px; color: var(--s600); }
.rel-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.rel-legenda i { width: 10px; height: 10px; border-radius: 3px; }
.rel-pilhas { display: grid; gap: 12px; }
.rp { display: grid; gap: 5px; }
.rp-cab { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--s700); }
.rp-cab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cab b { color: var(--s900); }
.rp-cab small { color: var(--s500); font-size: 11.5px; min-width: 60px; text-align: right; }
.rp-b { display: flex; height: 16px; border-radius: 6px; overflow: hidden; background: var(--s100); gap: 2px; }
.rp-b i { display: grid; place-items: center; min-width: 4px; font: 700 10px/1 inherit; font-style: normal; color: #fff; }
.rel-medidores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rel-medidor { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 10px 6px; background: var(--s50); border-radius: 14px; }
.rel-medidor svg { width: 100%; max-width: 150px; }
.rel-medidor text { font-size: 17px; font-weight: 800; fill: var(--s900); }
.rel-medidor span { font-weight: 700; font-size: 13px; color: var(--s800); }
.rel-medidor small { font-size: 11.5px; color: var(--s500); }
.rel-medidor.vazio b { font-size: 26px; color: var(--s300); padding: 18px 0 6px; }
.rel-coment { display: grid; gap: 8px; margin-top: 14px; max-height: 240px; overflow: auto; }
.rel-coment > div { display: flex; gap: 10px; padding: 8px 10px; background: var(--s50); border-radius: 10px; font-size: 13px; }
.rel-coment p { margin: 0; display: grid; gap: 2px; }
.rel-coment small { color: var(--s500); font-size: 11.5px; }
.rel-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.rel-tiles div { background: var(--s50); border-radius: 12px; padding: 10px 12px; display: grid; gap: 1px; }
.rel-tiles b { font-size: 19px; color: var(--s900); font-variant-numeric: tabular-nums; }
.rel-tiles span { font-size: 11.5px; color: var(--s500); }
.rel-tiles .alerta { background: var(--verm-50); } .rel-tiles .alerta b { color: var(--verm); }
.rel-tiles .bom { background: var(--verde-50); } .rel-tiles .bom b { color: var(--verde); }
.rel-tab-rolo { overflow-x: auto; }
.rel-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.rel-tab th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--s500); padding: 8px 10px; border-bottom: 1px solid var(--s200); white-space: nowrap; }
.rel-tab td { padding: 9px 10px; border-bottom: 1px solid var(--s100); color: var(--s700); }
.rel-tab tbody tr:hover td { background: var(--s50); }
.rel-tab tbody tr:last-child td { border-bottom: 0; }
.rel-tab .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rel-tab td.barra { min-width: 150px; }
.rel-celbarra { display: inline-block; vertical-align: middle; width: 90px; height: 6px; margin-right: 10px; background: var(--s100); border-radius: 999px; overflow: hidden; }
.rel-celbarra i { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }
.rel-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: 12px; vertical-align: middle; text-transform: uppercase; }
.rel-pill { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--s100); color: var(--s500); }
.rel-pill.bom { background: var(--verde-100); color: #047857; }
.rel-pill.regular { background: var(--ambar-100); color: #b45309; }
.rel-pill.ruim { background: var(--verm-100); color: #be123c; }
.rel-titulo-imp { display: none; }
@media (max-width: 1180px) {
  .rel-quadro.c4, .rel-quadro.c5, .rel-quadro.c6, .rel-quadro.c7, .rel-quadro.c8 { grid-column: span 6; }
  .rel-grade > .rel-quadro.c8:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .rel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rel-quadro.c4, .rel-quadro.c5, .rel-quadro.c6, .rel-quadro.c7, .rel-quadro.c8 { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .rel-kpi.grande b { font-size: 24px; }
  .rel-secao { flex-direction: column; gap: 2px; }
  .rel-rosca svg { width: 130px; height: 130px; }
  .rel-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rel-medidores { grid-template-columns: minmax(0, 1fr); }
  .rel-quadro { padding: 14px; }
}
@media print {
  .barra, .rel-acoes, .rel-periodo, .rel-csv { display: none !important; }
  .rel-titulo-imp { display: block; }
  .rel-quadro, .rel-kpi { break-inside: avoid; box-shadow: none; }
  .rel-grade { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  body { background: #fff; }
}
/* Prévia da pesquisa do serviço */
.pesq-previa { max-width: 380px; background: #e5ddd5; padding: 12px; border-radius: 12px; }
.pesq-previa .bolha { background: #fff; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; white-space: normal; }
.pesq-bts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.pesq-bts span { background: #fff; border-radius: 8px; text-align: center; padding: 8px 4px; color: #0284c7; font-size: 13px; font-weight: 600; }

/* Satisfação do cliente ao lado do número (última pesquisa respondida) */
.selo-sat { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; vertical-align: 1px; cursor: default; }
.selo-sat.bom { background: #dcfce7; color: #15803d; }
.selo-sat.regular { background: #fef3c7; color: #b45309; }
.selo-sat.ruim { background: #fee2e2; color: #b91c1c; }
.selo-sat.sem { background: var(--s100); color: var(--s500); font-weight: 600; }

/* Conversas sem conversa aberta: quadro com Fila · Minhas · Equipe · Robô, arrastando os cartões */
.chat3.modo-quadro { grid-template-columns: minmax(0, 1fr) !important; }
.chat3.modo-quadro .painel, .chat3.modo-quadro .cliente-conv, .chat3.modo-quadro .abas-conv { display: none !important; }
.chat3.modo-quadro .lista-conv { border-right: 0; }
.chat3.modo-quadro .lista-conv .topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat3.modo-quadro .puxar-prox { width: auto; flex: none; padding: 0 18px; }
.chat3.modo-quadro .filtros-conv { flex: 1; display: flex; gap: 8px; max-width: 640px; }
.chat3.modo-quadro .filtros-conv .inp { flex: 1; }
.chat3.modo-quadro .filtros-conv select.inp { flex: 0 0 200px; }
.chat3.modo-quadro .itens { overflow: hidden; display: flex; }
.quadro-conv { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; padding: 14px; background: var(--s50); overflow-x: auto; min-height: 0; }
.qcol { display: flex; flex-direction: column; min-height: 0; background: var(--s100); border: 2px dashed transparent; border-radius: 16px; transition: background .15s, border-color .15s, opacity .15s; }
.qcol header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 12px 14px 10px; }
.qcol header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.qcol header b { font-size: 14px; color: var(--s800); }
.qcol-n { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--s600); font-size: 12px; font-weight: 700; text-align: center; }
.qcol header small { grid-column: 2 / -1; font-size: 11.5px; color: var(--s500); }
.qcol-soltar { grid-column: 1 / -1; font-style: normal; font-size: 12px; font-weight: 700; color: var(--brand-700); display: none; }
.qcol-itens { flex: 1; overflow-y: auto; padding: 0 10px 10px; display: grid; align-content: start; gap: 8px; }
.qcol .conv { background: #fff; border: 1px solid var(--s200); border-top: 3px solid var(--c); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 37, 64, .05); cursor: grab; }
.qcol .conv:hover { background: #fff; box-shadow: 0 4px 14px rgba(15, 37, 64, .10); }
.qcol .conv:active { cursor: grabbing; }
.qcol .conv.arrastado { opacity: .35; }
.qcol-vazia { padding: 24px 10px; text-align: center; font-size: 12.5px; color: var(--s400); border: 1px dashed var(--s300); border-radius: 12px; }
.quadro-conv.arrastando .qcol:not(.pode):not(.origem) { opacity: .45; }
.quadro-conv.arrastando .qcol.pode { border-color: var(--brand-300); background: var(--brand-50); }
.quadro-conv.arrastando .qcol.pode .qcol-soltar { display: block; }
.quadro-conv.arrastando .qcol.sobre { border-style: solid; border-color: var(--brand-500); background: var(--brand-100); }

.voltar-quadro { display: flex; justify-content: center; gap: 6px; text-decoration: none; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-200); }
.voltar-quadro:hover { background: var(--brand-100); }
@media (max-width: 860px) { .voltar-quadro { display: none; } }

/* Equipe em campo (#/campo): mapa na tela toda, sem a barra do sistema */
body.modo-campo .barra { display: none; }
/* Sem animação/transform no conteúdo: senão o position:fixed fica preso a ele (altura 0). */
body.modo-campo #conteudo { padding: 0; max-width: none; animation: none !important; transform: none !important; filter: none !important; }
.campo-tela { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--s100); }
.campo-topo { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--s200); flex-wrap: wrap; }
.campo-tit { display: grid; }
.campo-tit b { font-size: 16px; }
.campo-tit small { font-size: 11.5px; color: var(--verde); }
.campo-num { display: flex; gap: 6px; flex-wrap: wrap; }
.campo-num span { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.campo-topo .espaco { flex: 1; }
.campo-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.campo-tela.sem-lado .campo-corpo { grid-template-columns: minmax(0, 1fr) 0; }
.campo-tela.sem-lado .campo-lado { display: none; }
.campo-mapa { min-height: 0; height: 100%; }
.campo-lado { min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #fff; border-left: 1px solid var(--s200); }
.campo-lado .abas { display: grid; grid-template-columns: repeat(3, 1fr); }
.campo-lado .abas b { font-size: 11px; color: var(--brand-700); }
.campo-lista { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 6px; }
.cp-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px; border: 1px solid var(--s200); border-radius: 12px; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.cp-item:hover:not(:disabled) { background: var(--brand-50); border-color: var(--brand-200); }
.cp-item:disabled { cursor: default; opacity: .75; }
.cp-item > span:last-child { display: grid; gap: 1px; min-width: 0; }
.cp-item small { font-size: 12px; color: var(--s500); }
.cp-item .cp-h { color: #c2410c; font-weight: 600; }
.cp-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12.5px; background: var(--c); }
.cp-pin { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; background: var(--c); }
.campo-legenda { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--s600); padding-top: 8px; border-top: 1px solid var(--s100); }
.campo-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.campo-legenda .pino { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.campo-legenda .pino.ok { background: #059669; }
.campo-legenda .sinal { color: #c2410c; }
.cp-pino { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.cp-pino span { transform: rotate(45deg); line-height: 1; }
.cp-pino.peq { width: 22px; height: 22px; font-size: 11px; }
.cp-pino.aprox { opacity: .75; border-style: dashed; }
.cp-pino.pulsa { animation: cpPulsa 1.6s infinite; }
@keyframes cpPulsa { 0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .6); } 70% { box-shadow: 0 0 0 14px rgba(217, 119, 6, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); } }
.cp-pessoa { width: 38px; height: 38px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.cp-pessoa.apagado { filter: grayscale(1); opacity: .7; }
.cp-nome { font-weight: 700; font-size: 11.5px; padding: 1px 6px; }
.cp-pop { font: 13px/1.45 system-ui, sans-serif; display: grid; gap: 4px; min-width: 220px; }
.cp-pop .chip { padding: 1px 8px; font-size: 11px; }
.cp-desc { color: var(--s600); max-height: 60px; overflow: auto; }
.cp-hist { padding: 6px 8px; border-radius: 8px; background: #fff7ed; color: #c2410c; }
.cp-enc { display: flex; gap: 6px; margin-top: 4px; }
.cp-enc select { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--s300); border-radius: 8px; font: inherit; }
.cp-abrir { font-weight: 600; }
.campo-avisos { position: fixed; left: 16px; bottom: 16px; z-index: 1000; display: grid; gap: 8px; max-width: 360px; }
.cp-aviso { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-left: 5px solid var(--c); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(15, 37, 64, .2); text-align: left; font: inherit; cursor: pointer; animation: surgir .25s ease; }
.cp-aviso > span:first-child { font-size: 20px; }
.cp-aviso > span:last-child { display: grid; }
.cp-aviso small { color: var(--s500); }
@media (max-width: 860px) {
  .campo-corpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 42%; }
  .campo-lado { border-left: 0; border-top: 1px solid var(--s200); }
}
/* Protocolo: bloco da equipe de campo e histórico do ponto */
.campo-prot { margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--brand-100); border-radius: 14px; background: var(--brand-50); }
.campo-prot h4 { margin: 0 0 8px; }
.campo-prot .tab { background: #fff; border-radius: 10px; }
.hist-ponto { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fdba74; font-size: 13px; display: grid; gap: 8px; }
.hist-ponto > b { color: #c2410c; }
.foto-prot { position: relative; display: block; }
.foto-prot img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--s200); display: block; }
.foto-prot small { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 11px; }
.foto-prot.do-tecnico img { border: 2px solid var(--verde); }

/* Início: Cidade da Água em fundo branco */
/* a animação */
.cid-palco { border: 1px solid var(--s200); border-radius: 16px; background: #fff; overflow: hidden; }
.cid-palco { min-width: 0; display: flex; flex-direction: column; }
.cid-topo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--s100); flex-wrap: wrap; }
.cid-modo, .cid-status { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.cid-modo { font-size: 10.5px; color: var(--s500); }
.cid-troca { display: flex; gap: 4px; margin-left: auto; }
.cid-palco button, .cid-palco select { font: 600 12.5px Inter, system-ui, sans-serif; color: var(--s700); background: #fff; border: 1px solid var(--s200); border-radius: 9px; min-height: 32px; padding: 4px 10px; cursor: pointer; }
.cid-palco button:hover { border-color: var(--brand-300); }
.cid-palco button[aria-pressed=true] { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }
.cid-status { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--verde); padding: 6px 10px; border: 1px solid var(--verde-100); border-radius: 8px; background: var(--verde-50); }
.cid-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 10px rgba(5, 150, 105, .5); }
.cid-status.paused { color: var(--ambar); border-color: var(--ambar-100); background: var(--ambar-50); }
.cid-status.paused i { background: var(--ambar); box-shadow: none; }
.cid-vista { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 52% 48%, #f3f8fc 0%, #ffffff 70%); }
.cid-vista::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(30, 111, 191, .13) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(transparent, #000 30%, #000 75%, transparent); pointer-events: none; }
.cid-vista canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.cid-vista canvas:active { cursor: grabbing; }
.cid-pinos { position: absolute; inset: 0; pointer-events: none; }
.cid-pino { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 10px !important; font-size: 11.5px !important; background: rgba(255, 255, 255, .94) !important; border-color: var(--brand-200) !important; box-shadow: 0 4px 14px rgba(15, 37, 64, .14); }
.cid-pino b { color: var(--brand-600); font-family: ui-monospace, Consolas, monospace; }
.cid-pino::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: var(--brand-300); }
.cid-pino[hidden] { display: none; }
.cid-falha { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--s500); background: #fff; }
.cid-falha[hidden] { display: none; }

/* Início: tela fixa (sem barra de rolagem) em duas colunas — à esquerda a logo e os atalhos, à direita a cidade */
body.modo-inicio { background: #fff; overflow: hidden; }
body.modo-inicio #conteudo { max-width: none; height: calc(100dvh - 64px); padding: 18px 24px; }
.ini { height: 100%; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; }
.ini-col { min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.ini-cab { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--s200); }
.ini-logo { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(21, 90, 158, .18)); }
.ini-tit h1 { margin: 4px 0 0; font-size: clamp(30px, 2.8vw, 44px); line-height: 1; letter-spacing: -.05em; font-weight: 800; color: var(--azul-900); }
.ini-tit p { margin: 8px 0 0; color: var(--s500); font-size: 14.5px; line-height: 1.45; }
.ini-atalhos { display: grid; gap: 10px; }
.ini-atalho { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--s200); border-radius: 16px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(15, 37, 64, .04); transition: border-color .15s, box-shadow .15s, transform .15s; }
.ini-atalho:hover { border-color: var(--brand-200); box-shadow: 0 8px 22px rgba(21, 90, 158, .10); transform: translateX(2px); }
.ini-atalho > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.ini-atalho b { font-size: 15px; color: var(--s800); }
.ini-atalho small { font-size: 12.5px; color: var(--s500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.ini-ic svg { width: 20px; height: 20px; }
.ini-dica { font-size: 12px; font-weight: 700; color: var(--brand-600); }
.ini-cidade { min-height: 0; min-width: 0; display: flex; }
.ini-cidade > .cid-palco { flex: 1; }
/* Tela baixa ou estreita: volta a rolar (não corta nada) */
@media (max-width: 900px), (max-height: 560px) {
  body.modo-inicio { overflow: auto; }
  body.modo-inicio #conteudo { height: auto; padding: 12px; }
  .ini { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ini-cidade { height: 70vh; }
}
@media (max-width: 560px) { .cid-pino { font-size: 0 !important; padding: 5px !important; } .cid-pino b { font-size: 10px; } }

/* Relatório: Baixar tudo e Imprimir na mesma linha do período, à direita */
.rel-periodo .rel-acoes { margin-left: auto; gap: 8px; flex-wrap: wrap; }

/* Painel do cliente: botão do dossiê */
.pc-dossie { display: flex; justify-content: center; gap: 6px; margin-top: 8px; text-decoration: none; }
.pc-dossie svg { width: 14px; height: 14px; }

/* Rádio: só o botão de play na barra */
.radio-barra.radio-so-play { padding: 3px; gap: 2px; }

/* Cabeçalho: recolher dos dois lados (como na Regulação) */
.grupo-dir { display: flex; align-items: center; gap: 12px; flex: none; } /* não encolhe: quem rola é o menu */
.bt-recolher { flex: none; display: grid; place-items: center; width: 30px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--s300); cursor: pointer; transition: background .15s, color .15s; }
.bt-recolher:hover { background: var(--s100); color: var(--s600); }
.bt-recolher svg { width: 17px; height: 17px; }
.barra.rec-dir .grupo-dir { display: none; }
/* Menus recolhidos: ficam só os ícones (o nome aparece ao passar o mouse, pelo title) */
.barra.rec-esq .menus a { padding: 8px 10px; gap: 0; }
.barra.rec-esq .menus a span { display: none; }
.barra.rec-esq .menus svg { width: 18px; height: 18px; }
.barra.rec-esq [data-recolher="esq"], .barra.rec-dir [data-recolher="dir"] { color: var(--brand-700); background: var(--brand-50); }

/* Ligações (Wavoip): cartão da ligação no canto, discador e aparelhos */
.tel-cartao { position: fixed; right: 18px; bottom: 18px; z-index: 2000; width: 320px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--s200); box-shadow: 0 18px 48px rgba(15, 37, 64, .28); display: none; gap: 10px; }
.tel-cartao.ver { display: grid; animation: surgir .2s ease; }
.tel-cartao.fase-tocando { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(5, 150, 105, .15), 0 18px 48px rgba(15, 37, 64, .28); }
.tel-cartao.fase-ativa { border-color: var(--brand-300); }
.tel-tit { font-weight: 800; font-size: 13px; color: var(--s700); }
.fase-tocando .tel-tit { color: var(--verde); animation: telPisca 1s infinite alternate; }
@keyframes telPisca { from { opacity: 1; } to { opacity: .45; } }
.tel-quem { display: flex; align-items: center; gap: 10px; }
.tel-quem > span:last-child { display: grid; min-width: 0; }
.tel-quem b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tel-quem small { color: var(--s500); font-size: 12px; }
.tel-av { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-weight: 800; text-transform: uppercase; }
.tel-bts { display: flex; gap: 8px; }
.tel-bts:empty { display: none; }
.tel-bt { flex: 1; min-height: 40px; border-radius: 12px; border: 1px solid var(--s300); background: #fff; font: 700 13.5px Inter, system-ui, sans-serif; cursor: pointer; }
.tel-bt.ok { background: var(--verde); border-color: var(--verde); color: #fff; }
.tel-bt.nao { background: var(--verm); border-color: var(--verm); color: #fff; }
.bt-ligar { color: var(--verde); }
.bt-ligar svg { width: 15px; height: 15px; }
.lig-grade { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.lig-teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.lig-teclado button { height: 48px; border-radius: 14px; border: 1px solid var(--s200); background: var(--s50); font: 700 18px Inter, system-ui, sans-serif; color: var(--s800); cursor: pointer; }
.lig-teclado button:hover { background: var(--brand-50); border-color: var(--brand-200); }
.lig-aparelho { display: grid; grid-template-columns: 10px auto 1fr; gap: 2px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--s200); border-radius: 12px; margin-top: 6px; font-size: 13px; }
.lig-aparelho i { width: 9px; height: 9px; border-radius: 50%; background: var(--s300); }
.lig-aparelho i.ok { background: var(--verde); }
.lig-aparelho small { grid-column: 2 / -1; color: var(--s500); }
@media (max-width: 900px) { .lig-grade { grid-template-columns: minmax(0, 1fr); } .tel-cartao { left: 12px; right: 12px; width: auto; } }


/* Minha conta: dados, senha, assinatura desenhada e certificado A1 */
.modal.modal-conta { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.conta-abas { margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); }
.ass-caixa { display: grid; gap: 8px; }
.ass-atual { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--s200); border-radius: 12px; background: var(--s50); }
.ass-atual small { color: var(--s500); font-size: 11.5px; }
.ass-atual img { max-height: 80px; max-width: 100%; object-fit: contain; justify-self: center; }
.ass-quadro { width: 100%; height: auto; aspect-ratio: 760 / 260; border: 2px dashed var(--brand-200); border-radius: 14px; background: #fff; touch-action: none; cursor: crosshair; }
.ass-linha { display: grid; justify-items: center; border-top: 1.5px solid var(--s700); margin: -4px 40px 4px; padding-top: 4px; font-size: 13px; }
.ass-linha small { color: var(--s500); font-size: 11.5px; }
.cert-cartao { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--verde-100); background: var(--verde-50); }
.cert-cartao > div:last-child { display: grid; gap: 2px; min-width: 0; }
.cert-cartao small { color: var(--s600); font-size: 12px; }
.cert-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--verde); }
.cert-ic svg { width: 20px; height: 20px; }
.cert-cartao.vence { border-color: var(--ambar-100); background: var(--ambar-50); }
.cert-cartao.vence .cert-ic { color: var(--ambar); }
.cert-cartao.vencido { border-color: var(--verm-100); background: var(--verm-50); }
.cert-cartao.vencido .cert-ic { color: var(--verm); }
.menu-conta [data-conta] svg { width: 16px; height: 16px; }
.link-trocar { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; border: 0; background: transparent; color: var(--brand-700); font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
.link-trocar:hover { text-decoration: underline; }
.link-trocar svg { width: 15px; height: 15px; }

/* Logo do município: Início e configuração */
.ini-logos { display: flex; align-items: center; gap: 14px; }
.ini-div { width: 1px; align-self: stretch; background: var(--s200); }
.ini-logo-mun { height: 58px; width: auto; max-width: 180px; object-fit: contain; }
.marca-cfg { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.marca-previa { width: 200px; height: 120px; border: 2px dashed var(--s200); border-radius: 14px; display: grid; place-items: center; background: repeating-conic-gradient(#f8fafc 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.marca-previa img { max-width: 180px; max-height: 100px; object-fit: contain; }

/* E-mail: atalhos de provedor */
.cfg-provedores { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.cfg-provedores span { font-size: 12.5px; color: var(--s500); margin-right: 4px; }

/* Acessos: foto no cadastro e usuário inativo */
.foto-cad { display: grid; gap: 8px; justify-items: center; padding: 12px; border: 2px dashed var(--brand-200); border-radius: 14px; background: var(--brand-50); }
.foto-cad video, .foto-cad img, .foto-cad .vazia { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; background: var(--s200); border: 3px solid #fff; }
.foto-cad video { transform: scaleX(-1); }
.foto-cad .vazia { display: grid; place-items: center; color: var(--s400); }
.foto-cad .vazia[hidden], .foto-cad video[hidden], .foto-cad img[hidden] { display: none; }
.foto-cad .vazia svg { width: 36px; height: 36px; }
.tab tr.inativo td { opacity: .55; }

/* Minha conta: verificação em duas etapas */
.dois-f { margin-top: 16px; padding: 14px; border: 1px solid var(--s200); border-radius: 14px; background: var(--s50); }
.dois-f b { display: inline-flex; align-items: center; gap: 6px; }
.dois-f b svg { width: 16px; height: 16px; color: var(--brand-600); }
.passos-2f { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; }
.qr-2f { width: 180px; margin: 8px 0 4px; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--s200); }
.qr-2f svg { width: 100%; height: auto; display: block; }

/* Ligações: recados de voz e ligação em massa */
.lig-grade2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.recados { display: grid; gap: 10px; max-height: 620px; overflow: auto; }
.recado { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--s200); border-radius: 14px; background: #fff; }
.recado.inativo { opacity: .55; }
.recado .rec-cab { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.recado p { margin: 0; font-size: 13px; color: var(--s600); line-height: 1.5; }
.recado audio { width: 100%; height: 36px; }
.camp-barra { height: 8px; border-radius: 999px; background: var(--s100); overflow: hidden; min-width: 120px; }
.camp-barra i { display: block; height: 100%; background: var(--verde); border-radius: 999px; }
@media (max-width: 1100px) { .lig-grade2 { grid-template-columns: minmax(0, 1fr); } }

/* Início: município e habitantes */
.ini-mun { display: grid; gap: 1px; order: 2; }
.ini-mun b { font-size: 15px; color: var(--azul-900); }
.ini-mun span { font-size: 12.5px; color: var(--s500); }

/* Início: só a logo do município, centralizada e maior */
.ini-cab { justify-items: center; text-align: center; }
.ini-cab .ini-logo-mun { height: auto; max-height: 130px; width: auto; max-width: 260px; object-fit: contain; }
.ini-mun { order: 0; justify-items: center; }

/* Cidade: marcadores com um pulso leve */
.cid-pino { animation: cidPulso 2.6s ease-in-out infinite; }
.cid-pino:nth-child(2) { animation-delay: .8s; }
.cid-pino:nth-child(3) { animation-delay: 1.6s; }
@keyframes cidPulso { 0%, 100% { box-shadow: 0 4px 14px rgba(15, 37, 64, .14); } 50% { box-shadow: 0 4px 14px rgba(15, 37, 64, .14), 0 0 0 6px rgba(30, 111, 191, .14); } }
@media (prefers-reduced-motion: reduce) { .cid-pino { animation: none; } }


/* Folha do PDF do relatório: largura fixa (A4 deitado), fora da tela enquanto é gerada */
.rel-envelope { position: fixed; left: 0; top: 0; z-index: -1; opacity: 0; pointer-events: none; } /* invisível, mas no canto (fora da tela o gerador cortava a esquerda) */
.rel-folha { width: 1100px; background: #fff; padding: 0; color: var(--s800); }
.rel-folha-cab { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 14px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 3px solid var(--brand-600); }
.rel-folha-cab .rf-logo { width: 54px; height: 54px; object-fit: contain; }
.rel-folha-cab .rf-mun { height: 54px; width: auto; max-width: 140px; object-fit: contain; }
.rel-folha-cab .rf-tit { display: grid; gap: 1px; }
.rel-folha-cab .rf-tit small { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-600); }
.rel-folha-cab .rf-tit b { font-size: 22px; color: var(--azul-900); }
.rel-folha-cab .rf-tit span { font-size: 12px; color: var(--s500); }
.rel-folha-cab .rf-qr { display: grid; justify-items: center; gap: 2px; text-align: center; }
.rel-folha-cab .rf-qr img { width: 82px; height: 82px; image-rendering: pixelated; }
.rel-folha-cab .rf-qr small { font-size: 9.5px; color: var(--s500); line-height: 1.2; }
.rel-folha-cab .rf-qr b { font-family: ui-monospace, Consolas, monospace; color: var(--s800); font-size: 10px; }
.rel-folha .rel-grade { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
.rel-folha .rel-quadro.c4 { grid-column: span 4 !important; } .rel-folha .rel-quadro.c5 { grid-column: span 5 !important; } .rel-folha .rel-quadro.c6 { grid-column: span 6 !important; }
.rel-folha .rel-quadro.c7 { grid-column: span 7 !important; } .rel-folha .rel-quadro.c8 { grid-column: span 8 !important; } .rel-folha .rel-quadro.c12 { grid-column: 1 / -1 !important; }
.rel-folha .rel-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.rel-folha .rel-quadro, .rel-folha .rel-kpi { box-shadow: none; break-inside: avoid; }
.rel-folha .rel-coment { max-height: none; overflow: visible; }
.rel-folha-pe { margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--s200); font-size: 10px; color: var(--s500); }

/* REDE VIVA (#/rede): a cidade inteira como rede de canos, em tela cheia */
.rede-tela { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #fff; }
.rede-topo { display: flex; align-items: center; gap: 10px 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--s200); flex-wrap: wrap; position: relative; z-index: 2; }
.rede-topo .espaco { flex: 1; }
.rede-topo .inp { width: 260px; max-width: 100%; }
.rede-num { display: flex; gap: 6px; flex-wrap: wrap; }
.rede-num span { padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--azul-900); background: #eaf4fb; }
.rede-num span.ruim { color: #be123c; background: #ffe4e8; }
.rede-num span.atencao { color: #92400e; background: #fef3c7; }
.rede-corpo { position: relative; flex: 1; min-height: 0; }
.rede-mapa { position: absolute; inset: 0; }
.rv-tela { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; outline: none; }
.rv-tela:active { cursor: grabbing; }
.rv-dica { position: absolute; z-index: 3; width: 300px; display: grid; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--s200); border-radius: 14px; box-shadow: 0 14px 34px rgba(15,37,64,.16); font-size: 13px; pointer-events: auto; }
.rv-dica b { font-size: 15px; color: var(--azul-900); }
.rv-dica small { color: var(--s500); }
.rv-est { justify-self: start; margin: 2px 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.rv-est.ok { color: #0369a1; background: #e0f2fe; }
.rv-est.alerta { color: #92400e; background: #fef3c7; }
.rv-est.fechada { color: #be123c; background: #ffe4e8; }
.rv-mot { display: block; padding: 6px 8px; border-radius: 8px; background: var(--s50, #f8fafc); color: var(--s800); text-decoration: none; font-size: 12.5px; }
.rv-mot:hover { background: #eef6fc; }
.rede-zoom { position: absolute; right: 14px; bottom: 60px; z-index: 2; display: grid; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(15,37,64,.14); }
.rede-zoom button { width: 40px; height: 40px; border: 0; background: #fff; font-size: 22px; line-height: 1; color: var(--azul-900); cursor: pointer; }
.rede-zoom button + button { border-top: 1px solid var(--s200); }
.rede-zoom button:hover { background: #eef6fc; }
.rede-legenda { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 12px; background: rgba(255,255,255,.92); border: 1px solid var(--s200); border-radius: 12px; font-size: 12px; color: var(--s700, #334155); }
.rede-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.rede-legenda .cano { width: 26px; height: 8px; border-radius: 6px; border: 2px solid; }
.rede-legenda .cano.ok { border-color: #376d91; background: repeating-linear-gradient(90deg, #0ba5df 0 6px, #30bde8 6px 10px); }
.rede-legenda .cano.alerta { border-color: #b7791f; background: repeating-linear-gradient(90deg, #0ba5df 0 6px, #fff1c7 6px 10px); }
.rede-legenda .cano.fechada { border-color: #9f1d2c; background: #ffd9dd; }
.rede-lado { position: absolute; top: 12px; right: 12px; z-index: 2; width: 300px; max-height: calc(100% - 140px); display: flex; flex-direction: column; background: rgba(255,255,255,.95); border: 1px solid var(--s200); border-radius: 14px; box-shadow: 0 10px 28px rgba(15,37,64,.12); overflow: hidden; }
.rede-lado-cab { display: grid; padding: 10px 14px; border-bottom: 1px solid var(--s200); }
.rede-lado-cab small { color: var(--s500); font-size: 12px; }
.rede-lado-lista { overflow: auto; padding: 6px 8px 10px; }
.rede-grupo > small { display: block; margin: 8px 6px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s500); }
.rede-grupo button { width: 100%; display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; font: inherit; font-size: 13px; color: var(--s800); }
.rede-grupo button:hover { background: #eef6fc; }
.rede-grupo button i { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 3px #ffe4e8; }
.rede-grupo button.alerta i { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.rede-grupo button span { display: grid; }
.rede-grupo button em { font-style: normal; font-size: 11.5px; color: var(--s500); }
.rede-tudo-ok { display: grid; gap: 2px; padding: 12px 14px; }
.rede-tudo-ok b { color: #0369a1; }
.rede-tudo-ok small { color: var(--s500); }
.rede-vazio { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(255,255,255,.55); }
.rede-vazio-card { width: min(440px, calc(100% - 32px)); display: grid; gap: 10px; justify-items: center; text-align: center; padding: 26px; background: #fff; border: 1px solid var(--s200); border-radius: 20px; box-shadow: 0 20px 50px rgba(15,37,64,.12); }
.rede-vazio-card small { color: var(--s500); }
.rede-vazio-card .girando { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #e0f2fe; border-top-color: #0ba5df; animation: rv-gira 1s linear infinite; }
@keyframes rv-gira { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .rede-lado { top: auto; bottom: 64px; left: 12px; right: 12px; width: auto; max-height: 34%; }
  .rede-legenda { gap: 8px; font-size: 11px; }
  .rede-topo .inp { width: 100%; order: 9; }
}

/* REDE VIVA · TELA 2: só os canos, no desenho do projeto (web/rede-canos.js) */
.rede-tela.canos .rede-zoom, .rede-tela.canos .rede-legenda, .rede-tela.canos .rede-lado { display: none !important; }
.rc { position: absolute; inset: 0; display: flex; flex-direction: column; background: linear-gradient(#fff, #f1f7fb); }
.rc-cab { display: flex; align-items: center; gap: 12px; padding: 14px 22px 0; flex-wrap: wrap; }
.rc-cab .espaco { flex: 1; }
.rc-marca { display: flex; align-items: center; gap: 12px; }
.rc-marca div { display: grid; }
.rc-marca small { color: #197799; font-size: 10.5px; font-weight: 800; letter-spacing: .2em; }
.rc-marca b { color: #12334c; font-size: 24px; font-weight: 800; line-height: 1.15; }
.rc-marca span { color: #496a7d; font-size: 13.5px; }
.rc-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #e9f5fc; border: 1px solid #cce6f2; color: #1e617d; font-size: 12.5px; font-weight: 700; }
.rc-status i { width: 9px; height: 9px; border-radius: 50%; background: #12a4d8; }
.rc-status.ruim { background: #fff4ec; border-color: #f4d3b7; color: #84511f; }
.rc-status.ruim i { background: #e7ac40; }
.rc-palco { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.rc-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rc-svg path { stroke-linejoin: round; }
.rc-svg .shadow, .rc-svg .wall, .rc-svg .glass, .rc-svg .lumen, .rc-svg .specular, .rc-svg .stream, .rc-svg .wave, .rc-svg .bubble { fill: none; stroke-linecap: round; }
.rc-svg .shadow { stroke: #345f84; stroke-opacity: .25; stroke-width: 39; filter: url(#rcBlur); }
.rc-svg .wall { stroke: #376d91; stroke-opacity: .72; stroke-width: 37; }
.rc-svg .glass { stroke: #c9eefa; stroke-opacity: .87; stroke-width: 34; }
.rc-svg .lumen { stroke: #f6fdff; stroke-opacity: .76; stroke-width: 25; }
.rc-svg .specular { stroke: #fff; stroke-opacity: .94; stroke-width: 2.8; }
.rc-svg .stream { stroke: #30bde8; stroke-width: 19; stroke-opacity: .65; }
.rc-svg .wave { stroke: #0ba5df; stroke-width: 12; stroke-opacity: .76; stroke-dasharray: 18 8 5 11; animation: rc-agua 1.15s linear infinite; }
.rc-svg .bubble { stroke: #e6fcff; stroke-width: 3; stroke-dasharray: 1 13 2 28; animation: rc-agua 1.15s linear infinite; transform: translate(0, -3px); }
@keyframes rc-agua { to { stroke-dashoffset: -42; } }
.rc-svg .current { transition: opacity .38s; }
.rc-svg .current.still { opacity: .16; }
.rc-svg .current.still .wave, .rc-svg .current.still .bubble { animation-play-state: paused; }
.rc-svg .handle { cursor: pointer; outline: none; }
.rc-svg .handle .halo { fill: transparent; transition: fill .3s; }
.rc-svg .handle:hover .halo, .rc-svg .handle:focus-visible .halo { fill: rgba(21,131,186,.10); }
.rc-svg .handle.destaque .halo { fill: rgba(14,165,233,.22); }
.rc-svg .handle.closed .halo { fill: rgba(225,29,72,.10); }
.rc-svg .wheel { transform-origin: 0 0; transition: transform .48s cubic-bezier(.25,.75,.27,1); }
.rc-svg .closed .wheel { transform: rotate(95deg); }
.rc-svg .gate { fill: #e7ac40; opacity: 0; transition: opacity .3s; }
.rc-svg .closed .gate { opacity: 1; }
.rc-svg .num { fill: #153b59; transition: fill .3s; }
.rc-svg .closed .num { fill: #b45309; }
.rc-svg .handle .exc { display: none; }
.rc-svg .handle.alerta .exc { display: inline; animation: rc-pisca 1.4s ease-in-out infinite; }
@keyframes rc-pisca { 50% { opacity: .45; } }
.rc-svg .etq { cursor: pointer; outline: none; }
.rc-svg .etq rect { fill: #f8fcff; stroke: #c7dce9; transition: fill .3s, stroke .3s; }
.rc-svg .etq:hover rect, .rc-svg .etq:focus-visible rect { stroke: #1583ba; stroke-width: 2; }
.rc-svg .etq.closed rect { fill: #fff6ef; stroke: #f0c9a6; }
.rc-svg .etq.alerta rect { fill: #fffaf0; stroke: #f0b84a; }
.rc-svg .etq-nome { fill: #173b56; font: 750 15px system-ui, -apple-system, "Segoe UI", sans-serif; }
.rc-svg .etq-sub { fill: #276952; font: 600 12.5px system-ui, -apple-system, "Segoe UI", sans-serif; }
.rc-svg .etq.closed .etq-sub { fill: #84511f; }
.rc-svg .etq.alerta .etq-sub { fill: #92400e; }
.rc-svg text { user-select: none; }
.rc-pe { padding: 0 22px 16px; }
.rc-pe-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-pe-cab > b { color: #3d637a; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.rc-pe-cab .espaco { flex: 1; }
.rc-pag { display: inline-flex; align-items: center; gap: 6px; }
.rc-pag select { max-width: 340px; }
.rc-sim { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 999px; background: #fff4ec; border: 1px solid #f4d3b7; color: #84511f; font-size: 12.5px; font-weight: 700; }
.rc-sim button { border: 0; border-radius: 999px; padding: 4px 10px; background: #84511f; color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.rc-controles { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 12px; }
.rc-ctl { display: grid; grid-template-columns: 29px minmax(0, 1fr) 38px; align-items: center; gap: 10px; padding: 12px 13px; min-height: 68px; border-radius: 13px; background: #fff; border: 1.3px solid #ccdeea; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.rc-ctl:hover, .rc-ctl:focus-visible { border-color: #1583ba; border-width: 2.3px; padding: 11px 12px; outline: none; }
.rc-ctl .n { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #eaf5fc; color: #165c83; font-weight: 800; font-size: 13px; }
.rc-ctl .t { display: grid; min-width: 0; }
.rc-ctl .t b { color: #173b56; font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ctl small { display: inline-flex; align-items: center; gap: 6px; color: #276952; font-size: 12px; font-weight: 600; }
.rc-ctl .lamp { width: 8px; height: 8px; border-radius: 50%; background: #188c69; }
.rc-ctl .tg { position: relative; width: 35px; height: 18px; border-radius: 999px; background: #188c69; transition: background .22s; }
.rc-ctl .tg i { position: absolute; top: 3px; left: 20px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .22s; }
.rc-ctl.closed small { color: #84511f; }
.rc-ctl.closed .lamp { background: #b87526; }
.rc-ctl.closed .tg { background: #8396a4; }
.rc-ctl.closed .tg i { left: 3px; }
.rc-ctl.alerta small { color: #92400e; }
.rc-ctl.alerta .lamp { background: #f59e0b; }
.rc-ctl.simulado { border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .rc-svg .wave, .rc-svg .bubble, .rc-svg .handle.alerta .exc { animation: none !important; } .rc-svg .wheel, .rc-svg .current { transition: none; } }
@media (max-width: 760px) { .rc-cab, .rc-pe { padding-left: 12px; padding-right: 12px; } .rc-marca b { font-size: 18px; } .rc-controles { grid-template-columns: 1fr 1fr; } .rc-pag select { max-width: 160px; } }
.rede-abas { display: inline-flex; padding: 3px; border-radius: 12px; background: #eef4f9; gap: 2px; }
.rede-abas a { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--s600, #475569); text-decoration: none; }
.rede-abas a.ativo { background: #fff; color: var(--azul-900); box-shadow: 0 1px 3px rgba(15,37,64,.14); }
@media (prefers-reduced-motion: reduce) { .rc-cano .onda, .rc-cano .bolha, .rc-reg .halo, .rc-tanque .nivel { animation: none !important; } }
@media (max-width: 760px) { .rc-barra { right: 14px; } }
.rede-vazio[hidden], .rc-sim[hidden], .rv-dica[hidden] { display: none !important; }

.rc-svg { cursor: grab; touch-action: none; }
.rc-svg.arrastando { cursor: grabbing; }
.rc-zoom { position: absolute; right: 18px; bottom: 14px; z-index: 2; display: grid; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(15,37,64,.14); border: 1px solid #d6e6f1; }
.rc-zoom button { width: 42px; height: 40px; border: 0; background: #fff; font-size: 20px; line-height: 1; color: #12334c; cursor: pointer; }
.rc-zoom button + button { border-top: 1px solid #e3eef6; }
.rc-zoom button:hover { background: #eef6fc; }
.rc-dica-zoom { position: absolute; left: 22px; bottom: 10px; z-index: 2; color: #7b91a3; font-size: 11.5px; pointer-events: none; }
/* painel dos registros numa linha só (rola para o lado): o desenho fica com a altura toda */
.rc-controles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rc-ctl { min-height: 58px; padding: 9px 12px; }
.rc-ctl:hover, .rc-ctl:focus-visible { padding: 8px 11px; }

/* Rede viva · Tela 2: fechar/abrir registro de verdade (justificativa vira ocorrência) */
.rc-janela { z-index: 120; }
.rc-janela .rc-ic { font-size: 18px; }
.rc-janela .rc-ic.fechar { background: #fff1f2; }
.rc-janela .rc-ic.abrir { background: #e0f2fe; }
.rc-info { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #f4f8fb; border: 1px solid #dde9f1; font-size: 13px; color: #33505f; line-height: 1.45; }
.rc-info span { color: #5b7584; }
.rc-chk { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: #33505f; cursor: pointer; }
.rc-erro { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; font-size: 13px; }
.rc-erro[hidden] { display: none !important; }
.bt.pri.perigo { background: #be123c; border-color: #be123c; }
.rc-modo.ativo { background: #fff4ec; border-color: #f4d3b7; color: #84511f; }
