/* ------------------------------------------------------------------
   Central FredianIA — mesmos tokens do site (app/globals.css)
   navy estrutura · signal blue direciona · electric acentua sobre navy
   ------------------------------------------------------------------ */
:root {
  --navy: #081838;
  --navy-2: #0c2148;
  --signal: #0848e8;
  --signal-hover: #073dc3;
  --electric: #135bff;
  --electric-hover: #0f4bd6;
  --ice: #f5f8ff;
  --cloud: #e8eef8;
  --slate: #53627a;
  --white: #ffffff;
  --tint: #7da0ff;
  --tint-2: #c7d1e3;
  --w72: rgba(255, 255, 255, 0.72);
  --w48: rgba(255, 255, 255, 0.48);
  --w16: rgba(255, 255, 255, 0.16);
  --w08: rgba(255, 255, 255, 0.08);
  --success: #0f8a5f;
  --warning: #9a5b00;
  --error: #b4232c;
  --gradient: linear-gradient(90deg, #081838 0%, #0848e8 57%, #135bff 100%);

  --font-sans: "Segoe UI", "Open Sans", system-ui, -apple-system, sans-serif;
  --font-mono: Consolas, Inconsolata, ui-monospace, "SF Mono", monospace;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --topo: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--ice);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

::selection {
  background: var(--signal);
  color: var(--white);
}

[hidden] {
  display: none !important;
}

.ic {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* ------------------------------------------------------------------ tipografia */
.eyebrow {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: var(--tint);
}

.mono {
  font-family: var(--font-mono);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h-panel {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--slate);
}

/* ------------------------------------------------------------------ controles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn--sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn--primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--white);
}

.btn--primary:hover:not(:disabled) {
  background: var(--signal-hover);
}

.btn--electric {
  background: var(--electric);
  border-color: var(--electric);
  color: var(--white);
}

.btn--electric:hover:not(:disabled) {
  background: var(--electric-hover);
}

.btn--ghost-dark {
  border-color: var(--w16);
  color: var(--white);
}

.btn--ghost-dark:hover:not(:disabled) {
  background: var(--w08);
}

.btn--ghost-light {
  border-color: var(--cloud);
  background: var(--white);
  color: var(--navy);
}

.btn--ghost-light:hover:not(:disabled) {
  border-color: var(--signal);
  background: var(--ice);
}

.btn--danger {
  border-color: rgba(180, 35, 44, 0.3);
  background: var(--white);
  color: var(--error);
}

.btn--danger:hover:not(:disabled) {
  border-color: var(--error);
}

.btn--ok {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.btn-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--w16);
  border-radius: 8px;
  background: none;
  color: var(--white);
}

.btn-icone:hover {
  background: var(--w08);
}

.btn-icone[aria-pressed="false"] {
  color: var(--w48);
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campo label,
.rotulo {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.entrada {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  transition: border-color var(--t-base) var(--ease);
}

.entrada:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(8, 72, 232, 0.12);
}

textarea.entrada {
  min-height: 140px;
  resize: vertical;
}

.entrada--dark {
  border-color: var(--w16);
  background: var(--w08);
  color: var(--white);
}

.entrada--dark::placeholder {
  color: var(--w48);
}

.entrada--dark:focus {
  border-color: var(--tint);
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--white);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag--fila { color: var(--slate); }
.tag--rodando { color: var(--signal); border-color: rgba(8, 72, 232, 0.3); }
.tag--rodando i { animation: pulso 1.2s var(--ease) infinite; }
.tag--aguardando { color: var(--warning); border-color: rgba(154, 91, 0, 0.35); background: #fff8ec; }
.tag--concluida { color: var(--success); border-color: rgba(15, 138, 95, 0.3); }
.tag--erro { color: var(--error); border-color: rgba(180, 35, 44, 0.3); }
.tag--cancelada,
.tag--interrompida { color: var(--slate); }

@keyframes pulso {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ------------------------------------------------------------------ login */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(19, 91, 255, 0.35), transparent 60%),
    var(--navy);
  color: var(--white);
}

.login__cartao {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login__marca {
  width: 190px;
  height: auto;
}

.login h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login p {
  margin: 0;
  color: var(--w72);
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login .campo label {
  color: var(--w72);
}

.login .rule-brand {
  height: 4px;
  border-radius: 4px;
}

.aviso-erro {
  min-height: 20px;
  font-size: 14px;
  color: #ffb4b9;
}

/* ------------------------------------------------------------------ estrutura */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
}

.topo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topo);
  padding: 0 20px;
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid var(--w16);
}

.topo__marca {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}

.topo__marca img {
  width: 132px;
  height: auto;
}

.topo__marca .mono-label {
  padding-left: 14px;
  border-left: 1px solid var(--w16);
  color: var(--tint);
}

.ocupacao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--w72);
}

.ocupacao b {
  color: var(--white);
  font-weight: 600;
}

.ocupacao i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--w48);
}

.ocupacao.ativa i {
  background: var(--electric);
  box-shadow: 0 0 10px var(--electric);
  animation: pulso 1.2s var(--ease) infinite;
}

.topo__usuario {
  font-size: 13px;
  color: var(--w72);
}

.rule-brand {
  flex: none;
  height: 4px;
  background: var(--gradient);
}

.grade {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
}

/* ------------------------------------------------------------------ painel de voz */
.voz {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(500px 360px at 50% 18%, rgba(19, 91, 255, 0.22), transparent 70%),
    var(--navy);
  color: var(--white);
}

.voz__topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.voz__nome {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.voz__estado {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--w72);
}

.voz__acoes {
  display: flex;
  gap: 8px;
}

.esfera {
  flex: none;
  display: block;
  width: 100%;
  height: clamp(170px, 28vh, 260px);
}

.ao-vivo {
  min-height: 24px;
  padding: 0 24px;
  text-align: center;
  font-size: 15px;
  color: var(--tint-2);
}

.conversa {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24px);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 8px 0 0;
  padding: 8px 20px 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--w16) transparent;
}

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg--voce {
  align-self: flex-end;
  background: var(--signal);
  border-bottom-right-radius: 4px;
}

.msg--assistente {
  align-self: flex-start;
  background: var(--w08);
  border: 1px solid var(--w16);
  border-bottom-left-radius: 4px;
}

.msg__tarefas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.msg__tarefa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--w16);
  border-radius: 8px;
  background: none;
  font-size: 12px;
  color: var(--tint);
}

.msg__tarefa:hover {
  background: var(--w08);
  color: var(--white);
}

.conversa__vazia {
  margin: auto 0;
  text-align: center;
  color: var(--w48);
  font-size: 14px;
}

.controle {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--w16);
  background: rgba(8, 24, 56, 0.6);
}

.btn-falar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--electric);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}

.btn-falar:hover {
  background: var(--electric-hover);
}

.btn-falar.ouvindo {
  background: var(--white);
  color: var(--navy);
  transform: scale(0.99);
}

.btn-falar kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.7;
}

.form-texto {
  display: flex;
  gap: 8px;
}

.form-texto .entrada {
  min-height: 40px;
}

/* ------------------------------------------------------------------ quadro */
.quadro {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.quadro__topo {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--cloud);
}

.quadro__titulo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quadro__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--cloud);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}

.filtro i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.filtro[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.colunas {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 24px 24px;
  overflow-x: auto;
}

.coluna {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 16px;
  background: var(--cloud);
}

.coluna--aguardando {
  background: #fdf1dc;
}

.coluna__topo {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}

.coluna__topo .rotulo {
  color: var(--navy);
}

.coluna__total {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 24px;
  text-align: center;
}

.coluna__lista {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 10px 12px;
}

.coluna__vazia {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--slate);
}

.cartao {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--cloud);
  border-left: 4px solid var(--cor, var(--electric));
  border-radius: 8px;
  background: var(--white);
  text-align: left;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.cartao:hover {
  border-color: var(--signal);
  border-left-color: var(--cor, var(--electric));
  box-shadow: 0 6px 18px rgba(8, 24, 56, 0.08);
}

.cartao__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agente {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cor, var(--electric));
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.cartao__titulo {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.cartao__linha {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cartao__pendencia {
  font-size: 13px;
  line-height: 18px;
  color: var(--warning);
}

/* ------------------------------------------------------------------ diálogos */
dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 24px 64px rgba(8, 24, 56, 0.35);
}

dialog::backdrop {
  background: rgba(8, 24, 56, 0.55);
}

.dlg {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}

.dlg__topo {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--cloud);
}

.dlg__topo .h-panel {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.dlg__corpo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
}

.dlg__rodape {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--cloud);
}

.fechar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--white);
}

.fechar:hover {
  border-color: var(--signal);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--slate);
}

.bloco {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.texto-longo {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--ice);
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.aprovacao {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(154, 91, 0, 0.35);
  border-radius: 8px;
  background: #fff8ec;
}

.aprovacao ul {
  margin: 0;
  padding-left: 18px;
}

.aprovacao code {
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.aprovacao__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.linha-tempo {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.linha-tempo li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--cloud);
}

.linha-tempo time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

.linha-tempo .ev-ferramenta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
  overflow-wrap: anywhere;
}

.linha-tempo .ev-texto {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.linha-tempo .ev-status {
  font-weight: 600;
}

.agentes-escolha {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.agente-opcao {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
}

.agente-opcao:has(input:checked) {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(8, 72, 232, 0.12);
}

.agente-opcao input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.agente-opcao strong {
  display: block;
  font-size: 14px;
}

.agente-opcao span {
  display: block;
  font-size: 12px;
  line-height: 17px;
  color: var(--slate);
}

.arquivos {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  overflow: hidden;
}

.arquivos li + li {
  border-top: 1px solid var(--cloud);
}

.arquivos button,
.arquivos a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--navy);
  text-decoration: none;
}

.arquivos button:hover,
.arquivos a:hover {
  background: var(--ice);
}

.arquivos small {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

.migalhas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.migalhas button {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--signal);
}

.visualizador {
  max-height: 50vh;
  overflow: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(8, 24, 56, 0.3);
}

/* ------------------------------------------------------------------ celular */
.abas {
  display: none;
}

@media (max-width: 1100px) {
  .colunas {
    grid-template-columns: repeat(4, minmax(240px, 280px));
  }
}

@media (max-width: 860px) {
  :root {
    --topo: 56px;
  }

  .topo {
    gap: 10px;
    padding: 0 12px;
  }

  .topo__marca img {
    width: 110px;
  }

  .topo__usuario,
  .topo__marca .mono-label {
    display: none;
  }

  .grade {
    display: block;
    position: relative;
  }

  .voz,
  .quadro {
    position: absolute;
    inset: 0;
  }

  .app[data-aba="voz"] .quadro,
  .app[data-aba="tarefas"] .voz {
    display: none;
  }

  .quadro__topo {
    padding: 16px 16px 12px;
    align-items: center;
  }

  .quadro__acoes {
    display: contents;
  }

  .filtros {
    order: 3;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filtro {
    flex: none;
  }

  .esfera {
    height: clamp(110px, 18vh, 160px);
  }

  .voz__topo {
    padding-top: 14px;
  }

  .colunas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 12px 24px;
    overflow-y: auto;
  }

  .coluna {
    flex: none;
  }

  .coluna__lista {
    overflow: visible;
  }

  .coluna--vazia {
    display: none;
  }

  .abas {
    flex: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--navy);
    border-top: 1px solid var(--w16);
  }

  .abas button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    border: 0;
    background: none;
    color: var(--w72);
    font-size: 14px;
    font-weight: 600;
  }

  .abas button[aria-selected="true"] {
    color: var(--white);
    box-shadow: inset 0 3px 0 var(--electric);
  }

  .abas .contador {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--warning);
    color: var(--white);
    font-size: 11px;
    line-height: 20px;
  }

  .agentes-escolha {
    grid-template-columns: 1fr;
  }

  .dlg__topo,
  .dlg__corpo,
  .dlg__rodape {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.grupo {
  margin: 0;
  padding: 0;
  border: 0;
}

.grupo legend {
  margin-bottom: 8px;
}

@media (hover: none) {
  .so-teclado {
    display: none;
  }
}

.filtro i {
  background: var(--cor, var(--electric));
}

.arquivos .ic {
  width: 18px;
  height: 18px;
  color: var(--signal);
}

.cartao__linha--erro {
  color: var(--error);
}

.entrada--mini {
  width: auto;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}

.conector {
  border: 1px solid var(--cloud);
  border-radius: 8px;
  background: var(--white);
}

.conector + .conector {
  margin-top: 8px;
}

.conector summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.conector__resumo {
  margin-left: auto;
  font-size: 12px;
  color: var(--slate);
}

.conector__ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.conector__ponto--ok {
  background: var(--success);
}

.conector__ferramentas {
  margin: 0;
  padding: 0 14px 12px;
  list-style: none;
}

.conector__ferramentas li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px dashed var(--cloud);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.vazio-conectores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--cloud);
  border-radius: 8px;
}

.vazio-conectores p {
  margin: 0;
}


/* troca entre as três versões do painel */
.versoes {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--w16);
  border-radius: 999px;
}

.versoes a {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: var(--w72);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}

.versoes a:hover {
  color: var(--white);
}

.versoes a[aria-current="page"] {
  background: var(--white);
  color: var(--navy);
}

@media (max-width: 860px) {
  .versoes {
    display: none;
  }
}

/* ------------------------------------------------------------------ WhatsApp */
.wa-padrao {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.wa-chave {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wa-chave input {
  width: 18px;
  height: 18px;
  accent-color: var(--signal);
}

.wa-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--cloud);
  border-radius: 8px;
  max-height: 44vh;
  overflow-y: auto;
}

.wa-lista li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.wa-lista li + li {
  border-top: 1px solid var(--cloud);
}

.wa-nome {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
}

.wa-nome strong,
.wa-nome span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-nome strong {
  font-size: 14px;
}

.wa-nome span {
  font-size: 12px;
  color: var(--slate);
}

.wa-lista .tag {
  flex: none;
}

.wa-lista li.wa-fechada .wa-nome {
  opacity: 0.55;
}
