/* ============ pagar.biz ============ */
:root {
  --cor: #1c1c1f;
  --cor-escura: #000000;
  --cor-clara: #ececee;
  --lateral: #0b0b0c;
  --fundo: #f4f4f5;
  --cartao: #ffffff;
  --texto: #18181b;
  --suave: #71717a;
  --borda: #e4e4e7;
  --erro: #d93025;
  --alerta: #f2a900;
  --raio: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo); color: var(--texto); font-size: 15px; line-height: 1.5;
}
a { color: var(--cor-escura); }
h1 { font-size: 1.5rem; margin: 0 0 1.1rem; }
h1 .mini { font-weight: 400; font-size: .9rem; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
h3 { font-size: .95rem; margin: 1.1rem 0 .4rem; }
code { background: #eeeef0; padding: .1rem .35rem; border-radius: 4px; font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--borda); margin: 1rem 0; }

/* ---------- Estrutura com menu lateral ---------- */
.app { display: flex; min-height: 100vh; }
.lateral {
  width: 240px; flex: none; background: var(--lateral); color: #d4d4d8;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.marca { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem .8rem; color: #fff; }
.marca .logo { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; background: #0A0A0A; display: grid; place-items: center; overflow: hidden; }
.marca .logo img { width: 46px; height: 46px; display: block; }
.marca strong { display: block; letter-spacing: .5px; }
.marca small { display: block; opacity: .7; font-size: .78rem; margin-top: -3px; }
.lateral nav { flex: 1; padding: .3rem .6rem 1rem; }
.lateral .grupo { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .5; margin: 1rem .6rem .3rem; }
.lateral nav a {
  display: flex; align-items: center; gap: .6rem; padding: .48rem .65rem; border-radius: 8px;
  color: #d4d4d8; text-decoration: none; font-size: .93rem;
}
.lateral nav a span { width: 1.3rem; text-align: center; }
.lateral nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.lateral nav a.ativo { background: #26262a; color: #fff; box-shadow: inset 3px 0 0 #b0ee32; }
.lateral nav a.sair { margin-top: .8rem; opacity: .75; }
.quem-sou { padding: .8rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .88rem; color: #fff; }
.quem-sou small { display: block; opacity: .6; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.barra-mobile { display: none; }
.conteudo { width: 100%; max-width: 1150px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }

/* ---------- Cartões e grades ---------- */
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.15rem 1.3rem; margin-bottom: 1.2rem; }
.cartao.estreito { max-width: 440px; }
.cartao.destaque { border-color: var(--cor); box-shadow: 0 0 0 3px var(--cor-clara); }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.grade .cartao { margin-bottom: 0; }
.grade-grupos { grid-template-columns: minmax(240px, 300px) 1fr 1fr; }
.titulo-linha { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.titulo-linha h1 { margin: 0; }

/* ---------- Formulários ---------- */
label { display: block; margin: .55rem 0; font-weight: 500; }
input, textarea, select {
  width: 100%; padding: .58rem .72rem; margin-top: .25rem; border: 1px solid var(--borda); border-radius: 8px;
  font: inherit; background: #fff; color: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--cor); border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; accent-color: var(--cor); }
input.cor { width: 54px; height: 40px; padding: 2px; }
textarea { resize: vertical; }
button, .botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  background: var(--cor); color: #fff; border: 1px solid var(--cor); border-radius: 8px; padding: .6rem 1.1rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .botao:hover { background: var(--cor-escura); border-color: var(--cor-escura); }
button:disabled { opacity: .55; cursor: wait; }
button.secundario, .botao.secundario { background: #fff; color: var(--cor-escura); border-color: var(--borda); }
button.secundario:hover, .botao.secundario:hover { background: var(--cor-clara); border-color: var(--cor); }
button.perigo { background: #fff; color: var(--erro); border-color: #f3c7c3; }
button.perigo:hover { background: #fdecea; }
button.sucesso { background: #16a34a; border-color: #16a34a; }
button.pequeno, .botao.pequeno { padding: .32rem .65rem; font-size: .82rem; font-weight: 600; }
button.link { background: none; border: 0; color: var(--cor-escura); padding: 0; font-weight: 500; text-decoration: underline; }
button.link:hover { background: none; color: var(--cor); }
form.inline { display: inline; }
.linha { display: flex; gap: .7rem; align-items: flex-end; flex-wrap: wrap; }
.linha > label { flex: 1; min-width: 170px; }
.linha > select { width: auto; flex: 0 0 auto; margin: 0; }
.check { display: flex; align-items: center; gap: .45rem; font-weight: 400; }
.mini { color: var(--suave); font-size: .84rem; margin: .3rem 0; }
.bloco { display: block; margin: 0; }
.centro { text-align: center; }
.nowrap { white-space: nowrap; }
.erro-txt { color: var(--erro); }
.campo-botao { display: flex; gap: .4rem; align-items: center; margin-top: .25rem; }
.campo-botao input { margin: 0; }
.lista-ajuda { padding-left: 1.1rem; margin: .4rem 0; }
.lista-ajuda li { margin: .25rem 0; }
.lista-ajuda.colunas { columns: 2; }
pre.codigo { background: #0b0b0c; color: #e4e4e7; padding: .8rem 1rem; border-radius: 8px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }
details summary { cursor: pointer; color: var(--cor-escura); font-weight: 500; }

/* Interruptor */
.interruptor { display: flex; align-items: center; gap: .7rem; cursor: pointer; margin: .7rem 0; font-weight: 500; }
.interruptor input { display: none; }
.interruptor span { width: 44px; height: 24px; flex: none; background: #c5cfca; border-radius: 99px; position: relative; transition: .2s; }
.interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; }
.interruptor input:checked + span { background: var(--cor); }
.interruptor input:checked + span::after { left: 23px; }

/* Avisos e selos */
.aviso { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.1rem; }
.aviso.ok { background: var(--cor-clara); color: var(--cor-escura); }
.aviso.erro { background: #fdecea; color: #a52a20; }
.aviso.alerta { background: #fff6dc; color: #6e5300; border: 1px solid #f5d77a; }
.aviso.decisao p { margin: 0 0 .6rem; }
.selo { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.selo.verde { background: #dcfce7; color: #166534; }
.selo.vermelho { background: #fee2e2; color: #991b1b; }
.selo.amarelo { background: #fef3c7; color: #92400e; }
.selo.azul { background: #dbeafe; color: #1e40af; }
.selo.cinza { background: #eceff1; color: #546e7a; }
.vazio { color: var(--suave); text-align: center; padding: 1.4rem; }

/* Chips / abas */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .8rem; border-radius: 99px; border: 1px solid var(--borda);
  background: #fff; color: var(--texto); text-decoration: none; font-size: .86rem; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--cor); background: #fff; color: var(--texto); }
.chip.ativo { background: var(--cor); border-color: var(--cor); color: #fff; }
.chips.pequenos .chip { padding: .2rem .6rem; font-size: .8rem; }
.bolinha { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, #999); display: inline-block; }
.abas { display: flex; background: #e6ebe8; border-radius: 10px; padding: 3px; }
.abas a { padding: .4rem 1rem; border-radius: 8px; text-decoration: none; color: var(--texto); font-weight: 500; font-size: .9rem; }
.abas a.ativo { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.barra-filtros { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.barra-filtros .chips { flex: 1; }
.barra-filtros .busca input { margin: 0; min-width: 220px; }

/* Etiquetas */
.etq { display: inline-block; font-style: normal; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 99px;
  background: color-mix(in srgb, var(--cor) 16%, white); color: color-mix(in srgb, var(--cor) 75%, black); margin: 0 .2rem .15rem 0; }
.etqs-escolha { display: flex; flex-wrap: wrap; gap: .3rem; margin: .5rem 0; }
.etq-check { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-size: .82rem; font-weight: 500; padding: .2rem .55rem;
  border-radius: 99px; border: 1px solid color-mix(in srgb, var(--cor, #888) 40%, white); cursor: pointer; }
.etqs-lista { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.etq-item { display: inline-flex; align-items: center; gap: .2rem; }

/* Tabelas */
.tabela { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { color: var(--suave); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td.acoes { min-width: 210px; }
td.acoes > form, td.acoes > a { display: inline-block; margin: 0 .2rem .3rem 0; vertical-align: top; }
td.acoes form { margin: 0 .2rem .3rem 0; }
tr.detalhe td { border-top: 0; padding-top: 0; }
.historico { margin: .4rem 0; padding-left: 1.1rem; font-size: .85rem; color: var(--suave); }

/* BotPay */
.resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.resumo .num { margin: 0; }
.resumo .num span { display: block; color: var(--suave); font-size: .85rem; }
.resumo .num strong { font-size: 1.45rem; }
.resumo .num small { display: block; color: var(--suave); }
.resumo .num.vermelho strong { color: var(--erro); }
.resumo .num.verde strong { color: #15803d; }
.feriados { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem .8rem; font-size: .85rem; margin-top: .6rem; color: var(--suave); }
.barra-salvar { position: sticky; bottom: 0; background: var(--fundo); padding: .8rem 0; text-align: right; border-top: 1px solid var(--borda); z-index: 2; }

/* Bot (menu) */
.opcao { border: 1px solid var(--borda); border-radius: 10px; padding: .8rem; margin-bottom: .8rem; background: #fafcfb; }
.opcao .linha { align-items: center; flex-wrap: nowrap; }
.opcao .linha input { margin: 0; }
.opcao input.chave { width: 70px; flex: none; text-align: center; font-weight: 700; }
.opcao textarea { margin-top: .5rem; }
.remover { background: transparent; color: var(--erro); border: 1px solid var(--borda); padding: .5rem .7rem; flex: none; }
.remover:hover { background: #fdecea; border-color: #f3c7c3; }
.dias { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.balao { background: #dcf8c6; border-radius: 10px; padding: .8rem 1rem; max-width: 420px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.status { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.bola { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.bola.verde { background: #25d366; } .bola.amarela { background: #f1c40f; } .bola.vermelha { background: var(--erro); }
.cartao.centro { text-align: center; }
.qr { width: 260px; max-width: 100%; border: 8px solid #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.1); }

/* Perfil / grupos / status */
.perfil-topo { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.lista-grupos { max-height: 520px; overflow-y: auto; margin-top: .6rem; }
.lista-grupos a { display: block; padding: .5rem .6rem; border-radius: 8px; text-decoration: none; color: var(--texto); }
.lista-grupos a:hover { background: #f2f6f4; }
.lista-grupos a.ativo { background: var(--cor-clara); }
.lista-grupos a .mini { display: block; margin: 0; }
.lista-status { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-status li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--borda); }
.lista-status form { margin: 0; }
.previa-status { color: #fff; border-radius: 12px; min-height: 140px; display: grid; place-items: center; text-align: center; padding: 1rem; font-size: 1.15rem; white-space: pre-wrap; margin: .6rem 0; }

/* ============ Chat ============ */
.conteudo:has(.chat) { max-width: none; padding: 1rem; display: flex; flex-direction: column; height: 100vh; }
.conteudo:has(.chat) > .aviso, .conteudo:has(.chat) > .faixa-risco { flex: none; margin-bottom: .6rem; }
.chat {
  display: grid; grid-template-columns: 330px 1fr; flex: 1; min-height: 420px;
  background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden;
}
.chat.com-ficha { grid-template-columns: 330px 1fr 320px; }
.chat-lista { border-right: 1px solid var(--borda); display: flex; flex-direction: column; min-height: 0; }
.chat-lista-topo { padding: .6rem; border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: .45rem; }
.linha-busca { display: flex; gap: .4rem; }
.linha-busca input { margin: 0; }
.linha-busca button { font-size: 1.1rem; padding: .3rem .75rem; }
#btn-notif { align-self: flex-start; font-size: .8rem; }
#lista { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: .7rem; padding: .65rem .8rem; cursor: pointer; border-bottom: 1px solid #f1f1f3; }
.chat-item:hover { background: #f6f9f7; }
.chat-item.ativo { background: var(--cor-clara); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #cfeadb; color: var(--cor-escura); object-fit: cover;
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.avatar.grande { width: 84px; height: 84px; font-size: 2rem; }
.chat-item .info { flex: 1; min-width: 0; }
.chat-item .l1, .chat-item .l2 { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.chat-item .l1 strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .l1 .mini { margin: 0; flex: none; font-size: .75rem; }
.chat-item .l2 span { color: var(--suave); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .l3 { margin-top: .15rem; line-height: 1.2; }
.atend { font-style: normal; font-size: .7rem; color: var(--suave); }
.atend::before { content: "👤 "; }
.badge { background: #25d366; color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; min-width: 20px; text-align: center; }

.chat-conversa { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #efeae2; }
#conversa { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#conversa[hidden] { display: none; }
.chat-topo { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; background: #f6f8f7; border-bottom: 1px solid var(--borda); }
.chat-topo .avatar { width: 40px; height: 40px; }
.chat-topo .quem { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; cursor: pointer; }
.chat-topo .quem strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-topo .quem .mini { margin: 0; }
.voltar { display: none; background: transparent; color: var(--texto); border: 0; padding: .3rem .6rem; font-size: 1.2rem; }
.voltar:hover { background: #e6eaed; }
.chat-status { background: #fff6dc; color: #6e5300; font-size: .84rem; padding: .4rem .9rem; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem 5%; display: flex; flex-direction: column; gap: .3rem; }
.dia { align-self: center; background: #e1f2fb; color: #45616e; font-size: .75rem; padding: .15rem .7rem; border-radius: 8px; margin: .5rem 0; }
.msg { max-width: 72%; padding: .4rem .65rem .25rem; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg.deles { background: #fff; align-self: flex-start; border-top-left-radius: 0; }
.msg.nossa { background: #d9fdd3; align-self: flex-end; border-top-right-radius: 0; }
.msg.nota { background: #fff8c4; align-self: center; max-width: 80%; border: 1px dashed #e0c14d; }
.msg .autor { display: block; font-size: .72rem; font-weight: 700; color: var(--cor-escura); }
.msg.nota .autor { color: #8a6d00; }
.msg .txt { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .hora { display: block; text-align: right; font-size: .68rem; color: var(--suave); }
.msg .lido { color: #34b7f1; font-weight: 700; }
.midia-img { max-width: 280px; max-height: 300px; border-radius: 6px; display: block; margin: .2rem 0; }
.midia-video { max-width: 300px; border-radius: 6px; display: block; }
.msg audio { width: 260px; max-width: 100%; display: block; margin: .2rem 0; }
.midia-doc { display: flex; gap: .5rem; align-items: center; background: rgba(0,0,0,.05); padding: .5rem .7rem; border-radius: 6px; text-decoration: none; color: var(--texto); margin: .2rem 0; }
.midia-doc span { font-size: .78rem; color: var(--cor-escura); font-weight: 600; }

.sugestoes { background: #fff; border-top: 1px solid var(--borda); max-height: 200px; overflow-y: auto; }
.sugestoes button { display: block; width: 100%; text-align: left; background: #fff; color: var(--texto); border: 0; border-bottom: 1px solid #f1f1f3; border-radius: 0; font-weight: 400; padding: .5rem .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugestoes button:hover { background: var(--cor-clara); }
.anexo-info { background: #f6f8f7; border-top: 1px solid var(--borda); padding: .4rem .9rem; font-size: .88rem; }
.chat-envio { display: flex; gap: .45rem; padding: .55rem .7rem; background: #f6f8f7; border-top: 1px solid var(--borda); align-items: flex-end; }
.chat-envio textarea { margin: 0; resize: none; max-height: 140px; }
.chat-envio.modo-nota textarea { background: #fff8c4; border-color: #e0c14d; }
.btn-icone { background: transparent; border: 0; color: var(--texto); font-size: 1.25rem; padding: .35rem .4rem; cursor: pointer; margin: 0; border-radius: 8px; }
.btn-icone:hover { background: #e6ebe8; }
.btn-icone.gravando { background: #fdecea; animation: pulsar 1s infinite; }
@keyframes pulsar { 50% { opacity: .5; } }
.nota-toggle { display: flex; align-items: center; gap: .25rem; margin: 0 0 .55rem; font-size: .8rem; white-space: nowrap; cursor: pointer; }
.vazio.grande { margin: auto; font-size: 1.05rem; line-height: 1.8; }

.ficha { border-left: 1px solid var(--borda); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.ficha[hidden] { display: none; }
.ficha header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--borda); }
.ficha-corpo { overflow-y: auto; padding: 1rem; }
.ficha-foto { display: flex; justify-content: center; }
.ficha-foto img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }

dialog { border: 0; border-radius: var(--raio); padding: 1.3rem; width: min(420px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog h2 { margin-top: 0; }

/* ============ Login ============ */
.tela-login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(140deg, #0b0b0c 0%, #1c1c1f 100%); padding: 1rem; }
.caixa-login { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 370px; box-shadow: 0 14px 50px rgba(0,0,0,.3); text-align: center; }
.logo-grande { width: 140px; margin: 0 auto; display: block; }
.logo-grande img { width: 100%; height: auto; display: block; }
.caixa-login h1 { margin: .7rem 0 0; letter-spacing: .5px; }
.caixa-login .sub { color: var(--suave); margin: 0 0 1rem; }
.caixa-login label { text-align: left; }
.caixa-login button { width: 100%; margin-top: .8rem; padding: .8rem; }

/* ============ Celular ============ */
@media (max-width: 1100px) {
  .chat.com-ficha { grid-template-columns: 300px 1fr; }
  .chat.com-ficha .ficha { position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); z-index: 30; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
  .grade-grupos { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .lateral { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 30px rgba(0,0,0,.2); }
  .lateral.aberto { transform: none; }
  .barra-mobile { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; background: var(--lateral); color: #fff; position: sticky; top: 0; z-index: 20; }
  .hamburguer { background: transparent; border: 0; font-size: 1.4rem; padding: .1rem .5rem; }
  .conteudo { padding: 1rem .7rem 4rem; }
  .conteudo:has(.chat) { padding: 0; height: calc(100vh - 52px); }
  .conteudo:has(.chat) > .aviso, .conteudo:has(.chat) > .faixa-risco { margin: 0; border-radius: 0; }
  .chat { grid-template-columns: 1fr !important; border-radius: 0; border: 0; }
  .chat .chat-conversa { display: none; }
  .chat.aberto .chat-lista { display: none; }
  .chat.aberto .chat-conversa { display: flex; }
  .voltar { display: inline-block; }
  .msg { max-width: 88%; }
  .chat-msgs { padding: .7rem; }
  .midia-img, .midia-video { max-width: 100%; }
  .nota-toggle { display: none; }
  #btn-ficha { display: none; }
  .cartao { padding: 1rem; }
  td.acoes { min-width: 160px; }
  .lista-ajuda.colunas { columns: 1; }
  .resumo { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .resumo .num strong { font-size: 1.15rem; }
  .barra-filtros .busca, .barra-filtros .busca input { width: 100%; min-width: 0; }
}

/* ============ Avisos de risco ============ */
.faixa-risco { display: flex; align-items: center; gap: .5rem; background: #fff6dc; color: #6e5300; border: 1px solid #f5d77a;
  border-radius: 8px; padding: .4rem .5rem .4rem .8rem; font-size: .84rem; margin-bottom: 1rem; }
.faixa-risco a { color: #6e5300; font-weight: 600; }
.faixa-risco button { margin-left: auto; background: transparent; border: 0; color: #6e5300; padding: .1rem .4rem; font-size: .9rem; }
.aviso-risco { background: #fff1f0; border: 1px solid #f3c7c3; border-left: 4px solid var(--erro); border-radius: 8px; padding: .65rem .9rem; margin-bottom: 1.1rem; color: #7a1d16; font-size: .9rem; }
.aviso-risco summary { cursor: pointer; color: #7a1d16; font-weight: 400; list-style: none; }
.aviso-risco summary::-webkit-details-marker { display: none; }
.aviso-risco .ver-mais { text-decoration: underline; font-weight: 600; white-space: nowrap; }
.aviso-risco ul { margin: .5rem 0; padding-left: 1.2rem; }
.aviso-risco a { color: #7a1d16; font-weight: 600; }
.aviso-forte { border-left: 4px solid var(--erro); background: #fffafa; }
.modal-fundo { position: fixed; inset: 0; background: rgba(14, 42, 31, .75); z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal-caixa { background: #fff; border-radius: 14px; padding: 1.5rem; max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal-caixa h2 { color: var(--erro); }
.modal-caixa ul { padding-left: 1.2rem; }

/* ============ BotPay extras ============ */
.abas-largas { display: inline-flex; flex-wrap: wrap; margin-bottom: 1.1rem; }
.opcoes-modo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.opcoes-modo .modo { border: 2px solid var(--borda); border-radius: 10px; padding: .9rem 1rem; cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.opcoes-modo .modo input { position: absolute; opacity: 0; }
.opcoes-modo .modo span { font-weight: 400; font-size: .88rem; color: var(--suave); }
.opcoes-modo .modo.ativo { border-color: var(--cor); background: var(--cor-clara); }
.grafico { display: flex; align-items: flex-end; gap: .5rem; height: 230px; padding-top: 1.2rem; }
.barra-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.barra-col .barra { width: 100%; max-width: 46px; background: #a7dcc0; border-radius: 6px 6px 0 0; }
.barra-col .barra.atual { background: var(--cor); }
.barra-col .valor-barra { font-size: .7rem; color: var(--suave); margin-bottom: .2rem; white-space: nowrap; }
.barra-col .mes { font-size: .72rem; color: var(--suave); margin-top: .3rem; }
@media (max-width: 860px) {
  .grafico { gap: .2rem; height: 180px; }
  .barra-col .valor-barra { display: none; }
  .abas-largas a { padding: .35rem .6rem; font-size: .82rem; }
}
@media (display-mode: standalone) { .barra-mobile { padding-top: max(.55rem, env(safe-area-inset-top)); } }

/* avisos discretos */
.dica-risco { font-size: .83rem; color: var(--suave); background: transparent; border-left: 3px solid #e3d9a8; padding: .15rem 0 .15rem .65rem; margin: 0 0 1rem; }
.dica-risco a { color: var(--suave); text-decoration: underline; }
.nota-risco { display: block; margin-top: .45rem; font-size: .72rem; color: #9fb8ab; text-decoration: none; }
.nota-risco:hover { color: #fff; }
.modal-caixa h2 { color: var(--texto); }

/* botões do menu lateral (tema / instalar) */
.lateral nav .item-menu { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .48rem .65rem; border-radius: 8px;
  background: transparent; border: 0; color: #d4d4d8; font-weight: 400; font-size: .93rem; justify-content: flex-start; }
.lateral nav .item-menu span { width: 1.3rem; text-align: center; }
.lateral nav .item-menu:hover { background: rgba(255,255,255,.07); color: #fff; }
.lateral nav .item-menu[hidden] { display: none; }

/* aviso de mensalidade, plano, agendadas, progresso */
.aviso-plano { background: #eef6ff; color: #1e3a8a; border: 1px solid #c7dcff; border-radius: 8px; padding: .5rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.aviso-plano.atrasado { background: #fff1f0; color: #8a1c13; border-color: #f3c7c3; }
.aviso-plano a { color: inherit; font-weight: 700; }
.plano-cartao { text-align: center; }
.plano-icone { font-size: 2.6rem; }
.pix-pagar { margin-top: 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.pix-pagar label { width: 100%; text-align: left; }
.agendadas { background: #eef6ff; border-bottom: 1px solid var(--borda); padding: .35rem .9rem; font-size: .84rem; max-height: 110px; overflow-y: auto; }
.agendada { padding: .15rem 0; }
.progresso { height: 6px; background: #e6ebe8; border-radius: 99px; margin-top: .3rem; overflow: hidden; min-width: 90px; }
.progresso div { height: 100%; background: var(--cor); }

/* ============ Modo escuro ============ */
html[data-tema="escuro"] {
  --fundo: #0f0f10; --cartao: #19191b; --texto: #ececee; --suave: #a1a1aa; --borda: #2e2e33;
  --cor-clara: #2a2a2e; --lateral: #070708;
  --cor: #3f3f46; --cor-escura: #d4d4d8;
  color-scheme: dark;
}
html[data-tema="escuro"] input, html[data-tema="escuro"] textarea, html[data-tema="escuro"] select { background: #141416; color: var(--texto); }
html[data-tema="escuro"] code { background: #22322b; }
html[data-tema="escuro"] button.secundario, html[data-tema="escuro"] .botao.secundario, html[data-tema="escuro"] .chip { background: transparent; color: var(--texto); }
html[data-tema="escuro"] .chip.ativo { background: var(--cor); color: #fff; }
html[data-tema="escuro"] button.perigo { background: transparent; border-color: #6b2b26; color: #ff8a80; }
html[data-tema="escuro"] .abas { background: #141416; }
html[data-tema="escuro"] .abas a { color: var(--texto); }
html[data-tema="escuro"] .abas a.ativo { background: var(--cartao); }
html[data-tema="escuro"] .aviso.ok { background: #2a2a2e; color: #9be3bd; }
html[data-tema="escuro"] .aviso.erro { background: #3a1a17; color: #ffb4ab; }
html[data-tema="escuro"] .aviso.alerta, html[data-tema="escuro"] .chat-status { background: #3a3215; color: #f5dc8a; border-color: #5c4d1a; }
html[data-tema="escuro"] .aviso-plano { background: #14233d; color: #b9d0ff; border-color: #23395f; }
html[data-tema="escuro"] .selo.verde { background: #1f2a14; color: #b0ee32; }
html[data-tema="escuro"] .selo.vermelho { background: #3a1a17; color: #fca5a5; }
html[data-tema="escuro"] .selo.amarelo { background: #3a3215; color: #fcd34d; }
html[data-tema="escuro"] .selo.azul { background: #14233d; color: #93c5fd; }
html[data-tema="escuro"] .selo.cinza { background: #26302c; color: #b6c2bc; }
html[data-tema="escuro"] .opcao { background: #131d19; }
html[data-tema="escuro"] .balao, html[data-tema="escuro"] .msg.nossa { background: #1f4a36; color: #ececee; }
html[data-tema="escuro"] .chat-conversa { background: #0b1210; }
html[data-tema="escuro"] .chat-topo, html[data-tema="escuro"] .chat-envio, html[data-tema="escuro"] .anexo-info { background: #131d19; }
html[data-tema="escuro"] .chat-item { border-color: #18181b; }
html[data-tema="escuro"] .chat-item:hover { background: #1b2822; }
html[data-tema="escuro"] .msg.deles { background: #18181b; color: var(--texto); }
html[data-tema="escuro"] .msg.nota { background: #3a3215; border-color: #6b5a1f; }
html[data-tema="escuro"] .msg.nota .autor { color: #f5dc8a; }
html[data-tema="escuro"] .dia { background: #18181b; color: var(--suave); }
html[data-tema="escuro"] .sugestoes, html[data-tema="escuro"] .sugestoes button, html[data-tema="escuro"] .ficha { background: var(--cartao); color: var(--texto); }
html[data-tema="escuro"] .sugestoes button:hover { background: var(--cor-clara); }
html[data-tema="escuro"] .btn-icone { color: var(--texto); }
html[data-tema="escuro"] .btn-icone:hover, html[data-tema="escuro"] .voltar:hover { background: #22322b; }
html[data-tema="escuro"] .voltar { color: var(--texto); }
html[data-tema="escuro"] .midia-doc { background: rgba(255,255,255,.06); color: var(--texto); }
html[data-tema="escuro"] .agendadas { background: #14233d; color: #b9d0ff; }
html[data-tema="escuro"] .lista-grupos a { color: var(--texto); }
html[data-tema="escuro"] .lista-grupos a:hover { background: #1b2822; }
html[data-tema="escuro"] .barra-salvar { background: var(--fundo); }
html[data-tema="escuro"] .dica-risco { border-color: #5c4d1a; }
html[data-tema="escuro"] dialog, html[data-tema="escuro"] .modal-caixa, html[data-tema="escuro"] .caixa-login { background: var(--cartao); color: var(--texto); }
html[data-tema="escuro"] .interruptor span { background: #3a4a43; }
html[data-tema="escuro"] .progresso { background: #22322b; }
html[data-tema="escuro"] .barra-col .barra { background: #2f6b4d; }
html[data-tema="escuro"] .barra-col .barra.atual { background: var(--cor); }
html[data-tema="escuro"] pre.codigo { background: #07100c; }
html[data-tema="escuro"] .cartao.destaque { box-shadow: 0 0 0 3px #2a2a2e; }
html[data-tema="escuro"] .opcoes-modo .modo.ativo { background: #2a2a2e; }
html[data-tema="escuro"] .avatar { background: #1f4a36; color: #b6f0d0; }
html[data-tema="escuro"] .etq { background: color-mix(in srgb, var(--cor) 28%, #19191b); color: color-mix(in srgb, var(--cor) 55%, white); }

h2.secao { margin: .4rem 0 .8rem; font-size: 1.1rem; }

.opcoes-modo.tres { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- Loja ---------- */
.aviso.alerta { background: #fef3c7; color: #92400e; }
html[data-tema="escuro"] .aviso.alerta { background: #3a3215; color: #fcd34d; }
.grade-loja { grid-template-columns: minmax(220px, 280px) 1fr; align-items: start; }
@media (max-width: 800px) { .grade-loja { grid-template-columns: 1fr; } }
.lista-cats { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-cats li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem 0; border-bottom: 1px solid var(--borda); }
.lista-cats a { text-decoration: none; color: inherit; }
.lista-cats a.ativo { font-weight: 700; color: var(--cor-escura); }
.acoes-cat { display: flex; gap: .35rem; }
.acoes-cat form { margin: 0; }
.lista-prods { display: flex; flex-direction: column; gap: .5rem; }
.prod-linha { display: flex; align-items: center; gap: .75rem; padding: .5rem; border: 1px solid var(--borda); border-radius: 10px; }
.prod-linha.inativo { opacity: .55; }
.prod-linha img, .prod-linha .sem-foto { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 56px; display: grid; place-items: center; background: var(--cor-clara); font-size: 1.5rem; }
.prod-linha .inf { flex: 1; min-width: 0; }
.prod-linha .acoes { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.prod-linha .acoes form { margin: 0; }
.mini-foto { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.bloco { display: block; }
input.cor { padding: 2px; height: 42px; }
.link-loja { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.link-loja #qr-loja { width: 130px; flex: 0 0 130px; background: #fff; padding: 4px; border-radius: 8px; }
.link-loja > div:last-child { flex: 1; min-width: 240px; }
.barra-impressao { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; }
.barra-impressao label { margin: 0; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } }
.kanban .coluna { background: var(--cor-clara); border-radius: 12px; padding: .7rem; min-height: 120px; }
.kanban h3 { margin: .2rem 0 .7rem; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.kanban .cards { display: flex; flex-direction: column; gap: .6rem; }
.card-pedido { background: #fff; border-radius: 10px; padding: .7rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer; border-left: 4px solid var(--cor); display: flex; flex-direction: column; gap: .3rem; }
.card-pedido.st-novo { border-left-color: #2563eb; animation: pulsar 1.6s ease-in-out 3; }
.card-pedido.st-cancelado { border-left-color: #9ca3af; opacity: .7; }
.card-pedido.st-concluido { border-left-color: #16a34a; }
.cp-topo { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cp-topo .selo { margin-left: auto; }
.cp-acoes { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .2rem; }
@keyframes pulsar { 50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .25); } }
html[data-tema="escuro"] .card-pedido { background: var(--cartao); }
html[data-tema="escuro"] .kanban .coluna { background: rgba(255,255,255,.04); }
.modal-fundo[hidden], [hidden] { display: none !important; }
.lista-cobs { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .6rem; }
.lista-cobs li { border: 1px solid var(--borda); border-radius: 10px; padding: .55rem .65rem; }
.acoes-cob { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.opcoes-modo .modo.desligado { opacity: .6; cursor: default; }
.saldo-grande { font-size: 2.2rem; font-weight: 800; margin: .2rem 0; }
.extrato li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--borda); }
.extrato .ent { color: #15803d; font-weight: 700; } .extrato .sai { color: #b91c1c; font-weight: 700; }
.barras-dias { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 1rem; border-bottom: 1px solid var(--borda); }
.barras-dias div { flex: 1; background: var(--cor); border-radius: 3px 3px 0 0; min-width: 4px; }

/* ---------- Tela inicial ---------- */
.ola-inicio h1 { margin: 0; }
.ola-inicio { margin-bottom: 1rem; }
.cd-cartao { background: linear-gradient(135deg, #000000, #1c1c1f 60%, #3a3a3f); color: #fff; border-radius: 18px; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cd-cartao a { color: #fff; }
.cd-topo { display: flex; gap: .5rem; align-items: center; font-weight: 600; opacity: .95; }
.cd-topo .selo { font-size: .72rem; }
.cd-saldo { margin: .7rem 0 .9rem; }
.cd-saldo .mini { color: rgba(255,255,255,.8); }
.cd-valor { display: flex; align-items: center; gap: .6rem; }
.cd-valor strong { font-size: 2rem; letter-spacing: .02em; }
.olho { background: rgba(255,255,255,.18); border: 0; border-radius: 50%; width: 40px; height: 40px; padding: 0; font-size: 1.15rem; color: #fff; }
.olho:hover { background: rgba(255,255,255,.3); }
.cd-acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.cd-acoes a { background: rgba(255,255,255,.16); border-radius: 999px; padding: .4rem .85rem; text-decoration: none; font-size: .88rem; font-weight: 600; }
.cd-acoes a:hover { background: rgba(255,255,255,.28); }
.cd-acoes a.cheio { background: #fff; color: #000000; }
.cd-vazia p { margin: .6rem 0 .9rem; }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.area { position: relative; display: flex; flex-direction: column; gap: .15rem; background: var(--cartao); border: 1px solid var(--borda); border-radius: 14px; padding: .95rem 1rem; text-decoration: none; color: var(--texto); transition: transform .12s, box-shadow .12s; }
.area:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.07); border-color: var(--cor); }
.area-ic { font-size: 1.6rem; line-height: 1; margin-bottom: .3rem; }
.area small { color: var(--suave); font-size: .82rem; }
.area .bolha { position: absolute; top: .7rem; right: .7rem; background: #e53935; color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .1rem .45rem; }
.titulo-sec { font-size: 1.05rem; margin: 0 0 .7rem; }
.atalhos-cd { display: flex; flex-wrap: wrap; gap: .4rem; }
.detalhe-conta { background: var(--cor-clara); border-radius: 10px; padding: .7rem .9rem; margin: .6rem 0 1rem; }
.detalhe-conta div { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.detalhe-conta .total { border-top: 1px solid var(--borda); margin-top: .3rem; padding-top: .4rem; font-size: 1.05rem; }
.filtros-rel { align-items: flex-end; margin-bottom: 1rem; }
.consolidado td, .consolidado th { white-space: nowrap; }
@media (max-width: 860px) {
  .areas { grid-template-columns: 1fr 1fr; }
  .area:last-child:nth-child(odd) { grid-column: span 2; }
  .cd-valor strong { font-size: 1.7rem; }
}
html[data-tema="escuro"] .area { background: var(--cartao); }
html[data-tema="escuro"] .detalhe-conta { background: #141416; }
.tarifas input { width: 90px; margin: 0; }
.tarifas td, .tarifas th { padding: .3rem .5rem; }
.extrato { list-style: none; padding-left: 0; margin: .4rem 0; }
.extrato li > span:last-child { white-space: nowrap; text-align: right; }
.impostos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; }
.impostos label { flex: none !important; }
.tarifas input { width: 72px; }
.areas { grid-template-columns: repeat(4, 1fr); }
.area-cd { background: linear-gradient(135deg, #000000, #1c1c1f 65%, #3a3a3f); color: #fff; border-color: transparent; }
.area-cd small, .area-cd small a, .area-cd strong { color: #fff; }
.area-cd small { opacity: .92; }
.area-cd .cd-valor { display: flex; align-items: center; gap: .4rem; margin: .1rem 0 .15rem; }
.area-cd .cd-valor span { font-size: 1.15rem; font-weight: 800; }
.area-cd .olho { width: 30px; height: 30px; font-size: .95rem; }
.area-cd .selo { font-size: .68rem; vertical-align: middle; }
@media (max-width: 1100px) { .areas { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .areas { grid-template-columns: 1fr 1fr; } }
/* agenda */
.semana-nav { display: flex; gap: .35rem; align-items: center; margin-bottom: .5rem; overflow-x: auto; }
.dia-sem { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: .35rem .3rem; border-radius: 10px; background: var(--cartao); border: 1px solid var(--borda); text-decoration: none; color: var(--texto); }
.dia-sem small { color: var(--suave); font-size: .72rem; text-transform: uppercase; }
.dia-sem strong { font-size: 1.1rem; }
.dia-sem span { font-size: .72rem; color: var(--cor-escura); font-weight: 700; min-height: 1em; }
.dia-sem.hoje { border-color: var(--cor); }
.dia-sem.ativo { background: var(--cor); color: #fff; border-color: var(--cor); }
.dia-sem.ativo small, .dia-sem.ativo span { color: #fff; }
.dia-sem.folga { opacity: .5; }
.lista-agenda { list-style: none; padding: 0; margin: 0; }
.lista-agenda li { display: grid; grid-template-columns: 58px 1fr; gap: .2rem .8rem; padding: .7rem 0; border-bottom: 1px solid var(--borda); }
.ag-hora { display: flex; flex-direction: column; }
.ag-hora strong { font-size: 1.05rem; } .ag-hora small { color: var(--suave); }
.ag-acoes { grid-column: 2; display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.ag-cancelado, .ag-expirado { opacity: .55; }
.horarios-ag input[type=time] { width: auto; display: inline-block; }
.extrato li > span:first-child { flex: 1 1 auto; min-width: 0; }
.extrato li > strong:last-child { flex: 0 0 auto; max-width: 52%; text-align: right; }
.horarios-ag input[type=time] { width: 118px; padding: .4rem .5rem; }
@media (max-width: 860px) {
  .horarios-ag thead { display: none; }
  .horarios-ag, .horarios-ag tbody { display: block; }
  .horarios-ag tr { display: grid; grid-template-columns: 1fr auto; gap: .3rem; padding: .6rem 0; border-bottom: 1px solid var(--borda); }
  .horarios-ag td { border: 0; padding: 0; }
  .horarios-ag td:nth-child(1) { font-weight: 700; }
  .horarios-ag td:nth-child(3), .horarios-ag td:nth-child(4) { grid-column: 1 / -1; font-size: .85rem; color: var(--suave); }
  .horarios-ag td:nth-child(4)::before { content: 'Turno 2: '; }
}
.convite-push { display: flex; align-items: center; gap: .6rem; background: var(--cor-clara); border: 1px solid var(--cor); border-radius: 12px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .9rem; }
.convite-push a { font-weight: 700; white-space: nowrap; }
.convite-push button { margin-left: auto; background: none; border: 0; color: var(--suave); padding: .2rem .4rem; }
.botoes-push { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
html[data-tema="escuro"] .convite-push { background: #141416; }
.lista-emails { max-height: 260px; overflow: auto; border: 1px solid var(--borda); border-radius: 8px; padding: .4rem .6rem; margin-top: .4rem; }
.lista-emails label { margin: .25rem 0; }

/* Meta Biz */
.metabiz-hero { background: linear-gradient(135deg, var(--lateral), #26262a); color: #fff; }
.metabiz-hero .mini { color: rgba(255,255,255,.75); }
.metabiz-hero h2 { margin: .3rem 0 .1rem; font-size: 1.35rem; color: #fff; }
.mb-topo { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.mb-rotulo { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.12); padding: .2rem .6rem; border-radius: 99px; }
.mb-total { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; }
.mb-prox { display: flex; flex-direction: column; gap: .2rem; background: rgba(255,255,255,.08); border-radius: 12px; padding: .8rem 1rem; min-width: 220px; }
.mb-prox strong { font-size: 1.15rem; }
.mb-barra { height: 14px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; margin-top: 1.1rem; }
.mb-barra div { height: 100%; background: linear-gradient(90deg, #7ee2a8, #c6f36b); border-radius: 99px; min-width: 6px; transition: width .6s; }
.mb-falta { margin: .6rem 0 0; font-size: .92rem; }
.mb-trilha { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mb-trilha li { display: flex; gap: .9rem; position: relative; padding: 0 0 1.1rem; }
.mb-trilha li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--borda); }
.mb-trilha li.feito:not(:last-child)::before { background: var(--cor); }
.mb-ic { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fundo); border: 2px solid var(--borda); font-size: 1.1rem; }
.mb-trilha li.feito .mb-ic { background: var(--cor); border-color: var(--cor); color: #fff; font-weight: 800; }
.mb-trilha li.agora .mb-ic { border-color: var(--cor); box-shadow: 0 0 0 4px var(--cor-clara); }
.mb-info { display: flex; flex-direction: column; gap: .15rem; padding-top: .45rem; min-width: 0; }
.mb-regras { padding-left: 1.1rem; margin: 0 0 .6rem; }
.mb-regras li { margin-bottom: .35rem; }
.mb-mini-barra { height: 8px; background: var(--borda); border-radius: 99px; overflow: hidden; margin: .4rem 0 .2rem; }
.mb-mini-barra div { height: 100%; background: var(--cor); border-radius: 99px; }

/* pagar.biz: botões escuros; no modo escuro os botões ficam cinza com hover mais claro */
html[data-tema="escuro"] button:hover, html[data-tema="escuro"] .botao:hover { background: #52525b; border-color: #52525b; color: #fff; }
html[data-tema="escuro"] button.secundario, html[data-tema="escuro"] .botao.secundario { background: #19191b; color: #e4e4e7; }

/* sem zoom no celular: campos com 16px (o iPhone dá zoom em fonte menor) e sem zoom de toque duplo */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
@media (max-width: 820px) { input, select, textarea { font-size: 16px !important; } }

/* ---------- Lista de cobranças (compacta, abre ao tocar) ---------- */
.cob-lista { border: 1px solid var(--borda); border-radius: 12px; overflow: hidden; }
.cob-cab, .cob-item > summary { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr 1fr 1fr 22px; gap: .8rem; align-items: center; padding: .62rem .9rem; }
.cob-cab { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); background: var(--fundo); border-bottom: 1px solid var(--borda); font-weight: 600; }
.cob-item { border-bottom: 1px solid var(--borda); background: var(--cartao); }
.cob-item:last-child { border-bottom: 0; }
.cob-item > summary { cursor: pointer; list-style: none; transition: background .12s; }
.cob-item > summary::-webkit-details-marker { display: none; }
.cob-item > summary:hover { background: var(--fundo); }
.cob-item[open] > summary { background: var(--fundo); }
.cob-quem { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.cob-av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--cor-clara); color: var(--texto); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.cob-nome { min-width: 0; display: flex; flex-direction: column; }
.cob-nome strong, .cob-nome small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cob-nome small, .cob-valor small, .cob-venc small { color: var(--suave); font-size: .76rem; display: block; }
.cob-valor, .cob-venc { font-size: .92rem; white-space: nowrap; }
.so-mobile { display: none; }
.cob-seta { color: var(--suave); font-size: 1.3rem; line-height: 1; transition: transform .15s; text-align: center; }
.cob-item[open] .cob-seta { transform: rotate(90deg); }
.cob-item.sit-vencido .cob-av { background: #fdecea; color: var(--erro); }
.cob-item.sit-pago .cob-av { background: #dcfce7; color: #166534; }
.cob-corpo { padding: .3rem .9rem 1rem 3.55rem; display: grid; gap: .8rem; background: var(--fundo); }
.cob-info { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .84rem; color: var(--suave); }
.cob-acoes { display: flex; flex-wrap: wrap; gap: .4rem; }
.cob-acoes form { margin: 0; }
.cob-rot { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); font-weight: 600; }
.cob-hist .historico { margin-top: .25rem; }
html[data-tema="escuro"] .cob-item.sit-vencido .cob-av { background: #3a1d1d; }
html[data-tema="escuro"] .cob-item.sit-pago .cob-av { background: #1f2a14; color: #b0ee32; }
@media (max-width: 760px) {
  .cob-cab { display: none; }
  .cob-item > summary { grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "quem valor seta" "quem sit seta"; row-gap: .2rem; }
  .cob-quem { grid-area: quem; } .cob-valor { grid-area: valor; text-align: right; } .cob-sit { grid-area: sit; text-align: right; } .cob-seta { grid-area: seta; }
  .cob-venc { display: none; }
  .so-mobile { display: block; }
  .cob-nome small { white-space: normal; }
  .cob-nome small:first-of-type { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cob-corpo { padding-left: .9rem; }
}
