/* neWave . mock funcional da tela de atendimento do Fluctus
   Usado so no fluctus.html (#por-dentro), junto com js/mock-fluctus.js.
   Moldura de monitor + app desenhado em 1280x720 e escalado pelo JS.
   Abaixo de 760px vira o layout mobile do app (um painel por vez).
   Tokens de cor tirados do tema real do Fluctus (claro e escuro).
   Sem JS, a tela mostra o print assets/telas/fluctus-atendimento.webp. */

/* ---------- Moldura: monitor ---------- */

.mfx-monitor {
  width: 100%;
  margin: 0 auto;
  max-width: 1120px;
  --mfx-bezel: #1d2327;
  --mfx-pe-a: #d5dadd;
  --mfx-pe-b: #b3babf;
}

.mfx-bezel {
  background: var(--mfx-bezel);
  padding: 11px 11px 15px;
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(15, 35, 40, .08), 0 34px 60px -26px rgba(15, 35, 40, .45);
}

.mfx-tela {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: #f6f7f9;
}

.mfx-tela > .mfx-print {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.mfx-montado > .mfx-print { display: none; }

.mfx-pe {
  display: block;
  width: 16%;
  height: 46px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--mfx-pe-b), var(--mfx-pe-a) 45%);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.mfx-base {
  display: block;
  width: 30%;
  height: 7px;
  margin: 0 auto;
  border-radius: 2px 2px 10px 10px;
  background: var(--mfx-pe-b);
  box-shadow: 0 10px 18px -8px rgba(15, 35, 40, .35);
}

.mfx-legenda {
  margin: 20px auto 0;
  max-width: 46rem;
  text-align: center;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-suave);
}

@media (prefers-color-scheme: dark) {
  .mfx-monitor {
    --mfx-bezel: #20282c;
    --mfx-pe-a: #3a454b;
    --mfx-pe-b: #2a3338;
  }
  .mfx-bezel { box-shadow: inset 0 0 0 1px rgba(233, 247, 234, .08), 0 34px 60px -24px rgba(0, 0, 0, .6); }
  .mfx-tela { background: #0c1d25; }
}

/* Celular: moldura de aparelho, sem pe. Com JS a altura ja nasce reservada
   para o layout mobile do app, e o print fica recortado no canto da lista. */
@media (max-width: 759px) {
  .mfx-monitor { max-width: 420px; }
  .mfx-bezel { padding: 8px; border-radius: 30px; }
  .mfx-tela { border-radius: 23px; }
  .mfx-pe, .mfx-base { display: none; }
}

@media (max-width: 759px) and (scripting: enabled) {
  .mfx-tela { aspect-ratio: auto; height: min(640px, calc(100svh - 110px)); min-height: 520px; }
}

/* ---------- App: tokens ---------- */

.mfx {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --tx: #1c2126;
  --tx2: #5b6570;
  --div: #e3e8ee;
  --pri: #16a062;
  --pri-d: #128a54;
  --pri-l: #e3f5ec;
  --sec: #16333c;
  --sec-tx: #ffffff;
  --sec-l: #e7edf1;
  --hover: rgba(28, 33, 38, .05);
  --out: #e3f5ec;
  --out-tx: #1c2126;
  --in: #e7edf1;
  --caixa: #f0f2f5;
  --faixa: #eef1f4;
  --err: #e53935;
  --tick: #5dc5f5;
  --sombra: 0 1px 1.5px rgba(16, 24, 32, .13);
  --pop: 0 10px 30px -8px rgba(16, 24, 32, .3), 0 0 0 1px rgba(16, 24, 32, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  .mfx:not([data-tema="claro"]) {
    --bg: #0c1d25;
    --paper: #142933;
    --tx: #e8ecef;
    --tx2: #9aa5ae;
    --div: #1e3945;
    --pri-l: #1b3d33;
    --sec: #8fb3c2;
    --sec-tx: #0c1d25;
    --sec-l: #24424f;
    --hover: rgba(232, 236, 239, .06);
    --out: #128a54;
    --out-tx: #ffffff;
    --in: #0e2027;
    --caixa: #0e2027;
    --faixa: #10242d;
    --sombra: 0 1px 1.5px rgba(0, 0, 0, .35);
    --pop: 0 12px 34px -8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(232, 236, 239, .08);
    color-scheme: dark;
  }
}

.mfx[data-tema="escuro"] {
  --bg: #0c1d25;
  --paper: #142933;
  --tx: #e8ecef;
  --tx2: #9aa5ae;
  --div: #1e3945;
  --pri-l: #1b3d33;
  --sec: #8fb3c2;
  --sec-tx: #0c1d25;
  --sec-l: #24424f;
  --hover: rgba(232, 236, 239, .06);
  --out: #128a54;
  --out-tx: #ffffff;
  --in: #0e2027;
  --caixa: #0e2027;
  --faixa: #10242d;
  --sombra: 0 1px 1.5px rgba(0, 0, 0, .35);
  --pop: 0 12px 34px -8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(232, 236, 239, .08);
  color-scheme: dark;
}

/* ---------- App: estrutura desktop (1280x720, escalado) ---------- */

.mfx {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: "topo topo" "trilho corpo";
  background: var(--bg);
  color: var(--tx);
  font-family: "Inter", "Open Sans", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.mfx *, .mfx *::before, .mfx *::after { box-sizing: border-box; }
/* :where zera a especificidade: os componentes abaixo precisam vencer o reset */
:where(.mfx) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  letter-spacing: inherit;
}
.mfx button:focus-visible, .mfx input:focus-visible {
  outline: 2px solid var(--pri);
  outline-offset: 1px;
}
:where(.mfx) .mfx-ic { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
.mfx-oculto { display: none !important; }

/* barra superior */
.mfx-topo {
  grid-area: topo;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px 0 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--div);
  color: var(--tx2);
}
.mfx-tb { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; position: relative; }
button.mfx-tb:hover { background: var(--hover); }
.mfx-flex { flex: 1; }
.mfx-buscar {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 10px; margin: 0 6px;
  border: 1px solid var(--div); border-radius: 999px;
  color: var(--tx2); font-size: 13px;
}
.mfx-buscar svg.mfx-ic { width: 18px; height: 18px; }
.mfx-buscar kbd {
  font: 600 10px/1 inherit; font-family: inherit;
  padding: 3px 5px; border: 1px solid var(--div); border-radius: 5px;
}
.mfx-sino b {
  position: absolute; top: 2px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--pri); color: #fff;
  font-size: 9.5px; line-height: 16px; text-align: center;
}
.mfx-user { display: flex; align-items: center; gap: 10px; margin-left: 10px; color: var(--tx); }
.mfx-user strong { display: block; font-size: 13px; font-weight: 600; }
.mfx-user small { display: block; font-size: 11px; font-weight: 600; color: var(--tx); }
.mfx-av-user {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #c2c7cc; color: #5b6570; font-size: 15px; font-weight: 500;
}
.mfx-marca-m { display: none; }

/* trilho de icones */
.mfx-trilho {
  grid-area: trilho;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding-top: 10px;
  background: var(--paper);
  border-right: 1px solid var(--div);
  color: var(--tx2);
}
.mfx-trilho .mfx-logo { width: 40px; height: 34px; margin-bottom: 10px; }
.mfx-trilho span { width: 100%; height: 44px; display: grid; place-items: center; }
.mfx-trilho .mfx-ativo { background: var(--pri-l); color: var(--pri); }

.mfx-corpo {
  grid-area: corpo;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 330px;
  min-height: 0;
}
.mfx-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* ---------- Coluna da lista ---------- */

.mfx-lista { background: var(--paper); border-right: 1px solid var(--div); }
.mfx-lcab { display: flex; align-items: center; gap: 2px; padding: 12px 10px 8px 12px; }
.mfx-procurar {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--pri); border-radius: 20px;
  box-shadow: 0 1px 4px rgba(22, 160, 98, .18);
  color: var(--tx2);
}
.mfx-procurar input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: 13px; color: var(--tx); padding: 0;
}
.mfx-procurar input::placeholder { color: var(--tx2); opacity: 1; }
.mfx-procurar input::-webkit-search-cancel-button { display: none; }
.mfx-ib {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; color: var(--pri);
}
.mfx-ib:hover { background: var(--hover); }

.mfx-pilulas { display: flex; gap: 8px; padding: 2px 12px 10px; }
.mfx-pil {
  flex: 1; height: 28px; border-radius: 999px;
  background: var(--sec-l); color: var(--tx); font-weight: 500; font-size: 12.5px;
}
.mfx-pil[aria-pressed="true"] { background: var(--sec); color: var(--sec-tx); }

.mfx-lcorpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; position: relative; scrollbar-width: thin; }

.mfx-secao {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 34px; padding: 0 14px 0 10px;
  background: var(--faixa);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tx);
}
.mfx-secao .mfx-ic { width: 16px; height: 16px; }
.mfx-secao .mfx-seta { transition: transform .15s; color: var(--tx2); }
.mfx-secao[aria-expanded="false"] .mfx-seta { transform: rotate(-90deg); }
.mfx-secao em { margin-left: auto; font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--tx2); }

.mfx-chips { display: flex; gap: 5px; padding: 0 8px 8px; background: var(--faixa); }
.mfx-chip {
  flex: 1; display: flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 4px 0 7px; border-radius: 999px;
  background: var(--paper); color: var(--tx2); font-size: 11.5px; white-space: nowrap;
}
.mfx-chip .mfx-ic { width: 13px; height: 13px; }
.mfx-chip b {
  margin-left: auto; min-width: 18px; height: 16px; border-radius: 999px;
  background: var(--sec-l); color: var(--tx); font-size: 9.5px; line-height: 16px; text-align: center;
}
.mfx-chip[aria-pressed="true"] { background: var(--sec); color: var(--sec-tx); }
.mfx-chip[aria-pressed="true"] b { background: rgba(255, 255, 255, .22); color: inherit; }

.mfx-linha {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; height: 62px; padding: 0 6px 0 10px;
  border-left: 4px solid transparent;
  text-align: left;
}
.mfx-linha:hover { background: var(--hover); }
.mfx-linha[aria-current="true"] { border-left-color: var(--sec); background: var(--hover); }
.mfx-av {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
}
.mfx-av .mfx-ic { width: 22px; height: 22px; }
.mfx-lt { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; column-gap: 6px; align-items: center; }
.mfx-lt strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.mfx-lt strong span { overflow: hidden; text-overflow: ellipsis; }
.mfx-lt strong .mfx-ic { width: 14px; height: 14px; color: var(--tx2); }
.mfx-lt time { font-size: 11px; color: var(--tx2); }
.mfx-lt p { margin: 0; font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfx-lt p.mfx-fim { color: var(--err); }
.mfx-lado { display: flex; align-items: center; gap: 2px; justify-self: end; }
.mfx-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--sec); color: var(--sec-tx); font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}
.mfx-mais { width: 20px; display: grid; place-items: center; color: var(--tx); }
.mfx-mais .mfx-ic { width: 18px; height: 18px; }
.mfx-assumir {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--pri); color: #fff !important; font-size: 11.5px; font-weight: 600;
}
.mfx-assumir:hover { background: var(--pri-d); }

.mfx-vazio { padding: 40px 24px; text-align: center; color: var(--tx2); }
.mfx-vazio .mfx-ic { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .5; }
.mfx-vazio strong { display: block; color: var(--tx); font-size: 14px; margin-bottom: 4px; }
.mfx-vazio p { margin: 0; font-size: 12.5px; }

.mfx-abas { display: flex; height: 58px; border-top: 1px solid var(--div); flex: none; }
.mfx-aba {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--tx2); font-size: 11.5px;
}
.mfx-aba .mfx-ic { width: 19px; height: 19px; }
.mfx-aba[aria-current="true"] { color: var(--tx); font-weight: 600; }
.mfx-aba[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sec);
}
.mfx-aba b {
  position: absolute; top: 5px; left: calc(50% + 6px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--sec); color: var(--sec-tx); font-size: 9.5px; line-height: 16px; text-align: center;
}

/* dica de primeira interacao */
.mfx-dica {
  position: absolute; left: 62px; bottom: 3px;
  z-index: 3; pointer-events: none;
  padding: 5px 10px; border-radius: 8px;
  background: var(--pri); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(22, 160, 98, .7);
}
.mfx-dica::before {
  content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px;
  border: 5px solid transparent; border-left: 0; border-right-color: var(--pri);
}
.mfx-pulso {
  position: absolute; left: 10px; top: 11px; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--pri); pointer-events: none;
  animation: mfx-pulso 1.6s ease-out infinite;
}
@keyframes mfx-pulso {
  0% { box-shadow: 0 0 0 0 rgba(22, 160, 98, .75); }
  100% { box-shadow: 0 0 0 14px rgba(22, 160, 98, 0); }
}

/* ---------- Coluna do chat ---------- */

.mfx-chat { background: var(--bg); }
.mfx-ccab {
  position: relative; flex: none;
  display: flex; gap: 12px; align-items: flex-start;
  min-height: 96px; padding: 12px 14px 8px 12px;
  background: var(--paper); border-bottom: 1px solid var(--div);
}
.mfx-ccab .mfx-av { width: 50px; height: 50px; }
.mfx-ccab .mfx-av .mfx-ic { width: 28px; height: 28px; }
.mfx-cinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mfx-rota { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* o nome encolhe com reticencias; as pilulas de rota ficam inteiras */
.mfx-rota strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 48px; }
.mfx-rp {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  height: 20px; padding: 0 6px; border-radius: 999px;
  border: 1px solid rgba(22, 160, 98, .45); background: var(--pri-l);
  font-size: 10px; color: var(--tx); white-space: nowrap;
}
.mfx-rp .mfx-ic { width: 12px; height: 12px; color: var(--tx2); }
.mfx-rp .mfx-ic.mfx-verde { color: var(--pri); }
.mfx-rota > .mfx-ic { width: 14px; height: 14px; color: var(--tx2); }
.mfx-prot {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  height: 22px; padding: 0 6px; border-radius: 6px; background: var(--caixa);
  font-size: 11px; color: var(--tx2);
}
.mfx-prot b { color: var(--tx); font-weight: 700; }
.mfx-prot button { display: grid; place-items: center; color: var(--tx2); }
.mfx-prot .mfx-ic { width: 13px; height: 13px; }
.mfx-tags { display: flex; gap: 6px; align-items: center; }
.mfx-tag {
  height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; display: inline-flex; align-items: center;
  background: var(--sec-l); color: var(--tx);
}
.mfx-tag-add { border: 1px dashed var(--pri); background: none; color: var(--pri); }
.mfx-cacoes { display: flex; align-items: center; gap: 6px; flex: none; }
.mfx-bacoes {
  display: flex; align-items: center; gap: 2px;
  height: 28px; padding: 0 6px 0 10px; border-radius: 10px;
  border: 1px solid var(--div); font-size: 11px; color: var(--tx);
}
.mfx-bacoes .mfx-ic { width: 16px; height: 16px; }
.mfx-bacoes[aria-expanded="true"] { border-color: var(--pri); }
.mfx-voltar, .mfx-binfo { display: none; }

.mfx-menu {
  position: absolute; z-index: 5;
  min-width: 232px; padding: 6px;
  background: var(--paper); border-radius: 10px; box-shadow: var(--pop);
}
.mfx-menu-acoes { top: 46px; right: 14px; }
.mfx-mi {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 8px; border-radius: 6px; font-size: 12.5px; text-align: left;
}
.mfx-mi:hover, .mfx-mi:focus-visible { background: var(--hover); }
.mfx-bola {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
}
.mfx-bola .mfx-ic { width: 15px; height: 15px; }
.mfx-mi-sep { height: 1px; margin: 5px 4px; background: var(--div); }
.mfx-mi-err { color: var(--err); }

.mfx-msgs {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 18px 10px; scrollbar-width: thin;
  display: flex; flex-direction: column;
}
.mfx-carregar {
  align-self: center; display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 16px; margin-bottom: 6px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--div); color: var(--tx2); font-size: 12px;
}
.mfx-carregar .mfx-ic { width: 16px; height: 16px; }
.mfx-dia {
  align-self: center; margin: 10px 0 4px; padding: 3px 12px; border-radius: 8px;
  background: var(--paper); box-shadow: var(--sombra); font-size: 11px; color: var(--tx2);
}
.mfx-meta { font-size: 11px; color: var(--tx2); margin: 10px 2px 3px; }
.mfx-meta b { font-weight: 600; }
.mfx-m-a { align-self: flex-end; text-align: right; }
.mfx-m-c { align-self: flex-start; }
.mfx-balao {
  position: relative; max-width: 70%;
  padding: 5px 10px 6px; border-radius: 10px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: var(--sombra);
}
.mfx-balao.mfx-m-c { background: var(--in); color: var(--tx); }
.mfx-balao.mfx-m-a { background: var(--out); color: var(--out-tx); text-align: left; padding-right: 34px; }
.mfx-balao.mfx-rabo.mfx-m-c { border-top-left-radius: 0; }
.mfx-balao.mfx-rabo.mfx-m-a { border-top-right-radius: 0; }
.mfx-balao.mfx-rabo.mfx-m-c::before, .mfx-balao.mfx-rabo.mfx-m-a::before {
  content: ""; position: absolute; top: 0; width: 8px; height: 10px;
}
.mfx-balao.mfx-rabo.mfx-m-c::before { left: -7px; background: var(--in); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.mfx-balao.mfx-rabo.mfx-m-a::before { right: -7px; background: var(--out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.mfx-tick { position: absolute; right: 7px; bottom: 5px; color: #8a949d; }
.mfx-tick .mfx-ic { width: 15px; height: 15px; }
.mfx-tick.mfx-lido { color: var(--tick); }
.mfx[data-tema="escuro"] .mfx-tick:not(.mfx-lido) { color: rgba(255, 255, 255, .6); }
@media (prefers-color-scheme: dark) {
  .mfx:not([data-tema="claro"]) .mfx-tick:not(.mfx-lido) { color: rgba(255, 255, 255, .6); }
}
.mfx-sis {
  align-self: center; margin: 10px 0 2px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--div); background: var(--paper); font-size: 11.5px; color: var(--tx2);
}
.mfx-digitando {
  align-self: flex-start; display: flex; gap: 4px; align-items: center;
  margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--in); box-shadow: var(--sombra);
}
.mfx-digitando i { width: 6px; height: 6px; border-radius: 50%; background: var(--tx2); animation: mfx-pula 1s infinite; }
.mfx-digitando i:nth-child(2) { animation-delay: .15s; }
.mfx-digitando i:nth-child(3) { animation-delay: .3s; }
.mfx-digitando span { font-size: 11px; color: var(--tx2); margin-left: 4px; }
@keyframes mfx-pula { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.mfx-resumo {
  align-self: center; width: min(36rem, 92%); margin: 14px 0 4px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--div); background: var(--paper);
}
.mfx-resumo header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mfx-resumo header strong { font-size: 13px; }
.mfx-brilho { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pri-l); color: var(--pri); }
.mfx-brilho .mfx-ic { width: 15px; height: 15px; }
.mfx-gerado {
  height: 18px; padding: 0 8px; border-radius: 999px; background: var(--pri); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 18px;
}
.mfx-resumo header button { margin-left: auto; color: var(--tx2); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.mfx-resumo header button:hover { background: var(--hover); }
.mfx-resumo header .mfx-ic { width: 15px; height: 15px; }
.mfx-resumo p { margin: 0; font-size: 12.6px; line-height: 1.55; color: var(--tx2); }

/* compositor */
.mfx-comp {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 4px;
  min-height: 62px; padding: 10px 12px 10px 8px;
  background: var(--paper); border-top: 1px solid var(--div);
}
.mfx-cb { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--pri); flex: none; }
.mfx-cb:hover, .mfx-cb[aria-expanded="true"] { background: var(--hover); }
.mfx-cb .mfx-ic { width: 21px; height: 21px; }
.mfx-ta {
  flex: 1; min-width: 0; height: 42px; max-height: 84px; resize: none;
  padding: 10px 14px; border-radius: 22px; border: 1px solid var(--div);
  background: var(--paper); color: var(--tx); font: inherit; font-size: 13.5px; line-height: 20px;
  outline: 0; overflow-y: auto; scrollbar-width: none;
}
.mfx .mfx-ta:focus { border-color: var(--pri); outline: none; box-shadow: none; }
.mfx-ta::placeholder { color: var(--tx2); opacity: .9; }
.mfx-ta:disabled { background: var(--caixa); }
.mfx-reverter {
  flex: none; height: 28px; padding: 0 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
  color: var(--pri); font-size: 12px; font-weight: 600;
}
.mfx-reverter:hover { background: var(--hover); }
.mfx-reverter .mfx-ic { width: 15px; height: 15px; }
.mfx-bia { color: #fff; background: var(--pri); }
.mfx-bia:hover, .mfx-bia[aria-expanded="true"] { background: var(--pri-d); }
.mfx-bia .mfx-ic { width: 19px; height: 19px; }
.mfx-comp-fila, .mfx-comp-fim {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 12.5px; color: var(--tx2);
}
.mfx-comp-fila .mfx-assumir { height: 30px; padding: 0 16px; font-size: 12.5px; }
.mfx-menu-ia { bottom: 58px; right: 12px; min-width: 250px; }
.mfx-menu-ia header { padding: 6px 8px 4px; }
.mfx-menu-ia header strong { display: block; font-size: 12.5px; }
.mfx-menu-ia header small { display: block; font-size: 11px; color: var(--tx2); }
.mfx-menu-ia .mfx-mi .mfx-ic { width: 17px; height: 17px; color: var(--pri); }
.mfx-emojis {
  bottom: 58px; left: 8px; min-width: 0;
  display: grid; grid-template-columns: repeat(6, 34px); gap: 2px;
}
.mfx-emojis button { height: 34px; border-radius: 6px; font-size: 19px; line-height: 34px; text-align: center; }
.mfx-emojis button:hover { background: var(--hover); }

/* ---------- Painel direito ---------- */

.mfx-painel { background: var(--paper); border-left: 1px solid var(--div); }
.mfx-pvolta { display: none; }
.mfx-tiles {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px;
  padding: 10px 8px; border-bottom: 1px solid var(--div); flex: none;
}
.mfx-tile {
  position: relative; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--div); border-radius: 8px;
  font-size: 9px; color: var(--tx2); white-space: nowrap; overflow: hidden;
}
.mfx-tile .mfx-ic { width: 17px; height: 17px; }
.mfx-tile:hover { background: var(--hover); }
.mfx-tile b {
  position: absolute; top: 3px; right: 4px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px;
  font-size: 8.5px; line-height: 14px; color: #fff; text-align: center;
}
.mfx-pcorpo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px; scrollbar-width: thin; }

.mfx-card {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 8px; border: 1px solid var(--div); background: var(--bg);
}
.mfx-card .mfx-bola { width: 38px; height: 38px; background: var(--sec-l); color: var(--tx); }
.mfx-card .mfx-bola .mfx-ic { width: 19px; height: 19px; }
.mfx-card strong { display: block; font-size: 15px; margin-bottom: 5px; }
.mfx-status { display: flex; flex-wrap: wrap; gap: 5px; }
.mfx-st {
  height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10.5px; line-height: 20px; font-weight: 500;
  background: var(--sec-l); color: var(--tx);
}
.mfx-st-ok { background: var(--pri); color: #fff; }
.mfx-st-fim { background: var(--err); color: #fff; }
.mfx-st-fila { background: #ff9800; color: #fff; }

.mfx-campos { margin-top: 10px; border: 1px solid var(--div); border-radius: 8px; padding: 4px 0; }
.mfx-campo { display: flex; gap: 12px; align-items: center; padding: 7px 12px; }
.mfx-campo .mfx-bola { width: 34px; height: 34px; }
.mfx-campo .mfx-bola .mfx-ic { width: 17px; height: 17px; }
.mfx-campo div { min-width: 0; }
.mfx-campo small { display: block; font-size: 10.5px; font-weight: 600; color: var(--tx); }
.mfx-campo span { display: block; font-size: 13px; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfx-campo span.mfx-nada { color: var(--tx2); }
/* as regras "span" acima e em .mfx-linha-res pegavam tambem o circulo do icone e tiravam o grid que o centraliza */
.mfx-campo .mfx-bola, .mfx-linha-res .mfx-bola { display: grid; }
.mfx-agente {
  display: inline-flex !important; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px 0 2px; border-radius: 999px; background: var(--sec); color: var(--sec-tx) !important; font-size: 12px !important;
}
.mfx-agente i {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--pri); font-style: normal; font-size: 8.5px; background: rgba(255, 255, 255, .15);
}
.mfx-linha-res {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 8px 10px 12px; text-align: left;
}
.mfx-linha-res div { flex: 1; min-width: 0; }
.mfx-linha-res small { display: block; font-size: 10.5px; font-weight: 600; }
.mfx-linha-res span { display: block; font-size: 13px; }
.mfx-linha-res > .mfx-ic { color: var(--tx2); width: 18px; height: 18px; }
.mfx-linha-res .mfx-seta { transition: transform .15s; }
.mfx-linha-res[aria-expanded="true"] .mfx-seta { transform: rotate(180deg); }
.mfx-rec { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--tx2); }
.mfx-rec:hover { background: var(--hover); }
.mfx-etapas { margin: 0 12px 8px 58px; padding: 0; list-style: none; font-size: 12px; color: var(--tx2); }
.mfx-etapas li { padding: 4px 0 4px 12px; border-left: 2px solid var(--div); }
.mfx-etapas time { color: var(--tx); font-weight: 600; margin-right: 6px; }

.mfx-ptit { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; font-size: 13px; font-weight: 700; }
.mfx-texto { font-size: 12.5px; color: var(--tx2); margin: 8px 2px 0; line-height: 1.5; }
.mfx-fchips { display: flex; gap: 6px; margin-bottom: 10px; }
.mfx-fchips span {
  height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11px; line-height: 22px;
  border: 1px solid var(--div); color: var(--tx2);
}
.mfx-fchips span.mfx-on { background: var(--sec); color: var(--sec-tx); border-color: var(--sec); }
.mfx-opo { padding: 12px; border-radius: 8px; border: 1px solid var(--div); border-left: 3px solid #8e24aa; }
.mfx-opo strong { display: block; font-size: 13.5px; }
.mfx-opo .mfx-valor { display: block; font-size: 16px; font-weight: 700; margin: 4px 0 6px; }
.mfx-opo .mfx-funil { display: flex; gap: 3px; margin-top: 8px; }
.mfx-opo .mfx-funil i { flex: 1; height: 4px; border-radius: 2px; background: var(--div); }
.mfx-opo .mfx-funil i.mfx-on { background: #8e24aa; }
.mfx-opo small { font-size: 11.5px; color: var(--tx2); }
.mfx-bt {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pri); color: var(--pri); font-size: 12px; font-weight: 600;
}
.mfx-bt:hover { background: var(--pri-l); }
.mfx-bt .mfx-ic { width: 16px; height: 16px; }
.mfx-lista-p { list-style: none; margin: 0; padding: 0; }
.mfx-lista-p li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--div); font-size: 12.5px; }
.mfx-lista-p li span { color: var(--tx2); }
.mfx-lista-p li b { font-weight: 600; text-align: right; }
.mfx-nota { padding: 10px 12px; border-radius: 8px; background: #fff8e1; color: #3e3a2a; font-size: 12.5px; }
.mfx[data-tema="escuro"] .mfx-nota { background: #3a3526; color: #efe6c8; }
@media (prefers-color-scheme: dark) {
  .mfx:not([data-tema="claro"]) .mfx-nota { background: #3a3526; color: #efe6c8; }
}
.mfx-nota small { display: block; margin-top: 6px; opacity: .7; font-size: 11px; }
.mfx-acao-l {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border-radius: 8px; font-size: 12.5px; text-align: left;
}
.mfx-acao-l:hover { background: var(--hover); }

/* toast */
.mfx-toast {
  position: absolute; left: 50%; bottom: 78px; z-index: 9;
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  max-width: 80%; padding: 8px 16px; border-radius: 8px;
  background: #1c2126; color: #fff; font-size: 12.5px; text-align: center;
  transition: opacity .2s, transform .2s;
}
.mfx-toast.mfx-on { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Feedback de toque (lote C)

   Botoes de icone (so o icone, sem rotulo): reduzem levemente ao toque.
   .mfx-rec entrou aqui em vez das linhas de lista porque e um botao redondo
   de icone unico (recarregar), igual aos outros desta lista, nao uma linha
   com rotulo. .mfx-bia ja usa a classe .mfx-cb, entao fica coberto de graca.
   -------------------------------------------------------------------------- */
.mfx-tb, .mfx-ib, .mfx-cb, .mfx-mais, .mfx-rec, .mfx-prot button,
.mfx-voltar, .mfx-binfo, .mfx-pvolta button, .mfx-resumo header button {
  transition: scale var(--dur-toque) var(--ease-out);
}
.mfx-tb:active, .mfx-ib:active, .mfx-cb:active, .mfx-mais:active, .mfx-rec:active,
.mfx-prot button:active, .mfx-voltar:active, .mfx-binfo:active, .mfx-pvolta button:active,
.mfx-resumo header button:active {
  scale: .96;
}

/* Botoes e linhas de lista: o :active repete o mesmo fundo do :hover, para
   o toque ter a mesma resposta visual que o mouse ja tem. .mfx-assumir e um
   botao de acao cheio (fundo solido em repouso) e ganha tambem o scale; os
   demais so tem borda ou fundo transparente em repouso, sem o scale. */
.mfx-mi:active, .mfx-acao-l:active, .mfx-tile:active { background: var(--hover); }
.mfx-bt:active { background: var(--pri-l); }
.mfx-assumir:active {
  background: var(--pri-d);
  scale: .97;
  transition: scale var(--dur-toque) var(--ease-out);
}

/* --------------------------------------------------------------------------
   Entrada dos menus do mock (lote C): so a chegada anima, a saida continua
   instantanea (o JS so troca .mfx-oculto ou remonta o innerHTML, sem mudar
   isso). Cada menu nasce a partir do canto mais proximo do botao que o abre:
   .mfx-menu-acoes fica abaixo e a direita do .mfx-bacoes (no cabecalho do
   chat), .mfx-menu-ia e .mfx-emojis ficam acima do compositor, a direita
   (.mfx-bia) e a esquerda (botao de emoji) dele.
   -------------------------------------------------------------------------- */
.mfx-menu {
  transition: opacity var(--dur-rapida) var(--ease-out), scale var(--dur-rapida) var(--ease-out);
}
@starting-style {
  .mfx-menu { opacity: 0; scale: .96; }
}
.mfx-menu-acoes { transform-origin: top right; }
.mfx-menu-ia { transform-origin: bottom right; }
.mfx-emojis { transform-origin: bottom left; }

@media (prefers-reduced-motion: reduce) {
  .mfx-menu { transition: opacity var(--dur-rapida) ease; }
  @starting-style {
    .mfx-menu { opacity: 0; scale: 1; }
  }
}

/* ---------- Layout mobile (um painel por vez) ---------- */

.mfx.mfx-m {
  position: absolute; inset: 0; width: auto; height: auto; transform: none;
  grid-template-columns: 1fr;
  grid-template-rows: 52px minmax(0, 1fr);
  grid-template-areas: "topo" "corpo";
}
.mfx-m .mfx-trilho, .mfx-m .mfx-so-d { display: none; }
.mfx-m .mfx-topo { padding: 0 10px 0 4px; gap: 2px; }
.mfx-m .mfx-marca-m { display: block; margin-left: 4px; }
.mfx-m .mfx-marca-m .mfx-logo { width: 34px; height: 30px; }
.mfx-m .mfx-user { margin-left: 4px; }
.mfx-m .mfx-av-user { width: 32px; height: 32px; font-size: 13px; }
.mfx-m .mfx-corpo { grid-template-columns: minmax(0, 1fr); }
.mfx-m .mfx-col { display: none; border: 0; }
.mfx-m[data-vista="lista"] .mfx-lista,
.mfx-m[data-vista="chat"] .mfx-chat,
.mfx-m[data-vista="painel"] .mfx-painel { display: flex; }
.mfx-m .mfx-ccab { min-height: 0; padding: 8px 8px 8px 4px; gap: 6px; align-items: center; }
.mfx-m .mfx-ccab .mfx-av { width: 38px; height: 38px; }
.mfx-m .mfx-ccab .mfx-av .mfx-ic { width: 22px; height: 22px; }
.mfx-m .mfx-rota .mfx-rp, .mfx-m .mfx-rota > .mfx-ic, .mfx-m .mfx-tags, .mfx-m .mfx-cacoes .mfx-busca-c { display: none; }
.mfx-m .mfx-cinfo { gap: 3px; }
.mfx-m .mfx-rota strong { max-width: 100%; }
.mfx-m .mfx-prot { max-width: 100%; overflow: hidden; white-space: nowrap; font-size: 10.5px; }
.mfx-m .mfx-prot button { display: none; }
.mfx-m .mfx-bacoes { padding: 0 4px 0 8px; }
.mfx-m .mfx-voltar, .mfx-m .mfx-binfo {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--tx2); flex: none;
}
.mfx-m .mfx-menu-acoes { top: 52px; right: 8px; }
.mfx-m .mfx-msgs { padding: 8px 10px; }
.mfx-m .mfx-balao { max-width: 84%; }
.mfx-m .mfx-comp { padding: 8px 6px; gap: 2px; }
.mfx-m .mfx-comp .mfx-cb-extra { display: none; }
.mfx-m .mfx-ta { font-size: 16px; }
.mfx-m .mfx-pvolta {
  display: flex; align-items: center; gap: 6px; flex: none;
  height: 46px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--div); font-weight: 600;
}
.mfx-m .mfx-pvolta button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--tx2); }
.mfx-m .mfx-toast { bottom: 76px; }

/* celular: nenhum texto abaixo de 12px (aqui nao ha escala) */
.mfx-m .mfx-lt time, .mfx-m .mfx-meta, .mfx-m .mfx-dia, .mfx-m .mfx-sis, .mfx-m .mfx-digitando span,
.mfx-m .mfx-secao, .mfx-m .mfx-chip, .mfx-m .mfx-aba, .mfx-m .mfx-assumir, .mfx-m .mfx-bacoes,
.mfx-m .mfx-prot, .mfx-m .mfx-st, .mfx-m .mfx-campo small, .mfx-m .mfx-linha-res small,
.mfx-m .mfx-gerado, .mfx-m .mfx-fchips span, .mfx-m .mfx-nota small, .mfx-m .mfx-opo small,
.mfx-m .mfx-menu-ia header small, .mfx-m .mfx-tile, .mfx-m .mfx-carregar { font-size: 12px; }
.mfx-m .mfx-badge, .mfx-m .mfx-aba b, .mfx-m .mfx-chip b, .mfx-m .mfx-sino b, .mfx-m .mfx-tile b {
  font-size: 12px; min-width: 20px; height: 20px; line-height: 20px; padding: 0 5px;
}
.mfx-m .mfx-sino b { top: 0; right: -2px; }
.mfx-m .mfx-aba b { top: 3px; }
.mfx-m .mfx-chips { gap: 4px; padding: 0 6px 8px; }
.mfx-m .mfx-chip { height: 28px; padding: 0 4px 0 7px; gap: 3px; }
.mfx-m .mfx-agente { height: 28px; font-size: 13px !important; }
.mfx-m .mfx-agente i { width: 24px; height: 24px; font-size: 12px; }
.mfx-m .mfx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mfx-m .mfx-tile { height: 52px; gap: 3px; }
.mfx-m .mfx-tile .mfx-ic { width: 19px; height: 19px; }
.mfx-m .mfx-st { height: 24px; line-height: 24px; }
.mfx-m .mfx-gerado { height: 22px; line-height: 22px; }
.mfx-m .mfx-prot { height: 26px; }
.mfx-m .mfx-assumir { height: 28px; }
.mfx-m .mfx-dia { padding: 4px 12px; }

@media (prefers-reduced-motion: reduce) {
  .mfx-pulso { animation: none; }
  .mfx-digitando i { animation: none; opacity: .7; }
  .mfx-toast, .mfx-secao .mfx-seta, .mfx-linha-res .mfx-seta { transition: none; }
}
