/* Brain: mesa de agentes. Tema escuro por padrao, claro opcional. */

@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root, html[data-tema='escuro'] {
  --bg: #0A0A0B;
  --sup: #131316;
  --sup-2: #17171B;
  --sup-3: #1F1F25;
  --sup-4: #2A2A32;
  --vidro: rgba(20, 20, 24, .74);
  --vidro-forte: rgba(23, 23, 28, .92);
  --linha: rgba(255, 255, 255, .07);
  --linha-2: rgba(255, 255, 255, .12);
  --linha-3: rgba(255, 255, 255, .22);
  --hover: rgba(255, 255, 255, .06);
  --txt: #EDEDF0;
  --txt-2: #A7A7B1;
  --txt-3: #6F6F7A;
  --ponto: rgba(255, 255, 255, .085);
  --med: #8B7CFF;
  --med-txt: #B3A9FF;
  --ciano: #22D3EE;
  --ok: #34D399;
  --erro: #F87171;
  --alerta: #FBBF24;
  --no-bg: #121215;
  --sombra-1: 0 8px 24px -12px rgba(0, 0, 0, .75);
  --sombra-2: 0 28px 70px -24px rgba(0, 0, 0, .85), 0 2px 10px rgba(0, 0, 0, .45);
  --sombra-no: 0 12px 30px -16px rgba(0, 0, 0, .95);
  --veu: rgba(4, 4, 8, .58);
  --fonte: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --larg-gaveta: 460px;
  color-scheme: dark;
}

html[data-tema='claro'] {
  --bg: #F7F7F8;
  --sup: #FFFFFF;
  --sup-2: #FFFFFF;
  --sup-3: #F0F0F3;
  --sup-4: #E6E6EB;
  --vidro: rgba(255, 255, 255, .78);
  --vidro-forte: rgba(255, 255, 255, .95);
  --linha: rgba(12, 12, 24, .08);
  --linha-2: rgba(12, 12, 24, .13);
  --linha-3: rgba(12, 12, 24, .24);
  --hover: rgba(12, 12, 24, .05);
  --txt: #16161A;
  --txt-2: #53535E;
  --txt-3: #8A8A95;
  --ponto: rgba(12, 12, 24, .13);
  --med: #7C6CF6;
  --med-txt: #5B48E0;
  --ciano: #0891B2;
  --ok: #059669;
  --erro: #DC2626;
  --alerta: #C2730A;
  --no-bg: #FFFFFF;
  --sombra-1: 0 6px 20px -10px rgba(20, 20, 40, .22);
  --sombra-2: 0 28px 70px -24px rgba(20, 20, 40, .35), 0 2px 10px rgba(20, 20, 40, .08);
  --sombra-no: 0 10px 26px -14px rgba(20, 20, 40, .3);
  --veu: rgba(20, 20, 32, .28);
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  position: fixed; inset: 0;
  background: var(--bg); color: var(--txt);
  font: 400 14px/1.5 var(--fonte);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
* { scrollbar-width: thin; scrollbar-color: var(--linha-3) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--linha-2); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: color-mix(in srgb, var(--med) 35%, transparent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
a { color: var(--med-txt); }
small { font-size: 12px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--med); outline-offset: 2px; }
.ic { flex: none; display: block; }
.mudo { color: var(--txt-3); }
.sem-js { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; color: var(--txt-2); }

/* ------------------------------------------------------------------ controles */
.btn {
  --spin: var(--txt);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--sup-3); border: 1px solid var(--linha); color: var(--txt);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; position: relative;
  transition: background .15s, border-color .15s, color .15s, transform .1s, opacity .15s;
}
.btn:hover:not(:disabled) { background: var(--sup-4); border-color: var(--linha-2); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primario { --spin: var(--bg); background: var(--txt); color: var(--bg); border-color: transparent; }
.btn.primario:hover:not(:disabled) { background: color-mix(in srgb, var(--txt) 86%, var(--bg)); }
.btn.perigo { --spin: #fff; background: var(--erro); color: #fff; border-color: transparent; }
.btn.perigo:hover:not(:disabled) { background: color-mix(in srgb, var(--erro) 85%, #000); }
.btn.perigo-texto { --spin: var(--erro); background: transparent; border-color: transparent; color: var(--erro); }
.btn.perigo-texto:hover:not(:disabled) { background: color-mix(in srgb, var(--erro) 12%, transparent); border-color: transparent; }
.btn.fino { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.largo { width: 100%; }
.btn.esquerda { margin-right: auto; }
.btn.carregando { color: transparent !important; pointer-events: none; }
.btn.carregando::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid var(--spin); border-right-color: transparent; animation: gira .7s linear infinite;
}
.btn-icone {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px; color: var(--txt-2);
  transition: background .15s, color .15s;
}
.btn-icone:hover:not(:disabled) { background: var(--hover); color: var(--txt); }
.btn-icone.mini { width: 26px; height: 26px; border-radius: 7px; }
.btn-link {
  color: var(--txt-2); font-size: 13px; padding: 6px 2px;
  text-decoration: underline; text-decoration-color: var(--linha-3); text-underline-offset: 3px;
}
.btn-link:hover:not(:disabled) { color: var(--txt); }

.campo {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--sup-3); border: 1px solid var(--linha); color: var(--txt);
  font-size: 14px; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.campo::placeholder { color: var(--txt-3); }
.campo:focus { outline: none; border-color: color-mix(in srgb, var(--med) 65%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--med) 18%, transparent); }
textarea.campo { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.campo.busca {
  padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A95' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px 50%;
}
.campo.busca::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type='number'].campo { font-family: var(--mono); }
.campo.codigo { height: 58px; font: 600 26px var(--mono); letter-spacing: .5em; text-align: center; padding: 0 0 0 .5em; }

.rotulo { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--txt-2); min-width: 0; }
.rotulo-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.contador { font: 400 11px var(--mono); color: var(--txt-3); }

.linha-chave {
  display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 12px; border-radius: 12px; background: var(--sup-3); cursor: pointer;
}
.linha-chave > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.linha-chave b { font-size: 13.5px; font-weight: 500; color: var(--txt); }
.linha-chave small { font-size: 12px; color: var(--txt-3); line-height: 1.45; }
.linha-chave.compacta { padding: 8px 10px; background: transparent; border: 1px solid var(--linha); }
.chave {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 38px; height: 22px; border-radius: 99px; background: var(--linha-3); position: relative; transition: background .2s;
}
.chave::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s cubic-bezier(.3, .7, .3, 1.2);
}
.chave:checked { background: var(--med); }
.chave:checked::after { transform: translateX(16px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; max-width: 100%;
  border-radius: 99px; background: var(--sup-3); border: 1px solid var(--linha);
  font-size: 12.5px; color: var(--txt-2); white-space: nowrap; transition: border-color .15s, color .15s, background .15s;
}
.chip > span { overflow: hidden; text-overflow: ellipsis; }
button.chip:hover:not(:disabled) { color: var(--txt); border-color: var(--linha-3); }
.chip[aria-checked='true'] { color: var(--txt); background: color-mix(in srgb, var(--med) 16%, var(--sup-3)); border-color: color-mix(in srgb, var(--med) 55%, transparent); }
.chip.mini { height: 24px; padding: 0 8px; gap: 5px; font-size: 11.5px; }
.chip.med { color: var(--med-txt); border-color: color-mix(in srgb, var(--med) 40%, transparent); }
.chip.pai { align-self: flex-start; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; flex: none;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  background: var(--sup-3); color: var(--txt-2);
}
kbd {
  font: 500 11px var(--mono); padding: 2px 6px; border-radius: 6px; color: var(--txt);
  border: 1px solid var(--linha-2); border-bottom-width: 2px; background: var(--sup-3);
}
.gira {
  flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--linha-2); border-top-color: var(--cor, var(--med)); animation: gira .8s linear infinite;
}
.puxador { display: none; flex: none; height: 22px; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.puxador::before { content: ''; width: 38px; height: 4px; border-radius: 99px; background: var(--linha-3); }

/* ------------------------------------------------------------------ app */
.app { position: fixed; inset: 0; overflow: hidden; }

.topo {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  pointer-events: none;
}
.topo-esq, .topo-dir { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.topo-esq { min-width: 0; flex: 0 1 auto; }
.topo-dir { flex: none; }
.btn-quadro, .custo, .topo .btn-icone {
  height: 44px; border-radius: 14px; background: var(--vidro); border: 1px solid var(--linha);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--sombra-1); transition: border-color .15s, background .15s;
}
.btn-quadro:hover, .custo:hover, .topo .btn-icone:hover { border-color: var(--linha-2); background: var(--vidro-forte); }
.btn-quadro { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 9px; min-width: 0; max-width: min(56vw, 380px); color: var(--txt); }
.btn-quadro > .ic { color: var(--txt-3); }
.quadro-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; text-align: left; }
.quadro-txt small { font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--txt-3); }
.quadro-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.salvo { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: 0; transition: opacity .3s, background .3s; }
.salvo[data-estado='pendente'], .salvo[data-estado='salvando'] { background: var(--alerta); opacity: 1; }
.salvo[data-estado='salvando'] { animation: pulsa 1s ease-in-out infinite; }
.salvo[data-estado='erro'] { background: var(--erro); opacity: 1; }
.custo { display: flex; align-items: center; gap: 8px; padding: 0 13px 0 11px; color: var(--txt-3); }
.custo-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
#custo-valor { font: 600 13px var(--mono); color: var(--txt); white-space: nowrap; }
#custo-rot { font: 400 10.5px var(--mono); color: var(--txt-3); white-space: nowrap; }
.custo.vivo { border-color: color-mix(in srgb, var(--med) 55%, transparent); }
.custo.vivo .ic { color: var(--med); animation: pulsa 1.2s ease-in-out infinite; }
.topo .btn-icone { width: 44px; color: var(--txt-2); }

.banner {
  position: absolute; z-index: 20; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top) + 64px);
  display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100% - 24px));
  padding: 7px 7px 7px 14px; border-radius: 14px;
  background: var(--vidro-forte); border: 1px solid color-mix(in srgb, var(--med) 40%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--sombra-1);
  transition: left .3s cubic-bezier(.2, .8, .2, 1);
}
.banner > .ic { color: var(--med); }
.banner-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.banner-txt small { font-size: 11px; color: var(--txt-3); }
.banner-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ canvas */
.palco {
  position: absolute; inset: 0; overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--ponto) 1px, transparent 1.3px);
  background-size: 22px 22px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.palco::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, color-mix(in srgb, var(--bg) 75%, transparent));
}
.palco.longe { --ponto: rgba(127, 127, 140, .07); }
.palco.ligando { cursor: crosshair; }
#mundo { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#nos { position: absolute; left: 0; top: 0; }
#fios { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

.fio-toque { fill: none; stroke: transparent; stroke-width: max(18px, calc(14px / var(--z, 1))); pointer-events: stroke; cursor: pointer; }
.fio-linha {
  fill: none; stroke-linecap: round;
  stroke: color-mix(in srgb, var(--cor, var(--txt-3)) 50%, var(--linha-3));
  stroke-width: max(1.6px, calc(1.2px / var(--z, 1)));
  transition: stroke .3s, opacity .3s;
}
.fio.auto .fio-linha { stroke: var(--linha-3); stroke-dasharray: 2 6; opacity: .7; }
.fio:hover .fio-linha { stroke: color-mix(in srgb, var(--cor, var(--txt-3)) 75%, var(--linha-3)); }
.fio.sel .fio-linha { stroke: var(--cor, var(--med)); stroke-width: max(2.6px, calc(2px / var(--z, 1))); stroke-dasharray: none; opacity: 1; }
.fio.espera .fio-linha { stroke-dasharray: 3 6; opacity: .45; }
.fio.pronto .fio-linha { stroke: color-mix(in srgb, var(--cor, var(--med)) 70%, transparent); stroke-dasharray: none; opacity: .8; }
.fio.ativo .fio-linha { stroke: var(--cor, var(--med)); stroke-dasharray: 7 7; opacity: 1; animation: fluxo .8s linear infinite; }
.fio.feito .fio-linha { stroke: var(--cor, var(--med)); stroke-dasharray: none; opacity: .9; }
.fio.falhou .fio-linha { stroke: var(--erro); stroke-dasharray: 3 5; opacity: .7; }
.palco.replay .fio-toque { cursor: default; }
.fio-temp { fill: none; stroke: var(--cor, var(--med)); stroke-width: 2; stroke-dasharray: 6 6; stroke-linecap: round; animation: fluxo .8s linear infinite; }
.g-particulas { pointer-events: none; }
.particula { fill: var(--cor, var(--med)); filter: drop-shadow(0 0 3px var(--cor, var(--med))); }
.particula.envio { filter: drop-shadow(0 0 6px var(--cor, var(--med))); }
.fio-x {
  position: absolute; left: 0; top: 0; z-index: 3; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--sup-2); border: 1px solid var(--linha-3); color: var(--txt-2); box-shadow: var(--sombra-1);
  transform: translate(var(--x, 0), var(--y, 0)) scale(calc(1 / var(--z, 1)));
}
.fio-x:hover { color: var(--erro); border-color: var(--erro); }

/* Tamanho fixo: o layout (TAM em 30-canvas.js) conta com estas medidas. */
.no {
  position: absolute; left: 0; top: 0; width: 236px; height: 144px;
  padding: 12px 14px 10px; border-radius: 14px;
  background: var(--no-bg); border: 1px solid var(--linha-2); box-shadow: var(--sombra-no);
  color: var(--txt); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: box-shadow .25s, border-color .25s, opacity .3s;
  will-change: transform;
}
.no::before {
  content: ''; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px; border-radius: 0 0 3px 3px;
  background: var(--cor); opacity: .85;
}
.palco.dir-v .no { width: 164px; height: 138px; padding: 10px 11px 9px; }
.no.mediador { width: 280px; border-color: transparent;
  background: linear-gradient(var(--no-bg), var(--no-bg)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--med) 75%, transparent), color-mix(in srgb, var(--ciano) 45%, transparent)) border-box;
  box-shadow: var(--sombra-no), 0 18px 50px -22px color-mix(in srgb, var(--med) 60%, transparent);
}
.no.mediador::before { display: none; }
.palco.dir-v .no.mediador { width: 300px; }
.no:hover { border-color: var(--linha-3); }
.no.mediador:hover { border-color: transparent; }
.no:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--med), var(--sombra-no); }
.no.sel { box-shadow: 0 0 0 2px var(--cor, var(--med)), 0 16px 40px -18px color-mix(in srgb, var(--cor, var(--med)) 70%, transparent); }
.no.arrastando { cursor: grabbing; z-index: 5; box-shadow: 0 0 0 1px var(--linha-3), var(--sombra-2); transition: none; }
.no.novo { animation: no-entra .55s cubic-bezier(.2, .9, .3, 1.15); }
.no.alvo-ruim { opacity: .35; }
.no.alvo-ok .porta.entrada { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 35%, var(--bg)); transform: scale(1.35); }
.no.alvo { box-shadow: 0 0 0 2px var(--ok), var(--sombra-no); }
.no.origem .porta.saida { background: var(--cor); border-color: var(--cor); }

.no-anel {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0;
  background: conic-gradient(from var(--ang), transparent 0 50%, color-mix(in srgb, var(--cor) 30%, transparent) 62%, var(--cor) 78%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .3s;
}
.no.st-pensando .no-anel, .no.st-pesquisando .no-anel { opacity: 1; animation: anel 1.6s linear infinite; }
.no.st-pesquisando .no-anel { --cor: var(--ciano); }
.no.st-pensando, .no.st-pesquisando { box-shadow: var(--sombra-no), 0 10px 36px -14px color-mix(in srgb, var(--cor) 60%, transparent); }
.no.st-pronto { border-color: color-mix(in srgb, var(--cor) 40%, var(--linha-2)); }
.no.mediador.st-pronto { box-shadow: var(--sombra-no), 0 0 0 1px color-mix(in srgb, var(--med) 50%, transparent), 0 20px 60px -20px color-mix(in srgb, var(--med) 80%, transparent); }
.no.st-erro { border-color: color-mix(in srgb, var(--erro) 60%, transparent); }
.palco.rodando .no.st-fila { opacity: .72; }

.no-cab { display: flex; align-items: center; gap: 10px; min-width: 0; height: 32px; }
.no-av {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; line-height: 1; background: color-mix(in srgb, var(--cor) 17%, transparent);
}
.no.mediador .no-av { background: color-mix(in srgb, var(--med) 14%, transparent); }
.palco.dir-v .no:not(.mediador) .no-av { width: 28px; height: 28px; font-size: 16px; border-radius: 9px; }
.no-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.no-nome { font-size: 13.5px; line-height: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-papel { font-size: 11.5px; line-height: 15px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-web { flex: none; color: var(--ciano); display: grid; }
/* No cartao estreito o globo vira selo no canto do avatar e o nome fica com a linha toda. */
.palco.dir-v:not(.longe) .no:not(.mediador) .no-cab { position: relative; }
.palco.dir-v .no:not(.mediador) .no-web {
  position: absolute; left: 18px; top: 19px; width: 15px; height: 15px; border-radius: 50%;
  place-items: center; background: var(--no-bg);
}
.palco.dir-v .no:not(.mediador) .no-web svg { width: 11px; height: 11px; }
.no-rodada {
  flex: none; font: 600 10px var(--mono); padding: 2px 5px; border-radius: 5px;
  background: color-mix(in srgb, var(--cor) 20%, transparent); color: var(--cor);
}
.no-txt {
  height: 54px; margin: 9px 0 0; font-size: 12.5px; line-height: 18px; color: var(--txt-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.palco.dir-v .no-txt { height: 51px; font-size: 12px; line-height: 17px; }
.no-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; height: 16px; font: 400 11px/16px var(--mono); color: var(--txt-3); }
.no-st { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.no-st-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-pt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--linha-3); }
.no.st-fila .no-pt { background: var(--txt-3); }
.no.st-pensando .no-pt { background: var(--cor); animation: pulsa 1s ease-in-out infinite; }
.no.st-pesquisando .no-pt { background: var(--ciano); animation: pulsa 1s ease-in-out infinite; }
.no.st-pronto .no-pt { background: var(--ok); }
.no.st-erro .no-pt { background: var(--erro); }
.no.st-erro .no-st-txt { color: var(--erro); }
.no-custo { white-space: nowrap; }
/* De longe some o detalhe e fica so quem e quem, sem mudar o tamanho do cartao. */
.palco.longe .no-txt, .palco.longe .no-pe { visibility: hidden; }
.palco.longe .no-papel, .palco.longe .no-web, .palco.longe .no-rodada { display: none; }
.palco.longe .no-cab { position: absolute; inset: 0; height: auto; flex-direction: column; justify-content: center; gap: 9px; padding: 0 10px; }
.palco.longe .no-av, .palco.longe.dir-v .no:not(.mediador) .no-av { width: 50px; height: 50px; font-size: 29px; border-radius: 15px; }
.palco.longe .no-av svg { width: 34px; height: 34px; }
.palco.longe .no-tit { flex: none; width: 100%; text-align: center; }
.palco.longe .no-nome { font-size: 21px; line-height: 26px; }

.porta {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--linha-3); transition: transform .15s, background .15s, border-color .15s;
}
.porta.saida { cursor: crosshair; }
.porta.saida::after { content: ''; position: absolute; inset: -13px; border-radius: 50%; }
.no:hover .porta.saida, .porta.saida:hover { border-color: var(--cor); }
.porta.saida:hover { background: var(--cor); transform: scale(1.3); }
.palco.dir-h .porta.entrada { left: -7px; top: 50%; margin-top: -6px; }
.palco.dir-h .porta.saida { right: -7px; top: 50%; margin-top: -6px; }
.palco.dir-v .porta.entrada { top: -7px; left: 50%; margin-left: -6px; }
.palco.dir-v .porta.saida { bottom: -7px; left: 50%; margin-left: -6px; }
.no.mediador .porta.entrada { border-color: color-mix(in srgb, var(--med) 70%, transparent); }
.palco.replay .porta { opacity: 0; pointer-events: none; }
.palco.replay .no { cursor: pointer; }

/* ------------------------------------------------------------------ ferramentas */
.ferramentas {
  position: absolute; z-index: 15; left: calc(12px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 16px;
  background: var(--vidro); border: 1px solid var(--linha);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--sombra-1);
}
.ferr { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--txt-2); transition: background .15s, color .15s, transform .1s; }
.ferr:hover:not(:disabled) { background: var(--hover); color: var(--txt); }
.ferr:active:not(:disabled) { transform: scale(.94); }
.ferr.destaque { background: var(--med); color: #fff; }
.ferr.destaque:hover:not(:disabled) { background: color-mix(in srgb, var(--med) 85%, #fff); color: #fff; }
.ferr-sep { height: 1px; margin: 3px 7px; background: var(--linha-2); }
.app.em-replay #f-agente, .app.em-replay #f-organizar, .app.em-replay #f-desfazer, .app.em-replay .ferr-sep { display: none; }

.dica-vazia {
  position: absolute; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 158px);
  width: min(360px, calc(100% - 32px)); padding: 18px 18px 16px; border-radius: 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--vidro); border: 1px dashed var(--linha-3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: sobe .4s ease both;
}
.dica-vazia > .ic { color: var(--med); }
.dica-vazia b { font-size: 14.5px; font-weight: 600; }
.dica-vazia p { margin: 0 0 8px; font-size: 13px; color: var(--txt-2); line-height: 1.5; }
.dica-vazia strong { color: var(--txt); font-weight: 600; }
.dica-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.linha-pergunta { display: flex; align-items: flex-start; gap: 6px; }
.linha-pergunta > textarea { flex: 1 1 auto; min-width: 0; }
#btn-material { width: 32px; height: 32px; color: var(--txt-3); }
#btn-material[data-n] { color: var(--med-txt); }
/* selo com a contagem (tarefas em aberto, materiais em uso) */
#btn-tarefas, #btn-material { position: relative; }
#btn-tarefas[data-n]::after, #btn-material[data-n]::after {
  content: attr(data-n); position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  display: grid; place-items: center; background: var(--med); color: #fff; font: 600 10px/1 var(--mono); pointer-events: none;
}
#btn-material[data-n]::after { top: -3px; right: -3px; }

/* ------------------------------------------------------------------ compositor */
.compositor {
  position: absolute; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom) + var(--teclado, 0px));
  width: min(760px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 8px;
  transition: left .3s cubic-bezier(.2, .8, .2, 1), width .3s cubic-bezier(.2, .8, .2, 1);
}
.caixa-pergunta {
  padding: 10px 10px 9px 14px; border-radius: 18px;
  background: var(--vidro-forte); border: 1px solid var(--linha-2); box-shadow: var(--sombra-2);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  transition: border-color .2s, box-shadow .2s;
}
.caixa-pergunta:focus-within { border-color: color-mix(in srgb, var(--med) 55%, var(--linha-2)); box-shadow: var(--sombra-2), 0 0 0 4px color-mix(in srgb, var(--med) 13%, transparent); }
#pergunta {
  display: block; width: 100%; min-height: 32px; max-height: 220px; padding: 4px 2px 8px; margin: 0;
  resize: none; border: 0; outline: none; background: transparent; color: var(--txt);
  font: 400 15px/1.5 var(--fonte); overflow-y: hidden;
}
#pergunta::placeholder { color: var(--txt-3); }
.comp-pe { display: flex; align-items: center; gap: 8px; min-width: 0; }
.modos { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sup-3); }
.modos button { height: 30px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--txt-3); transition: background .15s, color .15s; }
.modos button:hover { color: var(--txt-2); }
.modos button.ativo { background: var(--sup-4); color: var(--txt); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
html[data-tema='claro'] .modos button.ativo { background: #fff; }
.estimativa { margin-left: auto; font: 500 12px var(--mono); color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.estimativa:empty { visibility: hidden; }
.estimativa.acima { color: var(--alerta); }
.btn.rodar { --spin: #fff; height: 36px; padding: 0 16px; background: var(--med); color: #fff; font-weight: 600; box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--med) 80%, transparent); }
.btn.rodar:hover:not(:disabled) { background: color-mix(in srgb, var(--med) 86%, #fff); }
.btn.rodar:disabled { opacity: .5; }
.app.rodando .caixa-pergunta { opacity: .92; }

.seguimento {
  display: flex; align-items: center; gap: 8px; margin: -2px -2px 8px -6px; padding: 5px 5px 5px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--med) 11%, transparent); color: var(--txt-2); font-size: 12.5px;
}
.seguimento > .ic { color: var(--med); }
#seg-texto { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#seg-texto b { color: var(--txt); font-weight: 600; }
#seg-texto small { color: var(--txt-3); }

.progresso, .resultado {
  border-radius: 14px; background: var(--vidro-forte); border: 1px solid var(--linha-2); box-shadow: var(--sombra-1);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: sobe .3s ease both;
}
.progresso { padding: 8px 8px 0 14px; overflow: hidden; }
.prog-linha { display: flex; align-items: center; gap: 10px; min-height: 32px; padding-bottom: 8px; }
.prog-texto { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-tempo, .prog-custo { font: 500 12px var(--mono); color: var(--txt-3); white-space: nowrap; }
.prog-barra { position: relative; height: 2px; margin: 0 -8px 0 -14px; background: var(--linha); }
.prog-barra::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 3%);
  background: linear-gradient(90deg, var(--med), var(--ciano)); transition: width .6s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 10px color-mix(in srgb, var(--med) 70%, transparent);
}
.resultado { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 13px; }
.res-status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.res-status.ok { color: var(--ok); }
.res-status.falha { color: var(--erro); }
.res-pergunta { flex: 1; min-width: 0; font-size: 13px; color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ camadas: menu, popover, avisos */
.menu {
  position: fixed; z-index: 70; min-width: 240px; max-width: min(330px, calc(100vw - 16px)); max-height: min(70vh, 520px);
  overflow-y: auto; padding: 6px; border-radius: 14px;
  background: var(--sup-2); border: 1px solid var(--linha-2); box-shadow: var(--sombra-2);
  animation: aparece .14s ease-out;
}
.menu hr { border: 0; height: 1px; background: var(--linha); margin: 6px 4px; }
.menu-titulo { padding: 8px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; text-align: left; color: var(--txt); }
.menu-item .ic { color: var(--txt-3); }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; }
.menu-rotulo { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item small { flex: none; font: 400 11px var(--mono); color: var(--txt-3); }
.menu-item.ativo .menu-rotulo { font-weight: 600; }
.menu-item.ativo .ic { color: var(--med); }
.menu-item.perigo, .menu-item.perigo .ic { color: var(--erro); }

.popover {
  position: fixed; z-index: 70; width: 340px; max-width: calc(100vw - 16px);
  background: var(--sup-2); border: 1px solid var(--linha-2); border-radius: 16px; box-shadow: var(--sombra-2);
  opacity: 0; transform: translateY(4px) scale(.97); transition: opacity .14s, transform .14s;
}
.popover.visivel { opacity: 1; transform: none; }
.novo-agente { display: flex; flex-direction: column; max-height: min(470px, calc(100vh - 16px)); }
.pop-cab { display: flex; flex-direction: column; gap: 1px; padding: 13px 14px 9px; }
.pop-cab b { font-size: 14px; font-weight: 600; }
.pop-cab small { font-size: 12px; color: var(--txt-3); }
.novo-agente > .campo.busca { margin: 0 10px 8px; width: auto; flex: none; }
.pop-lista { display: flex; flex-direction: column; gap: 1px; padding: 0 6px 6px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.pop-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-align: left; transition: background .12s; }
.pop-item:hover, .pop-item:focus-visible { background: var(--hover); outline: none; }
.pop-av {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: 17px; line-height: 1; background: color-mix(in srgb, var(--cor, var(--txt-3)) 16%, transparent);
}
.pop-item.custom .pop-av { background: transparent; border: 1px dashed var(--linha-3); color: var(--txt-2); }
.pop-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pop-txt b { font-size: 13.5px; font-weight: 500; }
.pop-txt small { font-size: 12px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 99px; font-size: 10.5px; color: var(--txt-3); background: var(--sup-3); }
.pop-tag .ic { color: var(--ciano); }

.avisos {
  position: fixed; z-index: 80; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top) + 64px); width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.aviso {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 100%;
  min-height: 42px; padding: 9px 9px 9px 14px; border-radius: 12px;
  background: var(--txt); color: var(--bg); box-shadow: var(--sombra-2); font-size: 13.5px; font-weight: 500;
  opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .25s, transform .25s;
}
.aviso.visivel { opacity: 1; transform: none; }
.app.em-replay ~ .avisos { top: calc(env(safe-area-inset-top) + 124px); }
.aviso.erro .ic { color: var(--erro); }
.aviso.ok .ic { color: var(--ok); }
html[data-tema='escuro'] .aviso.erro .ic { color: #DC2626; }
html[data-tema='escuro'] .aviso.ok .ic { color: #059669; }
.aviso-texto { flex: 1; min-width: 0; }
.aviso-acao { flex: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; background: color-mix(in srgb, var(--bg) 10%, transparent); }
.aviso-acao:hover { background: color-mix(in srgb, var(--bg) 18%, transparent); }
.aviso:not(:has(.aviso-acao)) { padding-right: 14px; }

/* ------------------------------------------------------------------ modais */
.veu {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--veu); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s;
}
.veu.visivel { opacity: 1; }
.modal {
  display: flex; flex-direction: column; width: min(520px, 100%); max-height: min(86dvh, 780px);
  background: var(--sup-2); border: 1px solid var(--linha-2); border-radius: 18px; box-shadow: var(--sombra-2);
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .2s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden; outline: none;
}
.veu.visivel .modal { opacity: 1; transform: none; }
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 10px 20px; flex: none; }
.modal-cab h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.modal-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }
.modal-pe { flex: none; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--linha); }
.modal-pequeno { width: min(400px, 100%); }
.modal-msg { margin: 0; color: var(--txt-2); font-size: 14px; line-height: 1.55; }
.modal-sub { margin: 0 0 12px; font-size: 13px; color: var(--txt-2); }
.modal-lista { width: min(440px, 100%); }
.modal-lista .pop-lista { padding: 0; }
.modal-agente { width: min(560px, 100%);
  background-image: radial-gradient(120% 50% at 50% -10%, color-mix(in srgb, var(--cor, var(--med)) 15%, transparent), transparent 60%);
}
.modal-equipe { width: min(560px, 100%); }
.modal-custo { width: min(460px, 100%); }
.modal-ajustes { width: min(660px, 100%); height: min(740px, 88dvh); }
.modal-material, .modal-agenda { width: min(560px, 100%); }
.modal-ajustes .modal-corpo { padding-top: 0; }

/* abas */
.abas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--linha); flex: none; }
.abas::-webkit-scrollbar { display: none; }
/* Barra que nao cabe: as bordas esmaecem do lado em que ha mais abas. */
.abas::before, .abas::after { content: ''; position: sticky; z-index: 1; flex: none; width: 36px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.abas::before { left: 0; margin-right: -38px; background: linear-gradient(90deg, var(--sup-2) 25%, transparent); }
.abas::after { right: 0; margin-left: -38px; background: linear-gradient(270deg, var(--sup-2) 25%, transparent); }
.abas.mais-e::before, .abas.mais-d::after { opacity: 1; }
.aba {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; margin-bottom: -1px;
  font-size: 13px; font-weight: 500; color: var(--txt-3); white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.aba:hover { color: var(--txt-2); }
.aba.ativa { color: var(--txt); border-bottom-color: var(--med); }
.aba small { font: 500 10.5px var(--mono); padding: 1px 6px; border-radius: 99px; background: var(--sup-3); color: var(--txt-3); }
.aba.ativa small { background: color-mix(in srgb, var(--med) 18%, transparent); color: var(--med-txt); }
.aba-painel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.aba-painel > div:only-child { display: flex; flex-direction: column; gap: 14px; }
.abas-ajustes { position: sticky; top: 0; z-index: 2; margin: 0 -20px 16px; padding: 0 14px; background: var(--sup-2); }
.abas-gaveta { position: sticky; top: 0; z-index: 2; margin: 0 -16px; padding: 0 10px; background: var(--sup-2); }
.abas-balao { margin: 0 -14px; padding: 0 8px; }

/* ------------------------------------------------------------------ formulario do agente */
.form-agente { display: flex; flex-direction: column; gap: 14px; }
.chips-modelos { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 2px; }
.chips-modelos::-webkit-scrollbar { display: none; }
.chips-modelos .chip { flex: none; }
.chips-modelos .chip:hover { border-color: color-mix(in srgb, var(--cor) 55%, transparent); }
.linha-nome { display: flex; align-items: flex-end; gap: 10px; }
.rotulo.cresce { flex: 1; }
.emoji-btn {
  flex: none; width: 46px; height: 40px; border-radius: 10px; font-size: 21px; line-height: 1;
  background: color-mix(in srgb, var(--cor, var(--med)) 16%, var(--sup-3)); border: 1px solid var(--linha);
}
.emoji-btn:hover { border-color: var(--linha-3); }
.emoji-grade {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px;
  max-height: 184px; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--sup-3);
}
.emoji-op { height: 40px; border-radius: 8px; font-size: 21px; line-height: 1; }
.emoji-op:hover { background: var(--hover); }
.cores { display: flex; flex-wrap: wrap; gap: 9px; }
.cor { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); transition: transform .12s, box-shadow .12s; }
.cor:hover { transform: scale(1.1); }
.cor[aria-checked='true'] { box-shadow: 0 0 0 2px var(--sup-2), 0 0 0 4px var(--c); }
.erro-campo { margin: 0; color: var(--erro); font-size: 13px; }

/* equipe sugerida */
.equipe-lista { display: flex; flex-direction: column; gap: 6px; }
.equipe-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--linha); background: var(--sup); transition: border-color .15s, background .15s;
}
.equipe-item:hover { border-color: var(--linha-2); }
.equipe-item:has(input:checked) { border-color: color-mix(in srgb, var(--cor, var(--med)) 50%, transparent); background: color-mix(in srgb, var(--cor, var(--med)) 7%, var(--sup)); }
.equipe-item input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--med); }
.equipe-item .pop-txt small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.modal-equipe small.mudo { display: block; margin-top: 10px; font-size: 12px; }

/* ------------------------------------------------------------------ balao */
.balao {
  position: fixed; z-index: 30; width: 380px; max-width: calc(100vw - 24px); max-height: min(72vh, 620px);
  display: flex; flex-direction: column;
  background: var(--sup-2); border: 1px solid var(--linha-2); border-radius: 16px; box-shadow: var(--sombra-2);
  opacity: 0; transform: scale(.96); transition: opacity .16s, transform .16s cubic-bezier(.2, .8, .2, 1);
}
.balao.visivel { opacity: 1; transform: none; }
.balao::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 64px; border-radius: 16px 16px 0 0; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--cor, var(--med)) 10%, transparent), transparent);
}
.balao[data-lado='dir'] { transform-origin: 0 var(--cauda, 50%); }
.balao[data-lado='esq'] { transform-origin: 100% var(--cauda, 50%); }
.balao[data-lado='baixo'] { transform-origin: var(--cauda, 50%) 0; }
.balao[data-lado='cima'] { transform-origin: var(--cauda, 50%) 100%; }
.balao-cauda { position: absolute; width: 12px; height: 12px; background: var(--sup-2); border: 0 solid var(--linha-2); transform: rotate(45deg); }
.balao[data-lado='dir'] .balao-cauda { left: -7px; top: calc(var(--cauda, 50%) - 6px); border-left-width: 1px; border-bottom-width: 1px; }
.balao[data-lado='esq'] .balao-cauda { right: -7px; top: calc(var(--cauda, 50%) - 6px); border-top-width: 1px; border-right-width: 1px; }
.balao[data-lado='baixo'] .balao-cauda { top: -7px; left: calc(var(--cauda, 50%) - 6px); border-left-width: 1px; border-top-width: 1px; }
.balao[data-lado='cima'] .balao-cauda { bottom: -7px; left: calc(var(--cauda, 50%) - 6px); border-bottom-width: 1px; border-right-width: 1px; }
.balao-cab { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 8px 10px 14px; flex: none; border-bottom: 1px solid var(--linha); }
.balao-av {
  flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; line-height: 1;
  background: color-mix(in srgb, var(--cor, var(--med)) 18%, transparent);
}
.balao-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.balao-tit b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balao-tit small { font-size: 12px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fase { display: inline-flex; align-items: center; gap: 6px; }
.fase .ponto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.fase.f-fila { color: var(--txt-3); }
.fase.f-pensando { color: var(--cor, var(--med)); }
.fase.f-pesquisando { color: var(--ciano); }
.fase.f-pensando .ponto, .fase.f-pesquisando .ponto { animation: pulsa 1s ease-in-out infinite; }
.fase.f-pronto { color: var(--ok); }
.fase.f-erro { color: var(--erro); }
.balao-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.balao-pe { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--linha); }
.balao-pe:empty { display: none; }
.balao-pe .meta { flex: 1; min-width: 0; padding-top: 0; border-top: 0; }
.balao .puxador { display: none; }

.espera { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--sup-3); color: var(--txt-2); font-size: 13px; }
.relogio { margin-left: auto; font: 500 12px var(--mono); color: var(--txt-3); }
.funcao small, .vizinhos small, .antes small {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--txt-3);
}
.funcao p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--txt-2); }
.funcao p b { font-weight: 600; color: var(--txt); }
.vizinhos { display: flex; flex-direction: column; gap: 10px; }
.vizinhos > div { display: flex; flex-direction: column; gap: 6px; }
.posicao {
  margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; font-weight: 500;
  background: color-mix(in srgb, var(--cor, var(--med)) 9%, var(--sup-3)); border-left: 3px solid var(--cor, var(--med));
  overflow-wrap: anywhere;
}
.posicao.oficial {
  border-left: 0; font-size: 15px; padding: 14px 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--med) 16%, var(--sup-3)), color-mix(in srgb, var(--ciano) 7%, var(--sup-3)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--med) 28%, transparent);
}
.antes { margin: 0; font-size: 12.5px; color: var(--txt-3); line-height: 1.5; }
.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lista li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.lista li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 2px; background: var(--li, var(--txt-3)); }
.lista.oport { --li: var(--ciano); }
.lista.risco { --li: var(--erro); }
.lista.lacuna { --li: var(--alerta); }
.lista.concorda { --li: var(--ok); }
.lista.discorda { --li: var(--erro); }
.falha { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--erro); background: color-mix(in srgb, var(--erro) 11%, transparent); }
.falha > span { flex: 1; min-width: 0; }
.resumo-pesquisa { border: 1px solid var(--linha); border-radius: 10px; padding: 0 12px; }
.resumo-pesquisa summary { cursor: pointer; padding: 9px 0; font-size: 12.5px; font-weight: 500; color: var(--txt-2); }
.resumo-pesquisa[open] summary { margin-bottom: 4px; }
.resumo-pesquisa > :last-child { padding-bottom: 12px; }
.meta { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--linha); }
.conf { display: inline-flex; align-items: center; gap: 8px; }
.conf small { font-size: 12px; color: var(--txt-3); }
.conf-barra { position: relative; flex: none; width: 70px; height: 4px; border-radius: 99px; background: var(--linha-2); overflow: hidden; }
.conf-barra::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--med), var(--ciano)); }
.meta-linha { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; color: var(--txt-3); }
.meta-linha b { font-weight: 500; color: var(--txt-2); }
.resumo-med { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.resumo-med > div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border-radius: 10px; background: var(--sup-3); text-align: center; }
.resumo-med b { font: 600 17px var(--mono); }
.resumo-med small { font-size: 10.5px; color: var(--txt-3); }
.funcao-med { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--txt-3); }

/* fontes */
.fontes { list-style: none; margin: 0; padding: 0; counter-reset: f; display: flex; flex-direction: column; gap: 2px; }
.fontes li { counter-increment: f; display: flex; flex-direction: column; gap: 4px; }
.fontes a {
  position: relative; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px 7px 34px; border-radius: 10px;
  color: var(--txt); text-decoration: none; transition: background .12s;
}
.fontes a:hover { background: var(--hover); }
.fontes a::before { content: counter(f); position: absolute; left: 8px; top: 8px; width: 18px; text-align: right; font: 600 11px var(--mono); color: var(--txt-3); }
.fontes a b { font-size: 13px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fontes a small { font: 400 11.5px var(--mono); color: var(--txt-3); }
.fontes li > .chips { padding-left: 34px; }

/* ------------------------------------------------------------------ gaveta */
.gaveta {
  position: fixed; z-index: 40; top: calc(env(safe-area-inset-top) + 64px); right: 8px; bottom: 8px;
  width: min(var(--larg-gaveta), calc(100vw - 16px));
  display: flex; flex-direction: column; overflow: hidden; outline: none;
  background: var(--sup-2); border: 1px solid var(--linha-2); border-radius: 18px; box-shadow: var(--sombra-2);
  transform: translateX(calc(100% + 16px)); visibility: hidden;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
}
.gaveta.aberta { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.veu-gaveta { display: none; }
.gaveta-cab { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; flex: none; border-bottom: 1px solid var(--linha); }
.gaveta-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--sup-3); color: var(--txt-2); }
.gaveta-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gaveta-tit b { font-size: 15px; font-weight: 600; }
.gaveta-tit small { font-size: 12px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gaveta-corpo { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.gaveta-pe { flex: none; display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }
.gaveta-pe .btn { flex: 1 1 0; min-width: 0; }
.gaveta-pe .btn.primario { flex-grow: 1.5; }
.ancora-abas { height: 0; flex: none; margin-bottom: -14px; }
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--txt-3); }
.res-custo { font-family: var(--mono); color: var(--txt-2); }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sec h3 { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }
.sec + .sec { margin-top: 6px; }
.vazio { margin: 0; padding: 22px 0; text-align: center; color: var(--txt-3); font-size: 13px; }

.contribs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.contrib { padding: 10px 12px; border-radius: 12px; background: var(--sup-3); border-left: 3px solid var(--cor, var(--med)); }
.contrib-cab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contrib-av { font-size: 16px; line-height: 1; }
.contrib-cab b { font-size: 13px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contrib-cab small { margin-left: auto; font: 500 11px var(--mono); color: var(--txt-3); white-space: nowrap; }
.contrib-barra { position: relative; display: block; height: 3px; margin: 8px 0; border-radius: 99px; background: var(--linha); overflow: hidden; }
.contrib-barra::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); background: var(--cor, var(--med)); border-radius: inherit; }
.contrib p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--txt-2); }
.contrib-barra + p { margin-top: 0; }
.antes-depois { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.antes-depois p { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--sup); font-size: 12.5px; line-height: 1.5; color: var(--txt-2); }
.antes-depois small { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--txt-3); }

.plano-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; color: var(--txt-3); }
.plano-barra { position: relative; flex: 1; height: 4px; border-radius: 99px; background: var(--linha-2); overflow: hidden; }
.plano-barra::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--ok); border-radius: inherit; transition: width .4s; }
.plano { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.passo { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--linha); background: var(--sup); transition: opacity .2s; }
.passo-cab { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.passo-cab input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ok); cursor: pointer; }
.passo-n { flex: none; font: 600 11px/20px var(--mono); color: var(--txt-3); }
.passo-cab b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.quando { flex: none; margin-top: 1px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--sup-3); color: var(--txt-2); }
.q-hoje { color: var(--erro); background: color-mix(in srgb, var(--erro) 12%, transparent); }
.q-semana { color: var(--alerta); background: color-mix(in srgb, var(--alerta) 12%, transparent); }
.q-mes { color: var(--ciano); background: color-mix(in srgb, var(--ciano) 12%, transparent); }
.passo p { margin: 6px 0 0 46px; font-size: 13px; line-height: 1.5; color: var(--txt-2); }
.passo.feito { opacity: .62; }
.passo.feito .passo-cab b { text-decoration: line-through; text-decoration-color: var(--txt-3); }

.matriz { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--sup); border: 1px solid var(--linha); }
.mq-rot { font: 600 8.5px var(--fonte); letter-spacing: .06em; text-transform: uppercase; }
.mq-div { fill: none; stroke: var(--linha-3); stroke-dasharray: 3 4; }
.mq-eixo { font: 500 8.5px var(--fonte); fill: var(--txt-3); }
.ponto { cursor: pointer; outline: none; }
.ponto circle { stroke: var(--sup); stroke-width: 2; transition: stroke .15s; }
.ponto:hover circle, .ponto:focus-visible circle { stroke: var(--txt); }
.ponto-n { font: 700 9px var(--mono); fill: #fff; pointer-events: none; }

.cards { display: flex; flex-direction: column; gap: 10px; }
.matriz + .cards { margin-top: 12px; }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; scroll-margin: 56px;
  background: var(--sup); border: 1px solid var(--linha); border-left: 3px solid var(--q, var(--linha-3));
}
.card.lacuna { --q: var(--alerta); }
.card.divergencia { --q: var(--med); }
.card.semfonte { --q: var(--alerta); }
.card.especialista { --q: var(--ciano); }
.card.risco { --q: var(--erro); }
.card.risco.g-3 { --q: var(--alerta); }
.card.risco.g-1, .card.risco.g-2 { --q: var(--txt-3); }
.card-cab { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.card-cab > b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.card-n, .grav {
  flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 600 11px var(--mono);
  background: color-mix(in srgb, var(--q, var(--txt-3)) 17%, transparent); color: var(--q, var(--txt-2));
}
.card-ic, .card-av { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--q, var(--txt-2)); }
.card-av { width: 30px; height: 30px; border-radius: 9px; font-size: 17px; background: var(--sup-3); margin-top: -3px; }
.card .tag { color: var(--q, var(--txt-2)); background: color-mix(in srgb, var(--q, var(--txt-3)) 14%, transparent); }
.card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--txt-2); overflow-wrap: anywhere; }
.card .card-sol { padding: 8px 10px; border-radius: 10px; background: var(--sup-3); font-size: 12.5px; color: var(--txt); }
.card-sol small { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--txt-3); }
.card-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.card-pe > .btn { margin-left: auto; }
.card-pe > .btn ~ .btn { margin-left: 0; }
.escala { display: inline-flex; align-items: center; gap: 6px; }
.escala small { font-size: 11px; color: var(--txt-3); }
.pontos-escala { display: inline-flex; gap: 2px; flex: none; }
.pontos-escala i { width: 6px; height: 6px; border-radius: 2px; background: var(--linha-2); }
.pontos-escala i.on { background: var(--q, var(--med)); }
.card-cab > .pontos-escala { margin-top: 7px; }
.pisca { animation: pisca 1.3s ease; }

.perguntas { display: flex; flex-direction: column; gap: 6px; }
.pergunta-sug {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left;
  border: 1px solid var(--linha); background: var(--sup); font-size: 13.5px; line-height: 1.45; transition: border-color .15s, background .15s;
}
.pergunta-sug:hover { border-color: color-mix(in srgb, var(--med) 50%, transparent); background: color-mix(in srgb, var(--med) 6%, var(--sup)); }
.pergunta-sug .ic { color: var(--txt-3); }
.pergunta-sug:hover .ic { color: var(--med); }

/* custo */
.pop-custo { width: 390px; }
.detalhe-custo { display: flex; flex-direction: column; gap: 14px; padding: 14px; max-height: min(560px, calc(100vh - 90px)); overflow-y: auto; overscroll-behavior: contain; }
.modal-custo .detalhe-custo { padding: 0; max-height: none; overflow: visible; }
.custo-sec { display: flex; flex-direction: column; gap: 6px; }
.custo-cab { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; }
.custo-cab > small:first-child { grid-column: 1 / -1; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); }
.custo-cab b { font: 600 22px var(--mono); letter-spacing: -.02em; }
.custo-cab span { font: 400 13px var(--mono); color: var(--txt-3); }
.custo-cab small.mudo { grid-column: 1 / -1; font: 400 11.5px var(--mono); }
.custo-jobs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.custo-jobs li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; font-size: 12.5px; }
.custo-jobs li:hover { background: var(--hover); }
.cj-av { display: grid; place-items: center; font-size: 15px; line-height: 1; }
.cj-nome { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cj-nome b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cj-nome small { font-size: 11px; color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cj-tok { font: 400 11px var(--mono); color: var(--txt-3); white-space: nowrap; }
.cj-usd { min-width: 62px; text-align: right; font: 500 12px var(--mono); white-space: nowrap; }
.custo-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.custo-resumo > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 10px; border-radius: 12px; background: var(--sup-3); }
.custo-resumo small { font-size: 11px; color: var(--txt-3); }
.custo-resumo b { font: 600 14px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custo-resumo span { font: 400 11px var(--mono); color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* historico */
.hist-filtros { display: flex; flex-direction: column; gap: 8px; }
.hist-linha { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hist-resumo { font-size: 12px; color: var(--txt-3); }
.hist-lista { display: flex; flex-direction: column; gap: 6px; }
.hist-item { position: relative; display: flex; align-items: flex-start; border-radius: 12px; border: 1px solid var(--linha); background: var(--sup); transition: border-color .15s; }
.hist-item:hover { border-color: var(--linha-2); }
.hist-item.atual { border-color: color-mix(in srgb, var(--med) 50%, transparent); background: color-mix(in srgb, var(--med) 6%, var(--sup)); }
.hist-abrir { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 4px 10px 12px; text-align: left; border-radius: 12px; }
.hist-abrir.carregando { opacity: .55; pointer-events: none; }
.hist-topo { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11.5px; color: var(--txt-3); }
.hist-topo small { font-size: 11.5px; white-space: nowrap; }
.hist-pt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--txt-3); }
.hist-pt.st-concluida { background: var(--ok); }
.hist-pt.st-cancelada { background: var(--alerta); }
.hist-pt.st-erro { background: var(--erro); }
.hist-pt.st-rodando { background: var(--med); animation: pulsa 1s ease-in-out infinite; }
.hist-quadro { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hist-custo { margin-left: auto; font-family: var(--mono); }
.hist-perg { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hist-ver { font-size: 12.5px; line-height: 1.45; color: var(--txt-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hist-meta { font-size: 11.5px; color: var(--txt-3); }
.hist-apagar { margin: 6px 6px 0 0; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.hist-item:hover .hist-apagar, .hist-apagar:focus-visible { opacity: 1; }
.hist-apagar:hover:not(:disabled) { color: var(--erro); }
.hist-limite { display: block; padding: 8px; text-align: center; }

/* ------------------------------------------------------------------ ajustes */
.aj-modelo, .aj-sobre, .aj-gastos, .aj-geral { display: flex; flex-direction: column; gap: 14px; }
.aj-nota { margin: 0; font-size: 13px; line-height: 1.55; color: var(--txt-2); }
.aj-nota.mudo { font-size: 12px; color: var(--txt-3); }
.aj-aviso { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--alerta); background: color-mix(in srgb, var(--alerta) 12%, transparent); }
.aj-aviso .ic { margin-top: 2px; }
.modelos { display: grid; gap: 8px; }
.modelo-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--linha-2); background: var(--sup); transition: border-color .15s, background .15s, box-shadow .15s;
}
.modelo-card:hover:not(:disabled) { border-color: var(--linha-3); }
.modelo-card.ativo { border-color: var(--med); background: color-mix(in srgb, var(--med) 8%, var(--sup)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--med) 15%, transparent); }
.modelo-card:disabled { opacity: .55; }
.modelo-card.ativo:disabled { opacity: 1; }
.modelo-topo { display: flex; align-items: center; gap: 8px; }
.modelo-topo b { font-size: 15px; font-weight: 600; }
.modelo-card .tag { background: var(--med); color: #fff; }
.modelo-det { font: 400 11.5px var(--mono); color: var(--txt-3); }
.modelo-perfil { font-size: 13px; line-height: 1.5; color: var(--txt-2); }
.modelo-precos { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--txt-3); }
.modelo-precos b { font: 500 12px var(--mono); color: var(--txt); }
.aj-status { min-height: 1.3em; font-size: 12px; color: var(--txt-3); }
.aj-status[data-estado='salvo'] { color: var(--ok); }
.aj-status[data-estado='erro'] { color: var(--erro); }
.aj-sobre textarea.campo { min-height: 200px; }

.gasto-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gasto-card { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border-radius: 12px; background: var(--sup-3); }
.gasto-card > small:first-child { font-size: 11.5px; color: var(--txt-3); }
.gasto-card b { font: 600 18px var(--mono); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gasto-card span { font: 400 12px var(--mono); color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gasto-card small.mudo { font-size: 11px; }
.grafico-caixa { display: flex; flex-direction: column; gap: 6px; }
.grafico { display: block; width: 100%; height: 96px; }
.grafico .toque { fill: transparent; }
.grafico .barra { fill: var(--med); opacity: .8; transition: opacity .15s, fill .15s; }
.grafico .barra.vazia { fill: var(--linha-2); opacity: 1; }
.grafico .dia:hover .barra:not(.vazia) { opacity: 1; fill: var(--ciano); }
.grafico .zero { stroke: var(--linha-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.grafico-eixo { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--txt-3); }
.gasto-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gasto-lista li { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; overflow: hidden; }
.gasto-lista li::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: var(--v, 0%); background: color-mix(in srgb, var(--med) 13%, transparent); }
.gl-nome, .gl-usd { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.gl-usd { align-items: flex-end; flex: none; }
.gl-nome b { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-nome small, .gl-usd small { font-size: 11.5px; color: var(--txt-3); }
.gl-usd b { font: 500 13px var(--mono); }

.linha-cambio { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.linha-cambio .campo { width: 130px; }
.aj-precos { border: 1px solid var(--linha); border-radius: 12px; padding: 0 12px; }
.aj-precos summary { cursor: pointer; padding: 11px 0; font-size: 13px; font-weight: 500; color: var(--txt-2); }
.aj-precos-corpo { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 12px; }
.preco-modelo { display: flex; flex-direction: column; gap: 6px; }
.preco-modelo > b { font-size: 13px; font-weight: 600; }
.preco-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.preco-grade .campo { height: 34px; font-size: 13px; }
.aj-conta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--txt-2); }
.aj-conta > div { display: grid; gap: 2px; min-width: 0; }
.aj-conta b { overflow-wrap: anywhere; }
.atalhos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.atalhos li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--txt-2); }
.teclas { display: inline-flex; gap: 4px; flex: none; }

/* ------------------------------------------------------------------ markdown */
.md { font-size: 14px; line-height: 1.62; color: var(--txt); overflow-wrap: anywhere; }
.md > * { margin: 0; }
.md > * + * { margin-top: .75em; }
.md h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.md h4 { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.md h5, .md h6 { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-2); }
.md > h3:not(:first-child), .md > h4:not(:first-child) { margin-top: 1.2em; }
.md ul, .md ol { padding-left: 1.35em; }
.md li + li { margin-top: .3em; }
.md li > ul, .md li > ol { margin: .3em 0 0; }
.md li::marker { color: var(--txt-3); }
.md strong { font-weight: 600; }
.md code { font: .87em var(--mono); padding: .1em .35em; border-radius: 5px; background: var(--sup-3); border: 1px solid var(--linha); }
.md pre { padding: 12px; border-radius: 10px; background: var(--sup-3); border: 1px solid var(--linha); overflow-x: auto; }
.md pre code { padding: 0; border: 0; background: none; font-size: 12.5px; }
.md blockquote { padding-left: 12px; border-left: 2px solid var(--linha-3); color: var(--txt-2); }
.md hr { border: 0; height: 1px; background: var(--linha); }
.md a { color: var(--med-txt); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--med) 40%, transparent); text-underline-offset: 2px; }
.md-tabela { overflow-x: auto; border: 1px solid var(--linha); border-radius: 10px; }
.md table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md th, .md td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linha); }
.md th { font-weight: 600; background: var(--sup-3); white-space: nowrap; }
.md tr:last-child td { border-bottom: 0; }
.cit {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin: 0 1px; vertical-align: 2px;
  border-radius: 5px; font: 600 10px/1 var(--mono); text-decoration: none !important;
  background: color-mix(in srgb, var(--ciano) 16%, transparent); color: var(--ciano);
}
a.cit:hover { background: color-mix(in srgb, var(--ciano) 28%, transparent); }
.md h4.concorda, .md h4.discorda, .md h4.oport { margin-top: 1.1em; margin-bottom: -2px; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.md h4.concorda { color: var(--ok); }
.md h4.discorda { color: var(--erro); }
.md h4.oport { color: var(--ciano); }
.md .lista { padding-left: 0; }
.md .lista li + li { margin-top: 0; }

/* ------------------------------------------------------------------ entrada */
.tela-entrada {
  position: fixed; inset: 0; z-index: 5; overflow-y: auto; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(60% 45% at 50% 0%, color-mix(in srgb, var(--med) 16%, transparent), transparent 70%),
    radial-gradient(40% 35% at 85% 100%, color-mix(in srgb, var(--ciano) 8%, transparent), transparent 70%),
    var(--bg);
}
.tela-entrada::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--ponto) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent);
}
.entrada-caixa { position: relative; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; animation: sobe .5s ease both; }
.entrada-marca { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.entrada-caixa h1 { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.12; letter-spacing: -.03em; }
.entrada-sub { margin: -6px 0 10px; font-size: 15px; color: var(--txt-2); }
.entrada-form { display: flex; flex-direction: column; gap: 10px; }
.entrada-form .campo { height: 48px; font-size: 16px; }
.entrada-form .campo.codigo { height: 60px; font-size: 26px; }
.entrada-form .btn.largo { height: 48px; font-size: 15px; font-weight: 600; margin-top: 4px; }
.entrada-para { margin: 0; font-size: 14px; color: var(--txt-2); line-height: 1.5; }
.entrada-para b { color: var(--txt); }
.entrada-links { display: flex; justify-content: space-between; gap: 12px; }
.entrada-info { margin: 0; min-height: 1.5em; font-size: 13px; color: var(--txt-2); }
.entrada-info:empty { min-height: 0; }
.entrada-erro { margin: 0; font-size: 13px; color: var(--erro); }
.entrada-caixa.treme { animation: treme .42s ease; }

/* ------------------------------------------------------------------ carregando */
.app.carregando .palco::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--med), var(--ciano), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: varre 1.1s ease-in-out infinite;
}

/* ------------------------------------------------------------------ desktop com gaveta aberta */
@media (min-width: 721px) {
  .app.com-gaveta .compositor { left: calc((100% - var(--larg-gaveta) - 8px) / 2); width: min(760px, calc(100% - var(--larg-gaveta) - 40px)); }
  .app.com-gaveta .banner { left: calc((100% - var(--larg-gaveta) - 8px) / 2); max-width: calc(100% - var(--larg-gaveta) - 40px); }
  .app.com-gaveta ~ .avisos { left: calc((100% - var(--larg-gaveta) - 8px) / 2); }
}

/* ------------------------------------------------------------------ extras: placar, tarefas, material, mesas prontas e recorrentes */
.placar {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 16px; padding: 12px 12px 12px 14px; border-radius: 14px; text-align: left;
  background: var(--sup-3); border: 1px solid var(--linha); color: var(--txt-3); transition: border-color .15s, background .15s;
}
.placar:hover { border-color: var(--linha-3); background: var(--sup-4); }
.placar > .ic { flex: none; margin-left: auto; }
.placar-item { display: flex; flex-direction: column; gap: 1px; flex: 1 1 0; min-width: 0; padding-left: 10px; border-left: 2px solid var(--q, var(--linha-3)); }
.placar-item b { font: 600 20px/1.1 var(--mono); color: var(--txt); }
.placar-item small { font-size: 11.5px; color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.placar-item.concorda { --q: var(--ok); }
.placar-item.dividiu { --q: var(--med); }
.placar-item.semfonte { --q: var(--alerta); }

.btn-tarefa.feita { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.plano-topo > .btn-tarefa { flex: none; }

.tarefa-nova { display: flex; gap: 8px; margin-bottom: 12px; }
.tarefa-nova .campo { flex: 1 1 auto; min-width: 0; }
.tarefa-nova .btn { flex: none; width: 40px; padding: 0; height: auto; }
.chip > small { font: 500 11px var(--mono); color: var(--txt-3); }
.tarefas-resumo { margin: 10px 0 12px; font-size: 12.5px; color: var(--txt-3); line-height: 1.5; }
.tarefas-lista { display: flex; flex-direction: column; gap: 10px; }
.tarefa {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 14px;
  background: var(--sup-3); border: 1px solid var(--linha); border-left: 3px solid var(--q, var(--linha-3));
}
.tarefa.st-teste { --q: var(--med); }
.tarefa.st-feito { --q: var(--txt-3); }
.tarefa.st-feito.res-sim { --q: var(--ok); }
.tarefa.st-feito.res-nao { --q: var(--erro); }
.tarefa.st-descartada { opacity: .62; }
.tarefa.st-descartada .tarefa-tit { text-decoration: line-through; text-decoration-color: var(--txt-3); }
.tarefa-cab { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.tarefa-cab small { font-size: 11.5px; color: var(--txt-3); }
.tarefa-apagar { margin-left: auto; color: var(--txt-3); }
.tarefa-tit { font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.tarefa-det { margin: 0; font-size: 13px; color: var(--txt-2); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.tarefa-res { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tarefa-res small { font-size: 12px; color: var(--txt-2); }
textarea.campo.tarefa-nota { min-height: 56px; font-size: 13px; }
.tarefa-origem { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px; }

.material, .agendas, .ag-form { display: flex; flex-direction: column; gap: 12px; }
.material .modal-sub, .agendas .modal-sub { margin: 0; }
.mat-lista, .ag-lista { display: flex; flex-direction: column; gap: 8px; }
.mat-lista .vazio, .ag-lista .vazio { padding: 14px 0; }
.mat-item { display: flex; align-items: center; gap: 10px; padding: 9px 8px 9px 12px; border-radius: 12px; background: var(--sup-3); border: 1px solid var(--linha); }
.mat-item.desligado .mat-txt, .mat-item.desligado .mat-ic { opacity: .5; }
.mat-ic { flex: none; display: grid; place-items: center; color: var(--med-txt); }
.mat-txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.mat-txt b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-txt small { font: 400 11.5px var(--mono); color: var(--txt-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material > .aj-nota { margin: 0; }
.material > .aj-nota:empty { display: none; }
.aj-nota.alerta { color: var(--alerta); }
.mat-novo { border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; }
.mat-novo .abas { padding: 0 6px; }
.mat-novo .aba-painel { padding: 12px; }
.mat-form { display: flex; flex-direction: column; gap: 10px; }
.mat-form .aj-nota { margin: 0; }
.mat-linha { display: flex; gap: 8px; align-items: center; }
.mat-linha .campo { flex: 1 1 auto; min-width: 0; }
.mat-linha .btn { flex: none; }
.mat-linha.fim { justify-content: space-between; }
.contador.passou { color: var(--alerta); }

.prontas { display: flex; flex-direction: column; gap: 8px; }
.pronta {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; text-align: left;
  background: var(--sup-3); border: 1px solid var(--linha); transition: border-color .15s, background .15s;
}
.pronta:hover { border-color: color-mix(in srgb, var(--med) 55%, transparent); background: var(--sup-4); }
.pronta-av { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--sup-2); }
.pronta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pronta-txt b { font-size: 14px; font-weight: 600; }
.pronta-txt small { font-size: 12.5px; color: var(--txt-2); line-height: 1.45; }
.pronta-txt small.pronta-quem { font-size: 11.5px; color: var(--txt-3); }

.ag-item { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--sup-3); border: 1px solid var(--linha); }
.ag-item.pausada .ag-perg, .ag-item.pausada .ag-cab b { opacity: .6; }
.ag-cab { display: flex; align-items: center; gap: 8px; color: var(--med-txt); }
.ag-cab b { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-perg { margin: 0; font-size: 13px; color: var(--txt-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ag-meta { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--txt-3); }
.ag-meta .btn-link { font-size: 12px; padding: 0 2px; }
.ag-pe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ag-pe .perigo-texto { margin-left: auto; }
.ag-form textarea.campo { min-height: 110px; }
.ag-form .aj-nota { margin: 0; }
.ag-quando { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select.campo {
  padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A8A95' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
select.campo option { background: var(--sup-2); color: var(--txt); }

/* ------------------------------------------------------------------ celular */
@media (max-width: 720px) {
  .topo { padding-left: calc(10px + env(safe-area-inset-left)); padding-right: calc(10px + env(safe-area-inset-right)); }
  .btn-quadro { max-width: none; gap: 8px; padding: 0 10px 0 8px; }
  .custo { padding: 0 10px; gap: 6px; }
  .topo .btn-icone { width: 42px; }
  .ferramentas { left: auto; right: calc(10px + env(safe-area-inset-right)); top: calc(env(safe-area-inset-top) + 64px); transform: none; padding: 4px; border-radius: 14px; }
  .ferr { width: 38px; height: 38px; }
  .app.em-replay .ferramentas { top: calc(env(safe-area-inset-top) + 124px); }
  /* Os avisos param antes da coluna de ferramentas, para nao tampar o "Novo agente". */
  .avisos { left: calc(10px + env(safe-area-inset-left)); right: calc(68px + env(safe-area-inset-right)); width: auto; transform: none; }
  /* Com uma folha aberta o aviso sobe para a barra do topo e nao tampa o cabecalho dela. */
  .app.com-gaveta ~ .avisos { top: calc(env(safe-area-inset-top) + 8px); }
  body:has(.veu.visivel) .avisos, body:has(.balao.folha.visivel) .avisos { top: calc(env(safe-area-inset-top) + 8px); }
  .banner { width: calc(100% - 20px); max-width: none; padding-left: 12px; }
  .compositor { width: calc(100% - 20px); bottom: calc(10px + env(safe-area-inset-bottom) + var(--teclado, 0px)); }
  .caixa-pergunta { padding: 9px 9px 8px 12px; border-radius: 16px; }
  #pergunta { max-height: 140px; }
  .modos button { padding: 0 9px; }
  .dica-vazia { bottom: calc(env(safe-area-inset-bottom) + 150px); }

  .veu { align-items: flex-end; padding: 0; }
  .modal, .modal-pequeno, .modal-lista, .modal-agente, .modal-equipe, .modal-custo, .modal-ajustes, .modal-material, .modal-agenda {
    width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: 0;
    transform: translateY(100%); opacity: 1; transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  }
  .modal-ajustes { height: 92dvh; }
  .veu.visivel .modal { transform: none; }
  .modal .puxador { display: flex; }
  .modal-cab { padding: 0 10px 8px 18px; }
  .modal-corpo { padding: 4px 18px 18px; }
  .modal-pe { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .modal-pe .btn { flex: 1 1 auto; }
  .modal-pe .btn.esquerda { flex: 0 0 auto; }
  .abas-ajustes { margin: 0 -18px 14px; padding: 0 10px; }
  .chips-modelos { margin: 0 -18px; padding: 0 18px 2px; }

  .gaveta {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92dvh;
    border-radius: 20px 20px 0 0; border-bottom: 0; transform: translateY(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
  }
  .gaveta.aberta { transform: none; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  .gaveta .puxador { display: flex; }
  .gaveta-cab { padding-top: 0; }
  .veu-gaveta { display: block; position: fixed; inset: 0; z-index: 39; background: var(--veu); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.com-gaveta .veu-gaveta { opacity: 1; pointer-events: auto; }
  .gaveta-pe .btn { padding: 0 10px; }
  .antes-depois { grid-template-columns: 1fr; }
  .hist-apagar { opacity: 1; }

  .balao.folha {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: 80dvh;
    border-radius: 20px 20px 0 0; border-bottom: 0; transform: translateY(100%); transform-origin: 50% 100%;
    transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .16s;
  }
  .balao.folha.visivel { transform: none; }
  .balao.folha .balao-cauda { display: none; }
  .balao.folha .puxador { display: flex; }
  .balao.folha .balao-cab { padding-top: 0; }
  .balao.folha .balao-pe { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

  .gasto-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gasto-cards > :first-child { grid-column: 1 / -1; }
  .custo-resumo b { font-size: 13px; }
}

@media (max-width: 520px) {
  .estimativa { display: none; }
  #btn-tarefas { display: none; }
  .placar { gap: 6px; padding: 10px; }
  .placar-item b { font-size: 18px; }
  .ag-quando { grid-template-columns: 1fr; }
  #btn-equipe { width: 36px; padding: 0; }
  #btn-equipe > span { display: none; }
  .comp-pe .btn.rodar { margin-left: auto; }
  .quadro-txt small { display: none; }
  .resumo-med b { font-size: 15px; }
}

@media (max-width: 380px) {
  .custo > .ic { display: none; }
  .modos button { padding: 0 7px; font-size: 12px; }
  .btn.rodar { padding: 0 12px; }
}

@media (pointer: coarse) {
  .campo, textarea.campo, #pergunta { font-size: 16px; }
  .porta { width: 14px; height: 14px; }
  .palco.dir-h .porta.entrada, .palco.dir-h .porta.saida { margin-top: -7px; }
  .palco.dir-v .porta.entrada, .palco.dir-v .porta.saida { margin-left: -7px; }
  .palco.dir-h .porta.entrada { left: -8px; }
  .palco.dir-h .porta.saida { right: -8px; }
  .palco.dir-v .porta.entrada { top: -8px; }
  .palco.dir-v .porta.saida { bottom: -8px; }
  .porta.saida::after { inset: -16px; }
  .hist-apagar { opacity: 1; }
}

/* ------------------------------------------------------------------ animacoes */
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes anel { to { --ang: 360deg; } }
@keyframes fluxo { to { stroke-dashoffset: -28; } }
@keyframes pulsa { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes no-entra { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes aparece { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes sobe { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes pisca { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25%, 65% { box-shadow: 0 0 0 2px var(--q, var(--med)); } }
@keyframes treme { 0%, 100% { translate: 0 0; } 20%, 60% { translate: -7px 0; } 40%, 80% { translate: 7px 0; } }
@keyframes varre { from { background-position: -50% 0; } to { background-position: 150% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
