/* Cobranças · Baêsso Contabilidade
   Identidade: azul Baêsso, marinho, Archivo e a lua prata do logo. */

:root {
  --azul: #0457D8;
  --azul-escuro: #0346B0;
  --azul-suave: #E9F1FE;
  --marinho: #0B1B3D;
  --fundo: #F4F6F9;
  --superficie: #FFFFFF;
  --linha: #E3E7ED;
  --linha-forte: #CDD3DD;
  --texto: #0B1B3D;
  --texto-2: #566074;
  --texto-3: #8A93A6;

  --vermelho: #C2372D;
  --vermelho-suave: #FCEDEC;
  --ambar: #9A5B00;
  --ambar-suave: #FFF3DA;
  --verde: #12805C;
  --verde-suave: #E4F5EE;

  --raio: 14px;
  --raio-p: 10px;
  --sombra: 0 1px 2px rgba(11, 27, 61, .05), 0 10px 30px -18px rgba(11, 27, 61, .18);
  --sombra-forte: 0 24px 60px -20px rgba(11, 27, 61, .35);
  --fonte: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(4, 87, 216, .35); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.numero {
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tabular { font-variant-numeric: tabular-nums; }
.mudo { color: var(--texto-2); }
.fraco { color: var(--texto-3); }

/* ------------------------------------------------------------ carregando */
.carregando { min-height: 100vh; display: grid; place-items: center; }
.carregando img { animation: pulsar 1.4s ease-in-out infinite; }
@keyframes pulsar { 50% { opacity: .35; transform: scale(.94); } }

/* ------------------------------------------------------------ botões */
.btn {
  --cor: var(--texto);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--linha-forte); border-radius: var(--raio-p);
  background: var(--superficie); color: var(--cor);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: #F7F9FC; border-color: #B9C1CE; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-escuro); border-color: var(--azul-escuro); }
.btn-whats { background: var(--marinho); border-color: var(--marinho); color: #fff; }
.btn-whats:hover { background: #142a57; border-color: #142a57; }
.btn-pago { --cor: var(--verde); }
.btn-pago:hover { background: var(--verde-suave); border-color: #9fd7bf; }
.btn-perigo { --cor: var(--vermelho); }
.btn-perigo:hover { background: var(--vermelho-suave); border-color: #eab2ad; }
.btn-perigo-cheio { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.btn-perigo-cheio:hover { background: #a42c23; border-color: #a42c23; }
.btn-p { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-icone { width: 34px; height: 34px; padding: 0; }
.btn-texto {
  border: 0; background: none; padding: 0; height: auto;
  color: var(--azul); font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn-texto:hover { text-decoration: underline; background: none; }
.btn-texto.mudo { color: var(--texto-2); }

/* ------------------------------------------------------------ login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-marca {
  position: relative; overflow: hidden;
  background: var(--marinho); color: #fff;
  padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-marca .lua { position: absolute; width: 900px; height: 900px; right: -430px; top: 50%; transform: translateY(-50%) rotate(-18deg); opacity: .16; }
.login-marca .assinatura { position: relative; display: flex; align-items: center; gap: 16px; }
.login-marca .assinatura img { width: 64px; height: 64px; }
.login-marca .assinatura b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.login-marca .assinatura small { display: block; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: #9AA5BC; margin-top: 2px; }
.login-marca h1 { position: relative; font-size: 52px; line-height: 1.02; letter-spacing: -.035em; margin: 0; max-width: 460px; font-weight: 700; }
.login-marca h1 span { color: #8FB4FF; }
.login-marca p { position: relative; color: #B9C2D4; max-width: 400px; margin: 18px 0 0; font-size: 16px; }
.login-marca .rodape { position: relative; font-size: 12px; color: #7D89A3; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--superficie); }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 6px; }
.login-form .mudo { margin: 0 0 28px; }
.login-form .btn { width: 100%; height: 46px; font-size: 15px; margin-top: 8px; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-marca { padding: 32px 24px; min-height: 260px; }
  .login-marca h1 { font-size: 34px; }
  .login-marca .rodape { display: none; }
}

/* ------------------------------------------------------------ topo e navegação */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linha);
}
.topo-conteudo { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.topo .marca { display: flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; }
.topo .marca img { width: 34px; height: 34px; }
.topo .marca b { font-size: 17px; letter-spacing: -.02em; }
.topo .marca span { font-size: 13px; color: var(--texto-3); border-left: 1px solid var(--linha-forte); padding-left: 10px; margin-left: 2px; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 9px;
  color: var(--texto-2); font-weight: 600; font-size: 14px; text-decoration: none;
}
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { background: var(--fundo); color: var(--texto); }
.nav a[aria-current='page'] { background: var(--azul-suave); color: var(--azul); }
.topo .direita { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--texto-2); }
@media (max-width: 760px) {
  .topo-conteudo { padding: 0 14px; gap: 10px; }
  .topo .marca span, .nav a span, .topo .data-hoje { display: none; }
}

/* ------------------------------------------------------------ página */
.pagina { max-width: 1240px; margin: 0 auto; padding: 32px 28px 80px; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.cabecalho h1 { font-size: 30px; letter-spacing: -.03em; margin: 0; line-height: 1.1; }
.cabecalho p { margin: 6px 0 0; color: var(--texto-2); }
.cabecalho .acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) { .pagina { padding: 22px 14px 80px; } .cabecalho h1 { font-size: 24px; } }

.busca { position: relative; }
.busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--texto-3); pointer-events: none; }
.busca input { width: 260px; height: 38px; padding: 0 12px 0 38px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: var(--superficie); }
.busca input:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px rgba(4, 87, 216, .14); }
@media (max-width: 760px) { .busca input { width: 100%; } .busca { flex: 1; } }

/* ------------------------------------------------------------ resumo */
.resumo { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; margin-bottom: 30px; }
.cartao { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); }
.resumo .cartao { padding: 22px 24px; position: relative; overflow: hidden; min-height: 150px; display: flex; flex-direction: column; }
.resumo .rotulo { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); }
.resumo .valor { font-size: 40px; margin-top: auto; padding-top: 18px; }
.resumo .valor small { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-left: 6px; }
.resumo .valor small.pre { margin: 0 5px 0 0; }
.resumo .detalhe { font-size: 13px; color: var(--texto-2); margin-top: 8px; }
.resumo .destaque { background: var(--azul); border-color: var(--azul); color: #fff; }
.resumo .destaque .rotulo, .resumo .destaque .detalhe { color: rgba(255, 255, 255, .82); }
.resumo .destaque .lua { position: absolute; width: 360px; height: 360px; right: -150px; top: -95px; opacity: .3; transform: rotate(-28deg); }
.resumo .destaque > *:not(.lua) { position: relative; }
.barra { height: 6px; border-radius: 99px; background: var(--fundo); margin-top: 12px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--verde); border-radius: 99px; }
@media (max-width: 960px) { .resumo { grid-template-columns: 1fr; } .resumo .cartao { min-height: 0; } }

/* ------------------------------------------------------------ painel */
.painel-grade { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 1080px) { .painel-grade { grid-template-columns: 1fr; } }
.secao + .secao { margin-top: 30px; }
.secao-titulo { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.secao-titulo .ponto { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.secao-titulo .qtd { font-size: 12px; font-weight: 700; color: var(--texto-2); background: var(--superficie); border: 1px solid var(--linha); border-radius: 99px; padding: 1px 9px; }
.secao-titulo .dica { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--texto-3); }
.cor-a_cobrar { color: var(--vermelho); }
.cor-cobrado { color: var(--ambar); }
.cor-em_breve { color: var(--azul); }
.cor-pago { color: var(--verde); }

.lista { display: grid; gap: 10px; }
.linha-cobranca {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 16px 20px 16px 22px; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio);
  box-shadow: var(--sombra); transition: border-color .15s;
}
.linha-cobranca:hover { border-color: var(--linha-forte); }
.linha-cobranca.status-a_cobrar { box-shadow: inset 3px 0 0 var(--vermelho), var(--sombra); }
.linha-cobranca.status-cobrado { box-shadow: inset 3px 0 0 #E2A33B, var(--sombra); }
.linha-cobranca.atencao { background: #FFFCF5; border-color: #F2D6A2; }
.aviso-de-novo {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 99px;
  background: #FFE4B8; color: #7A4300; font-weight: 700; font-size: 12px; white-space: nowrap;
}
.aviso-de-novo svg { width: 14px; height: 14px; }
.linha-cobranca .nome { font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--texto); }
.linha-cobranca .nome:hover { color: var(--azul); }
.linha-cobranca .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 12.5px; color: var(--texto-2); }
.linha-cobranca .lado { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.linha-cobranca .total { font-size: 20px; }
.linha-cobranca .botoes { display: flex; gap: 8px; }
@media (max-width: 680px) {
  .linha-cobranca { grid-template-columns: minmax(0, 1fr); }
  .linha-cobranca .lado { flex-direction: row; justify-content: space-between; align-items: center; }
}

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.chip-a_cobrar { background: var(--vermelho-suave); color: var(--vermelho); }
.chip-cobrado { background: var(--ambar-suave); color: var(--ambar); }
.chip-em_breve { background: var(--azul-suave); color: var(--azul); }
.chip-pago { background: var(--verde-suave); color: var(--verde); }
.chip-futuro { background: var(--fundo); color: var(--texto-2); border-color: var(--linha); }
.chip-neutro { background: var(--fundo); color: var(--texto-2); border-color: var(--linha); }
.chip-inativo { background: #EEF0F4; color: #5B6476; }

.compacta { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.item-compacto { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 13px 16px; }
.item-compacto + .item-compacto { border-top: 1px solid var(--linha); }
.item-compacto .nome { font-weight: 650; font-weight: 600; color: var(--texto); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-compacto .nome:hover { color: var(--azul); }
.item-compacto .sub { font-size: 12.5px; color: var(--texto-2); }
.item-compacto .lado { display: flex; align-items: center; gap: 8px; grid-row: span 2; }
.item-compacto .valor-p { font-weight: 700; font-size: 14px; }

.vazio {
  position: relative; overflow: hidden;
  padding: 26px 22px; border: 1px dashed var(--linha-forte); border-radius: var(--raio);
  color: var(--texto-2); font-size: 14px; background: rgba(255, 255, 255, .55);
}
.vazio b { display: block; color: var(--texto); font-size: 15px; margin-bottom: 2px; }
.vazio.grande { padding: 56px 24px; text-align: center; }
.vazio.grande .lua { width: 120px; height: 120px; margin: 0 auto 18px; opacity: .9; }
.vazio.grande .btn { margin-top: 18px; }

/* ------------------------------------------------------------ tabela */
.tabela-caixa { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); overflow: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-3);
  padding: 13px 16px; border-bottom: 1px solid var(--linha); background: #FAFBFD; white-space: nowrap;
}
.tabela td { padding: 13px 16px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr.clicavel { cursor: pointer; }
.tabela tbody tr.clicavel:hover td { background: #F8FAFD; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .nome-cel a { color: inherit; display: block; }
.tabela .nome-cel a:hover { color: var(--azul); text-decoration: none; }
.tabela .nome-cel b { display: block; font-weight: 700; }
.tabela .nome-cel span { font-size: 13px; color: var(--texto-2); }
.tabela .acoes-cel { text-align: right; white-space: nowrap; }
.tabela .acoes-cel .btn + .btn, .tabela .acoes-cel .btn + .btn-espaco { margin-left: 6px; }
.btn-espaco { display: inline-block; width: 34px; vertical-align: middle; }
.tabela tr.inativo td { color: var(--texto-3); }
.envios-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.envio-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px 2px 8px; border-radius: 99px; background: var(--fundo); border: 1px solid var(--linha); }
.envio-tag button { border: 0; background: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--texto-3); cursor: pointer; padding: 0; }
.envio-tag button:hover { background: var(--vermelho-suave); color: var(--vermelho); }
.envio-tag button svg { width: 12px; height: 12px; }

/* ------------------------------------------------------------ segmentado */
.segmentado { display: inline-flex; background: #E9EDF2; border-radius: 10px; padding: 3px; }
.segmentado button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--texto-2); cursor: pointer; }
.segmentado button[aria-pressed='true'] { background: var(--superficie); color: var(--texto); box-shadow: 0 1px 2px rgba(11, 27, 61, .12); }

/* ------------------------------------------------------------ detalhe do cliente */
.voltar { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--texto-2); margin-bottom: 18px; }
.voltar svg { width: 16px; height: 16px; }
.ficha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 26px; }
.ficha > div { padding: 18px 20px; }
.ficha > div + div { border-left: 1px solid var(--linha); }
.ficha dt { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-3); }
.ficha dd { margin: 6px 0 0; font-weight: 600; font-size: 15px; }
.ficha .obs { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--linha); color: var(--texto-2); font-size: 14px; }
@media (max-width: 860px) { .ficha { grid-template-columns: 1fr 1fr; } .ficha > div:nth-child(3) { border-left: 0; } .ficha > div:nth-child(n+3) { border-top: 1px solid var(--linha); } }
.titulo-cliente { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.em-aberto-resumo { display: flex; align-items: baseline; gap: 10px; }

/* ------------------------------------------------------------ formulários */
.campo { display: grid; gap: 6px; margin-bottom: 16px; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--texto); }
.campo > span em { font-style: normal; color: var(--texto-3); font-weight: 500; }
.campo input, .campo select, .campo textarea {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: var(--superficie);
  transition: border-color .15s, box-shadow .15s;
}
.campo textarea { height: auto; min-height: 150px; padding: 11px 12px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px rgba(4, 87, 216, .14); }
.campo .ajuda { font-size: 12.5px; color: var(--texto-2); }
.campo.invalido input, .campo.invalido select { border-color: var(--vermelho); }
.campo .msg-erro { font-size: 12.5px; color: var(--vermelho); font-weight: 600; }
.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
@media (max-width: 560px) { .duas-colunas { grid-template-columns: 1fr; } }
.campo-senha { position: relative; display: block; }
.campo .campo-senha input { padding-right: 46px; }
.ver-senha {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 34px; border: 0; border-radius: 8px; background: none;
  display: grid; place-items: center; color: var(--texto-3); cursor: pointer;
}
.ver-senha:hover { color: var(--texto); background: var(--fundo); }
.ver-senha[aria-pressed='true'] { color: var(--azul); }
.ver-senha svg { width: 18px; height: 18px; }
.prefixo { position: relative; }
.prefixo b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--texto-3); font-size: 14px; }
.prefixo input { padding-left: 38px; }
.alerta { padding: 12px 14px; border-radius: var(--raio-p); font-size: 13.5px; font-weight: 500; margin-bottom: 16px; }
.alerta-erro { background: var(--vermelho-suave); color: var(--vermelho); }
.alerta-info { background: var(--azul-suave); color: var(--azul-escuro); }
.opcoes { display: grid; gap: 10px; }
.opcao {
  display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); cursor: pointer; background: var(--superficie);
}
.opcao:has(input:checked) { border-color: var(--azul); background: #F5F9FF; box-shadow: 0 0 0 1px var(--azul); }
.opcao input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--azul); }
.opcao b { display: block; font-size: 14px; }
.opcao span { font-size: 13px; color: var(--texto-2); }
.checks { display: grid; gap: 8px; margin-bottom: 16px; }
.check {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); cursor: pointer;
}
.check:has(input:checked) { border-color: var(--verde); background: #F4FBF8; }
.check input { width: 18px; height: 18px; accent-color: var(--verde); margin: 0; }

/* ------------------------------------------------------------ configurações */
.config-grade { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.config-menu { position: sticky; top: 90px; display: grid; gap: 2px; }
.config-menu a { padding: 9px 12px; border-radius: 9px; color: var(--texto-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.config-menu a:hover { background: var(--superficie); color: var(--texto); }
.bloco { padding: 26px 28px; margin-bottom: 20px; scroll-margin-top: 90px; }
.bloco h2 { font-size: 19px; letter-spacing: -.02em; margin: 0 0 4px; }
.bloco > p.mudo { margin: 0 0 22px; font-size: 14px; }
.bloco .rodape-bloco { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--linha); margin: 8px -28px -26px; padding: 16px 28px; background: #FAFBFD; border-radius: 0 0 var(--raio) var(--raio); }
@media (max-width: 900px) { .config-grade { grid-template-columns: 1fr; } .config-menu { display: none; } .bloco { padding: 20px 18px; } .bloco .rodape-bloco { margin: 8px -18px -20px; padding: 14px 18px; } }
.editor-msg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 20px; margin-bottom: 18px; }
@media (max-width: 1080px) { .editor-msg { grid-template-columns: 1fr; } }
.variaveis { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.variaveis button {
  border: 1px dashed #9DB8E8; background: var(--azul-suave); color: var(--azul-escuro);
  border-radius: 7px; height: 26px; padding: 0 8px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: ui-monospace, Consolas, monospace;
}
.variaveis button:hover { background: #dbe8fd; }
.previa { background: #EFE7DD; border-radius: var(--raio); padding: 18px; min-height: 100%; display: flex; flex-direction: column; }
.previa .rotulo-previa { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8B7E6E; margin-bottom: 12px; }
.bolha {
  align-self: flex-end; max-width: 92%; background: #D9FDD3; border-radius: 10px 0 10px 10px; padding: 9px 12px 20px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: #111B21;
}
.bolha::after { content: attr(data-hora); position: absolute; right: 8px; bottom: 4px; font-size: 11px; color: #667781; }

/* ------------------------------------------------------------ modal */
.modal {
  border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 28px));
  box-shadow: var(--sombra-forte); color: var(--texto); background: var(--superficie);
}
.modal::backdrop { background: rgba(11, 27, 61, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: entrar .18s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-cabeca { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-cabeca h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.modal-cabeca p { margin: 4px 0 0; font-size: 14px; color: var(--texto-2); }
.modal-corpo { padding: 20px 24px 6px; max-height: calc(100vh - 220px); overflow: auto; }
.modal-pe { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; }

/* ------------------------------------------------------------ toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 10px; width: max-content; max-width: calc(100vw - 28px); }
.toast {
  display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 18px; border-radius: 12px;
  background: var(--marinho); color: #fff; box-shadow: var(--sombra-forte); font-size: 14px; font-weight: 500;
  animation: subir .2s ease-out; position: relative; overflow: hidden;
}
.toast.erro { background: var(--vermelho); }
.toast button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, .24); }
.toast .tempo { position: absolute; left: 0; bottom: 0; height: 3px; background: #8FB4FF; animation: tempo linear forwards; }
@keyframes subir { from { opacity: 0; transform: translateY(10px); } }
@keyframes tempo { from { width: 100%; } to { width: 0; } }
.toast svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ menu suspenso */
.menu-mais { position: relative; }
.menu-mais .itens {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px;
  background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; box-shadow: var(--sombra-forte); padding: 6px;
}
.menu-mais .itens button {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left;
  padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.menu-mais .itens button:hover { background: var(--fundo); }
.menu-mais .itens button.perigo { color: var(--vermelho); }
.menu-mais .itens svg { width: 16px; height: 16px; }

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