/* Design System do painel: a única fonte de estilo de todas as telas.
   Estrutura do kit "Operação" (VERTA-Design-System-Kit, 20/11/2026): tipografia, espaço, raio, sombra, layout, componentes e padrões são imutáveis;
   só o bloco PALETA muda. Paleta: a do site do Fausto (fausttoantunes.com.br), escura, com o azul da marca. Decisões do Everson: menu lateral
   recolhível, tudo sólido (sem gradiente, vidro ou brilho) e o chat nas proporções do WhatsApp Web.
   Ordem: 1 paleta · 2 tokens · 3 base · 4 componentes · 5 shell · 6 telas. Breakpoints do kit: 640 / 768 / 1024 / 1280 (abaixo de 1024 o menu vira gaveta). */

/* ---------- 1. PALETA (única parte editável; as 20 chaves do kit) ---------- */
:root {
  color-scheme: dark;
  --primary: #0099FD;        /* o azul vivo da marca (fausttoantunes.com.br); texto branco em 500/600, como no site */
  --primary-hover: #0088E0;
  --primary-soft: #0F2A40;
  --on-primary: #FFFFFF;
  --page: #09090B;
  --background: #0D0D10;
  --surface: #141418;
  --surface-2: #1C1C21;
  --text: #FAFAFA;
  --text-muted: #9CA3AF;
  --border: #26262B;
  --success: #10B981; --success-soft: #142825;
  --warning: #F59E0B; --warning-soft: #2F2516;
  --danger: #EF4444;  --danger-soft: #2E1A1D;
  --info: #38B6FF;    --info-soft: #182734;
  /* o chat tem as medidas do WhatsApp Web e as cores do painel (Everson, 20/11: duas paletas misturadas ficavam estranhas) */
  --wa-fundo: #0D0D10; --wa-painel: #111114; --wa-cabecalho: #141418; --wa-bolha: #1C1C21; --wa-eu: #0B3556; --wa-hover: #18181C; --wa-sel: #1C2733;
}

/* ---------- 2. Tokens imutáveis (tokens.base.json) ---------- */
:root {
  --fonte: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-micro: 10px; --t-caption: 11px; --t-small: 12px; --t-body: 14px; --t-subtitle: 16px; --t-title: 20px; --t-page: 24px; --t-display: 30px;
  --l-micro: 14px; --l-caption: 15px; --l-small: 16px; --l-body: 20px; --l-subtitle: 22px; --l-title: 26px; --l-page: 31px; --l-display: 36px;
  --e1: 4px; --e1-5: 6px; --e2: 8px; --e2-5: 10px; --e3: 12px; --e4: 16px; --e5: 20px; --e6: 24px; --e8: 32px; --e10: 40px; --e12: 48px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 20px; --r-full: 9999px;  /* arredondado: botão e campo 10, cartão 16, modal 20, pílula */
  --sombra-sm: 0 1px 2px 0 rgb(0 0 0 / .35);
  --sombra-md: 0 4px 6px -1px rgb(0 0 0 / .45), 0 2px 4px -1px rgb(0 0 0 / .3);
  --sombra-lg: 0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -2px rgb(0 0 0 / .3);
  --anel: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --lateral: 232px; --lateral-curta: 64px; --topo: 58px;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; font-family: var(--fonte); font-size: var(--t-body); line-height: var(--l-body); color: var(--text); background: var(--page); -webkit-font-smoothing: antialiased }
h1, h2, h3, h4 { margin: 0; color: var(--text) }
h1 { font-size: var(--t-page); line-height: var(--l-page); font-weight: 700 }
h2 { font-size: var(--t-title); line-height: var(--l-title); font-weight: 600 }
h3 { font-size: var(--t-body); line-height: var(--l-body); font-weight: 500 }
h4, .rot { font-size: var(--t-micro); line-height: var(--l-micro); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted) }
p { margin: 0 }
a { color: var(--info) }
img { max-width: 100% }
code { background: var(--surface-2); padding: 0 var(--e1); border-radius: var(--r-sm); font-size: var(--t-small) }
:focus-visible { outline: none; box-shadow: var(--anel), 0 0 0 1px var(--primary) }
[hidden] { display: none !important }
.mut { color: var(--text-muted) }
.peq { font-size: var(--t-small); line-height: var(--l-small) }
.erro { color: var(--danger) }
.vermelho { color: var(--danger) }
.mt1 { margin-top: var(--e1) } .mt3 { margin-top: var(--e3) } .m0 { margin: 0 }
#iaMsg:not(:empty) { margin-top: var(--e3) }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

/* ---------- 4. Componentes ---------- */
/* Ícone: 16px no botão; traço do Lucide */
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }

/* Botão: outline (padrão), .p primário (um por região), .sec secundário, .volta ghost, .perigo destrutivo, .ok concluir; .peq 32px, padrão 36px, .grande 40px */
button { display: inline-flex; align-items: center; justify-content: center; gap: var(--e2); height: 36px; padding: 0 var(--e4); border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--t-body); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease) }
button:hover { background: var(--surface-2) }
button:disabled { opacity: .5; pointer-events: none }
button.p { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600 }
button.p:hover { background: var(--primary-hover); border-color: var(--primary-hover) }
button.sec { background: var(--surface-2); border-color: var(--surface-2) }
button.perigo { background: var(--danger); border-color: var(--danger); color: #FFFFFF }
button.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, var(--border)) }
button.ok:hover { background: var(--success-soft) }
button.peq { height: 32px; padding: 0 var(--e3); font-size: var(--t-small) }
button.grande { height: 40px; padding: 0 var(--e5) }
button.volta { height: auto; min-height: 28px; padding: var(--e1) var(--e2); border-color: transparent; background: none; color: var(--text-muted) }
button.volta:hover { background: var(--surface-2); color: var(--text) }
button.icone { width: 36px; padding: 0; border-color: transparent; background: none; color: var(--text-muted) }
button.icone:hover { background: var(--surface-2); color: var(--text) }
a.botao, .plano a.bt { display: inline-flex; align-items: center; height: 36px; padding: 0 var(--e4); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); text-decoration: none; font-weight: 500 }
.acoes { display: flex; gap: var(--e2); flex-wrap: wrap; align-items: center; margin-top: var(--e3) }
.acoes details { margin: 0 }

/* Campo: altura 36, rótulo 14/500 acima, dica 11, erro 11 no lugar da dica */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font: inherit; font-size: var(--t-body); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  height: 36px; padding: 0 var(--e3); max-width: 100%; transition: border-color .15s var(--ease), box-shadow .15s var(--ease) }
textarea { height: auto; padding: var(--e2) var(--e3); line-height: var(--l-body); resize: vertical }
select option { background: var(--surface); color: var(--text) }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .8 }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--anel) }
input[readonly] { background: var(--surface-2); color: var(--text-muted) }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); margin: 0 var(--e2) 0 0; vertical-align: -3px }
input[type=file] { font: inherit; font-size: var(--t-small); color: var(--text-muted); max-width: 100% }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; height: 32px; margin-right: var(--e3); padding: 0 var(--e3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); cursor: pointer }
.campos { display: grid; gap: var(--e4) }
.campos label { display: flex; flex-direction: column; gap: var(--e1-5); font-size: var(--t-body); font-weight: 500 }
.campos label input, .campos label select, .campos label textarea { width: 100%; font-weight: 400 }
.campos label.peq { flex-direction: row; align-items: center; font-weight: 400 }
.campos label.peq input { width: auto; flex: none }
/* Usuário: só a lista que vale para o nível escolhido (Head: agências; Gestor: contas; Dono: nenhuma) */
[data-usrform]:has(option[value=dono]:checked) fieldset, [data-usrform]:has(option[value=head]:checked) fieldset.lista, [data-usrform]:has(option[value=gestor]:checked) fieldset.ags { display: none }
details.wagl > summary { cursor: pointer; padding: var(--e2) 0 }
.campos fieldset { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--e3) var(--e4); margin: 0; display: flex; flex-wrap: wrap; gap: var(--e2) var(--e4) }
.campos fieldset legend { font-size: var(--t-body); font-weight: 500; padding: 0 var(--e1) }
.campos fieldset.lista { flex-direction: column; flex-wrap: nowrap; max-height: 16rem; overflow-y: auto }
.campos .acoes { margin-top: 0 }
.campos .duas { display: grid; gap: var(--e4) }
@media (min-width: 768px) { .campos .duas { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.dica { font-size: var(--t-caption); line-height: var(--l-caption); color: var(--text-muted) }
form.linha { display: flex; gap: var(--e2); flex-wrap: wrap; margin-top: var(--e2) }
form.linha input:not([type=checkbox]):not([type=file]) { flex: 1 1 12rem; min-width: 0 }
.filtro { width: 100%; margin: var(--e2) 0 var(--e3) }

/* Cartão: surface, borda, raio 8, sombra sm; cabeçalho 14/500 + ação; corpo 20. Nunca cartão dentro de cartão */
.bloco { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--e5); box-shadow: var(--sombra-sm); min-width: 0 }
.bloco + .bloco { margin-top: var(--e4) }
.card-cab { display: flex; justify-content: space-between; align-items: center; gap: var(--e3); flex-wrap: wrap; margin-bottom: var(--e1) }
.card-cab h3 { display: flex; align-items: center; gap: var(--e2) }
.card-cab h3 .ic { color: var(--text-muted) }
.card-desc { margin-bottom: var(--e4); font-size: var(--t-small); line-height: var(--l-small); color: var(--text-muted) }
.bloco h4 { margin: var(--e4) 0 var(--e1) }
.bloco h4:first-child { margin-top: 0 }
/* KPI: ícone 40 em bloco suave + rótulo 11 em caixa alta + valor 24/700 + dica 11 */
.kpis { display: grid; gap: var(--e4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)) }
.kpi { display: flex; gap: var(--e3); align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--e4); box-shadow: var(--sombra-sm) }
.kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--primary-soft); color: var(--info); flex: none }
.kpi-ic .ic { width: 20px; height: 20px }
.kpi .rot { margin-bottom: 2px }
.kpi b { display: block; font-size: var(--t-page); line-height: var(--l-page); font-weight: 700 }
.kpi small { font-size: var(--t-caption); color: var(--text-muted) }

/* Selo de status: altura 18, raio cheio, 11/500, borda tonal e ponto. O texto é o estado */
.cb, .av { display: inline-block; vertical-align: middle; height: 18px; line-height: 16px; padding: 0 var(--e2); border-radius: var(--r-full); font-size: var(--t-caption); font-weight: 500;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis }
.cb::before, .av::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px }
.cb, .cb.erro, .av.critico { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent) }
.cb.pronto { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent) }
.cb.and, .av.atencao { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 35%, transparent) }
.cb.preparando, .av.call { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, transparent) }
.cb.sem_resposta { background: var(--surface-2); color: var(--text-muted); border-color: var(--border) }
.chip { display: inline-flex; align-items: center; gap: var(--e2); height: 32px; margin: 0 var(--e2) var(--e2) 0; padding: 0 var(--e4); border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none }
.chip:hover { background: var(--surface-2) }

/* Alerta e mensagem pronta */
.aviso { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-muted); border-radius: var(--r-lg); padding: var(--e3) var(--e4); margin-bottom: var(--e3) }
.aviso.critico { border-left-color: var(--danger) }
.aviso.atencao { border-left-color: var(--warning) }
.aviso .q { font-size: var(--t-small); color: var(--text-muted) }
.aviso .q b { color: var(--text) }
.aviso .q a { color: var(--info); cursor: pointer }
.aviso .t { margin-top: var(--e1); white-space: pre-line }
.avisos { display: grid; gap: var(--e3); margin-bottom: var(--e4) }
.avisos .aviso { margin: 0 }
.msg { white-space: pre-wrap; background: var(--background); border: 1px dashed var(--border); border-radius: var(--r-lg); padding: var(--e3) var(--e4); margin-top: var(--e2) }

/* Lista e histórico: linhas com divisória de 1px */
.lr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2) var(--e3); padding: var(--e3) 0; border-bottom: 1px solid var(--border) }
.lr:last-of-type { border-bottom: 0 }
.lr .ln { font-weight: 500; flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere }
.lr .lt { flex: 2 1 14rem; min-width: 0; color: var(--text-muted); font-size: var(--t-small); overflow-wrap: anywhere }
.lr .acoes { margin: 0 }
.lr.r .ln { color: var(--danger) }
.lr.pessoa { flex-wrap: wrap }
.hist { list-style: none; margin: 0; padding: 0 }
.hist li { padding: var(--e3) 0; border-top: 1px solid var(--border); cursor: pointer }
.hist li.fixo { cursor: default }
.hist li:first-child { border-top: 0; padding-top: 0 }
.hist .q { font-size: var(--t-small); color: var(--text-muted) }
.hist .q b { color: var(--text); font-weight: 500 }
.hist .q b.cobranca, .hist .q b.boleto { color: var(--danger) }
.hist .q b.resposta { color: var(--success) }
.hist .q b.decisao, .hist .q b.call { color: var(--info) }
.hist li:has(b.call), .hist li.eu { border-left: 2px solid var(--primary); padding-left: var(--e3) }
.hist .t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.hist li.aberto .t { display: block }
ul.txt { margin: 0; padding-left: var(--e5) }
ul.txt li { margin: var(--e1) 0 }
/* Tabela densa: cabeçalho 11 em caixa alta, linhas de 48, números à direita */
.tabela-caixa { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg) }
table.tabela { width: 100%; border-collapse: collapse; font-size: var(--t-body) }
.tabela th { text-align: left; font-size: var(--t-caption); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); background: var(--surface-2); padding: var(--e2-5) var(--e4); border-bottom: 1px solid var(--border) }
.tabela td { padding: var(--e3) var(--e4); height: 48px; border-bottom: 1px solid var(--border) }
.tabela tr:last-child td { border-bottom: 0 }
.tabela tbody tr:hover { background: var(--surface-2) }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums }

/* Detalhes que abrem no clique e o menu de ação secundária (details.menu) */
details { margin-top: var(--e3) }
details > summary { cursor: pointer; color: var(--info); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: var(--e1) }
details > summary::-webkit-details-marker { display: none }
details > summary::before { content: "▸" }
details[open] > summary::before { content: "▾" }
details.botao > summary { color: var(--text); border: 1px solid var(--border); border-radius: var(--r-md); height: 36px; padding: 0 var(--e4) }
details.botao > summary::before { content: "" }
details.botao[open] { flex-basis: 100% }
details.menu { position: relative; display: inline-block; margin: 0 }
details.menu > summary { height: 32px; padding: 0 var(--e3); gap: var(--e1-5); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--t-small) }
details.menu > summary::before { content: none }
details.menu > summary:hover { background: var(--surface-2) }
details.menu[open] > summary { border-color: var(--primary); box-shadow: var(--anel) }
.menu-itens { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 13rem; display: flex; flex-direction: column; padding: var(--e1-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sombra-lg) }
.menu-itens button { justify-content: flex-start; width: 100%; height: 32px; border: 0; background: none; color: var(--text); font-weight: 400; font-size: var(--t-body); border-radius: var(--r-sm); padding: 0 var(--e3) }
.menu-itens button:hover { background: var(--surface-2) }
.menu-itens button.ok { color: var(--success) }
.menu-itens button.volta { color: var(--text-muted) }
@media (max-width: 767px) { .menu-itens { position: static; box-shadow: none; margin-top: var(--e1) } details.menu[open] { flex-basis: 100% } }

/* Abas: contêiner com borda e respiro de 4; a ativa em primarySoft com texto primary */
.vistas { display: inline-flex; gap: var(--e1); padding: var(--e1); border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface) }
.vistas button { height: 30px; padding: 0 var(--e4); border: 0; background: none; color: var(--text-muted); border-radius: var(--r-full); font-size: var(--t-small) }
.vistas button:hover { color: var(--text); background: var(--surface-2) }
.vistas button.sel { background: var(--primary-soft); color: var(--info) }

/* Avatar: iniciais em tom neutro (cor só para ação e estado) */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: var(--t-small); font-weight: 500 }
.avatar.peq { width: 28px; height: 28px; font-size: var(--t-caption) }

/* Estados: carregando, vazio (ícone 40 em círculo, título 14/500, descrição, ação) */
.carregando { color: var(--text-muted); padding: var(--e4) 0; display: flex; align-items: center; gap: var(--e2) }
.carregando::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--info); border-radius: 50%; animation: gira .8s linear infinite }
@keyframes gira { to { transform: rotate(360deg) } }
.vazio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--e1); text-align: center; padding: var(--e8) var(--e4); color: var(--text-muted); margin: auto }
.vazio-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); margin-bottom: var(--e2) }
.vazio b { color: var(--text); font-weight: 500 }
.vazio span { max-width: 26rem }
.vazio .acoes { justify-content: center }

/* Modal: fundo 50%, cartão raio 12, largura 448/672; Esc e clique fora fecham; entra com fade e 8px */
.modal-fundo { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .5); display: flex; align-items: center; justify-content: center; padding: var(--e4); animation: aparece .2s var(--ease) }
.modal { width: min(448px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sombra-lg); animation: sobe .2s var(--ease) }
.modal-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--e3); padding: var(--e5) var(--e5) 0 }
.modal-cab h2 { font-size: 18px; line-height: 24px }
.modal-corpo { padding: var(--e2) var(--e5) var(--e5); color: var(--text-muted) }
.modal-pe { display: flex; justify-content: flex-end; gap: var(--e2); padding: var(--e4) var(--e5); border-top: 1px solid var(--border) }
@keyframes aparece { from { opacity: 0 } }
@keyframes sobe { from { opacity: 0; transform: translateY(8px) } }
body.travado { overflow: hidden }
/* Toast: canto inferior direito, 384px, borda tonal, some em 4,5 s */
.toasts { position: fixed; right: var(--e4); bottom: calc(var(--e4) + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; gap: var(--e2); width: min(384px, calc(100vw - 32px)) }
.toast { display: flex; gap: var(--e3); align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--info); border-radius: var(--r-lg); padding: var(--e3) var(--e4); box-shadow: var(--sombra-lg); animation: sobe .2s var(--ease) }
.toast.erro { border-left-color: var(--danger) } .toast.ok { border-left-color: var(--success) } .toast.alerta { border-left-color: var(--warning) }
.toast p { flex: 1 }

/* Gaveta lateral das conversas */
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(36rem, 100%); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--sombra-lg); z-index: 40;
  display: flex; flex-direction: column; padding: var(--e4) var(--e5) calc(var(--e4) + env(safe-area-inset-bottom, 0px)) }
.gaveta .topo { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); margin-bottom: var(--e3) }
.pedir { position: fixed; right: var(--e6); bottom: calc(var(--e6) + env(safe-area-inset-bottom, 0px)); z-index: 5; box-shadow: var(--sombra-md) }

/* ---------- 5. Shell: menu lateral 232 (recolhível em 64), topo 58, conteúdo 16/32, máximo 1280 ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh }
.lateral { position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: var(--lateral); display: flex; flex-direction: column; background: var(--background); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .2s var(--ease); visibility: hidden }
.lateral.aberta { transform: none; box-shadow: var(--sombra-lg); visibility: visible }
.veu { position: fixed; inset: 0; z-index: 44; background: rgb(0 0 0 / .5) }
.lat-topo { display: flex; align-items: center; justify-content: space-between; height: var(--topo); padding: 0 var(--e3) 0 var(--e5); border-bottom: 1px solid var(--border) }
.marca { font-size: var(--t-title); font-weight: 700; letter-spacing: -.01em; white-space: nowrap }
.marca .ponto { color: var(--primary) }
.lat-grupo { padding: var(--e5) var(--e5) var(--e2); font-size: var(--t-micro); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted) }
.lateral nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--e3) }
.nav-it { position: relative; justify-content: flex-start; gap: var(--e3); width: 100%; height: 40px; padding: 0 var(--e3); border: 0; background: none; color: var(--text-muted); font-weight: 400; border-radius: var(--r-md) }
.nav-it:hover { background: var(--surface-2); color: var(--text) }
.nav-it.sel { background: var(--primary-soft); color: var(--info); font-weight: 500 }
.nav-it .n { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--r-full); background: var(--danger); color: #FFFFFF; font-size: var(--t-caption); line-height: 18px; text-align: center }
.lat-rodape { margin-top: auto; display: flex; align-items: center; gap: var(--e2); padding: var(--e3); border-top: 1px solid var(--border) }
.lat-rodape .quem { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2 }
.lat-rodape .quem b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lat-rodape .quem small { font-size: var(--t-caption); color: var(--text-muted) }
.area { display: flex; flex-direction: column; min-width: 0 }
header.topo { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--e3); height: var(--topo); padding: 0 var(--e4); padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--page) 92%, transparent); border-bottom: 1px solid var(--border) }
.migalha { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.migalha b { color: var(--text); font-weight: 500 }
header.topo .agora { margin-left: auto; display: inline-flex; align-items: center; gap: var(--e1-5); color: var(--text-muted); font-size: var(--t-small); white-space: nowrap }
main { padding: var(--e6) var(--e4) var(--e8); width: 100%; max-width: 1280px; margin: 0 auto; flex: 1 }
@media (min-width: 1800px) { main { max-width: none } }  /* tela larga: ocupa tudo (a dele é 2560) */
.so-desk { display: none }
@media (max-width: 639px) { header.topo .agora { display: none } }
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--lateral) minmax(0, 1fr) }
  .shell.curta { grid-template-columns: var(--lateral-curta) minmax(0, 1fr) }
  .lateral { position: sticky; top: 0; height: 100dvh; width: auto; transform: none; visibility: visible; z-index: 2 }
  .veu, .so-mob { display: none }
  .so-desk { display: inline-flex }
  .shell.curta .marca .resto, .shell.curta .nav-it span:not(.n), .shell.curta .lat-grupo, .shell.curta .lat-rodape .quem { display: none }
  .shell.curta .lat-topo { flex-direction: column; justify-content: center; gap: 0; padding: 0 }
  .shell.curta .lat-topo .marca { font-size: var(--t-subtitle) }
  .shell.curta .lat-topo .so-desk { height: 24px }
  .shell.curta .lat-topo .so-desk .ic { transform: rotate(180deg) }
  .shell.curta .lateral nav { padding: var(--e3) var(--e2) 0 }
  .shell.curta .nav-it { justify-content: center; padding: 0 }
  .shell.curta .nav-it .n { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px }
  .shell.curta .lat-rodape { flex-direction: column; padding: var(--e3) var(--e2) }
  header.topo { padding: 0 var(--e8) }
  main { padding: var(--e8) var(--e8) var(--e10) }
}
/* PageHeader e seções */
.cab { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--e4); flex-wrap: wrap; margin-bottom: var(--e6) }
.cab .sub { color: var(--text-muted); font-size: var(--t-subtitle); line-height: var(--l-subtitle); margin-top: var(--e1) }
.secao { margin-top: var(--e8) }
.cab + .secao { margin-top: 0 }
.secao > h2 { margin-bottom: 2px }
.secao > .sub { color: var(--text-muted); margin-bottom: var(--e4) }
/* Grade responsiva: 1 coluna; .g2 duas a partir de 768; .g3 três a partir de 1280 */
.grade-r { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e4); align-items: stretch; grid-auto-flow: dense }
.grade-r > .bloco { display: flex; flex-direction: column }
.grade-r > .bloco { margin: 0 }
.grade-r > .largo { grid-column: 1 / -1 }
@media (min-width: 768px) { .grade-r.g2, .grade-r.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (min-width: 1280px) { .grade-r.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (min-width: 1800px) { .grade-r.g3 { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)) } }  /* 3 ou 4 cartões numa linha só, sem coluna vazia */

/* ---------- 6. Telas ---------- */
/* Entrada: login e Google Authenticator */
.entrada { width: 100%; max-width: 400px; margin: 10vh auto; padding: var(--e8) var(--e6) var(--e6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sombra-lg) }
.entrada .marca { display: block; margin-bottom: var(--e6) }
.entrada h1 { font-size: var(--t-title); line-height: var(--l-title) }
.entrada .sub { color: var(--text-muted); margin: var(--e1) 0 var(--e6) }
.entrada form { display: flex; flex-direction: column; gap: var(--e4) }
.entrada label { display: flex; flex-direction: column; gap: var(--e1-5); font-weight: 500 }
.entrada input { width: 100% }
.entrada button.p { width: 100%; height: 40px }
.entrada .erro { margin-top: var(--e3); font-size: var(--t-small) }
.entrada .codigo { font-size: var(--t-title); letter-spacing: .5em; text-align: center; height: 44px }
.entrada #qr { display: flex; justify-content: center; margin: var(--e4) auto; padding: var(--e3); background: #FFFFFF; border-radius: var(--r-lg); width: fit-content }
.entrada .chave { font-size: var(--t-small); color: var(--text-muted); text-align: center; word-break: break-all; margin-bottom: var(--e4) }

/* Chat nas proporções do WhatsApp Web (pedido do Everson, 20/11): lista com 30% da largura (300 a 460 px), linha de 72 px com avatar de 48,
   cabeçalho de 59, balão de no máximo 65% com texto 14 e hora 11, conversa com respiro nas laterais e a caixa de escrever arredondada. */
.shell:has(main.cheio) { height: 100dvh }
.area:has(main.cheio) { height: 100dvh; overflow: hidden }
main.cheio { padding: 0; max-width: none; flex: 1; min-height: 0 }
.cgrade.chat { display: grid; grid-template-columns: minmax(0, 1fr); height: 100%; overflow: hidden }
.cgrade.chat > * { min-height: 0; height: 100% }
.cgrade.chat.comconversa .clista { display: none }
.clista { display: flex; flex-direction: column; overflow-y: auto; background: var(--wa-painel) }
.cag { position: sticky; top: 0; z-index: 1; background: var(--wa-painel); font-size: var(--t-micro); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); padding: var(--e4) var(--e4) var(--e2) }
.ci { display: flex; gap: var(--e3); align-items: center; min-height: 72px; margin: 0 var(--e2); padding: var(--e2) var(--e3); border-radius: var(--r-md); cursor: pointer; color: var(--text); text-decoration: none }
.ci:hover { background: var(--wa-hover) }
.ci.sel { background: var(--wa-sel) }
.ci .avatar { width: 48px; height: 48px; font-size: var(--t-subtitle) }
.ci.espera .avatar { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) }
.ci-c { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--border); padding: var(--e1) 0 }
.ci:last-child .ci-c, .ccontas .ci:last-child .ci-c { border-bottom: 0 }
.cgr { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--e2); margin: 0 var(--e2); padding: var(--e3); border-radius: var(--r-md); cursor: pointer; color: var(--text); text-decoration: none }
.cgr:hover { background: var(--wa-hover) }
.cgr b { font-weight: 500; font-size: var(--t-subtitle) }
.cgr .seta { color: var(--text-muted) }
.cgr span { font-size: var(--t-small) }
.cgr .cbs { flex-basis: 100%; padding-left: 24px; margin-top: 0 }
.ccontas { display: flex; flex-direction: column; margin-left: var(--e4); padding-left: var(--e1); border-left: 1px solid var(--border) }
.ci .cn { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e2) }
.ci .cn b { font-weight: 400; font-size: var(--t-subtitle); line-height: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ci .cn span { font-size: var(--t-small); color: var(--text-muted); white-space: nowrap }
.ci.espera .cn span { color: var(--success) }
.ci .ct { font-size: var(--t-body); line-height: var(--l-body); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cbs { display: flex; gap: var(--e1); flex-wrap: wrap; margin-top: var(--e1) }
.cconv { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--wa-fundo) }
.chtopo { display: flex; justify-content: space-between; gap: var(--e2) var(--e4); align-items: center; flex-wrap: wrap; min-height: 59px; background: var(--wa-cabecalho); padding: var(--e2) var(--e4); border-bottom: 1px solid var(--border) }
.chtopo h2 { font-size: var(--t-subtitle); line-height: 21px; font-weight: 500 }
.chquem { display: flex; align-items: center; gap: var(--e3); min-width: 0 }
.chquem .avatar { width: 40px; height: 40px }
.crit { font-size: var(--t-small); color: var(--text-muted) }
.voltar { justify-content: flex-start !important; width: 100%; height: 40px !important; padding: 0 var(--e4) !important; border-radius: 0 !important; border-bottom: 1px solid var(--border) !important; background: var(--wa-cabecalho) !important }
.lks, .links { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e3) }
.lks a, .links a { color: var(--info); font-size: var(--t-small); text-decoration: none }
.lks a:hover { text-decoration: underline }
.crits { padding: var(--e2) var(--e4); background: var(--danger-soft); border-bottom: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); display: flex; flex-direction: column; gap: var(--e2) }
.critl { display: flex; justify-content: space-between; gap: var(--e2) var(--e4); align-items: center; flex-wrap: wrap }
.critl > div:first-child { flex: 1 1 18rem; min-width: 0 }
.critl.and { background: var(--warning-soft); border-radius: var(--r-md); padding: var(--e2) var(--e3) }
.critl .acoes { margin: 0 }
.sitl { font-size: var(--t-small); color: var(--warning); font-weight: 500 }
.sitl.venc { color: var(--danger) }
.sitf { display: flex; gap: var(--e2); flex-wrap: wrap; align-items: center; width: 100%; margin-top: var(--e2) }
.sitf input[name=nota] { flex: 1 1 14rem; min-width: 0 }
.tars { background: var(--wa-painel); border-bottom: 1px solid var(--border); padding: var(--e2) var(--e4) }
.tarl { display: flex; flex-wrap: wrap; gap: var(--e2); align-items: center; padding: var(--e2) 0; border-bottom: 1px solid var(--border) }
.tarl:last-child { border-bottom: 0 }
.tarl > span:first-child { flex: 1 1 16rem; min-width: 0 }
.tarl .acoes { margin: 0 }
.vistas-faixa { padding: var(--e2) var(--e4); background: var(--wa-painel); border-bottom: 1px solid var(--border) }
.fio { flex: 1; min-height: 0; overflow-y: auto; padding: var(--e3) var(--e3) var(--e4); display: flex; flex-direction: column; gap: 2px }
.fio > .vazio { flex: 1 }
.fio.ia { background: var(--page) }
.fio .bol { max-width: 85%; background: var(--wa-bolha); border-radius: 12px; border-top-left-radius: 4px; padding: 6px 9px 8px; margin-top: var(--e1-5); white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start;
  font-size: var(--t-body); line-height: 19px; box-shadow: 0 1px .5px rgb(0 0 0 / .13) }
.fio .bol.eu { background: var(--wa-eu); align-self: flex-end; border-top-left-radius: 12px; border-top-right-radius: 4px }
.fio .bol.ia-eu { background: var(--primary-soft); align-self: flex-end; border-top-left-radius: 12px; border-top-right-radius: 4px }
.fio .bol.ia-r { background: var(--surface); border: 1px solid var(--border); white-space: normal }
.fio .bq { font-size: var(--t-caption); line-height: 15px; color: var(--text-muted); margin-bottom: 2px }
.fio .ia { align-self: flex-start; width: min(85%, 46rem); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-lg); padding: var(--e2) var(--e3); margin-top: var(--e1) }
.fio .ia textarea { width: 100% }
.fio .ia.mut { background: transparent }
.fio .tar { align-self: flex-start; max-width: 85%; background: var(--surface); border-left: 3px solid var(--primary); border-radius: var(--r-md); padding: var(--e2) var(--e3); margin-top: var(--e1) }
.sis { align-self: center; max-width: 85%; text-align: center; background: var(--wa-cabecalho); border-radius: var(--r-full); padding: 5px var(--e3); margin: var(--e2) 0; font-size: var(--t-small) }
.sis.critico { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent) }
.caixa { display: flex; gap: var(--e2); align-items: flex-end; flex-wrap: wrap; min-height: 62px; border-top: 1px solid var(--border); padding: var(--e2-5) var(--e4); padding-bottom: calc(var(--e2-5) + env(safe-area-inset-bottom, 0px)); background: var(--wa-cabecalho) }
.caixa textarea { flex: 1 1 12rem; min-width: 0; resize: none; border-radius: 22px; border-color: var(--border); background: var(--surface-2); min-height: 42px; padding: 11px var(--e3); line-height: 20px }
.caixa textarea:focus { border-color: transparent; box-shadow: none }
.caixa button.p { height: 42px; border-radius: 22px; padding: 0 var(--e5) }
.caixa.confenv { flex-direction: column; align-items: stretch; background: var(--warning-soft) }
.caixa.confenv .acoes { margin-top: var(--e2) }
form.envio { margin-top: var(--e2) }
form.envio textarea { width: 100% }
.dem { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--e3); margin-bottom: var(--e3) }
.est { font-size: var(--t-small); margin-top: var(--e1); padding: 2px var(--e2); border-radius: var(--r-sm); background: var(--surface-2) }
.est.andamento { background: var(--info-soft); color: var(--info) }
.est.pendente { background: var(--warning-soft); color: var(--warning) }
@media (min-width: 768px) {
  .cgrade.chat { grid-template-columns: clamp(300px, 30%, 460px) minmax(0, 1fr) }
  .cgrade.chat.comconversa .clista { display: flex }
  .clista { border-right: 1px solid var(--border) }
  .fio { padding: var(--e3) 7% var(--e4) }
  .fio .bol, .fio .tar { max-width: 65% }
  .fio .ia { width: min(65%, 46rem) }
}

/* Conversa da IA (gaveta e skills da agência) */
.conv { display: flex; flex-direction: column; gap: var(--e3); margin: 0 0 var(--e3); flex: 1; overflow: auto }
.conv .eu, .conv .cl { padding: var(--e3); border-radius: var(--r-lg); white-space: pre-wrap; overflow-wrap: anywhere }
.conv .eu { background: var(--surface-2); align-self: flex-end; max-width: 85% }
.conv .cl { border: 1px solid var(--border) }
.conv .cl.erro { border-color: var(--danger) }
.conv .sep { text-align: center; color: var(--text-muted); font-size: var(--t-caption) }
.sugs { display: flex; flex-wrap: wrap; gap: var(--e2); margin-bottom: var(--e3) }

/* Produtos: skills em grade */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); grid-auto-rows: 1fr; gap: var(--e3); margin: var(--e3) 0 }
.barra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e2) var(--e4); margin-bottom: var(--e4) }
.barra label { display: flex; flex-direction: column; gap: var(--e1-5); font-weight: 500 }
.barra select { min-width: min(20rem, 100%) }
.barra .dica { padding-bottom: var(--e2-5) }
.sk { height: auto; text-align: left; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--e1); padding: var(--e3) var(--e4); white-space: normal; border-radius: var(--r-md) }
.sk:hover { border-color: var(--primary) }
.sk b { display: inline-flex; align-items: center; gap: var(--e2); font-weight: 500 }
.sk b .ic { color: var(--info) }
.sk span { font-weight: 400; font-size: var(--t-small); line-height: var(--l-small); color: var(--text-muted) }

/* Criativos */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: var(--e3); margin: var(--e3) 0 }
.grade.arts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)) }
.grade figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--e2) }
.grade img { width: 100%; border-radius: var(--r-md); display: block }
.grade figcaption { font-size: var(--t-small); margin-top: var(--e2) }
.art.aprovada { border-color: var(--success) }
.art.descartada { opacity: .45 }
.art.refazendo { border-style: dashed; border-color: var(--warning) }
pre.rev { white-space: pre-wrap; font: inherit; font-size: var(--t-small); background: var(--surface-2); padding: var(--e2); border-radius: var(--r-md); margin: var(--e1) 0 0 }
.faixa { border-radius: var(--r-lg); padding: var(--e3) var(--e4); font-weight: 500; margin-bottom: var(--e4); background: var(--surface-2); border: 1px solid var(--border) }
.faixa.r { background: var(--danger-soft); color: var(--danger) }
.faixa.a { background: var(--warning-soft); color: var(--warning) }
.faixa.v { background: var(--success-soft); color: var(--success) }
.plano .pc { border-left: 3px solid var(--border); padding: var(--e1) 0 var(--e1) var(--e3); margin: var(--e2) 0 }
.plano .pc.r { border-left-color: var(--danger) } .plano .pc.v { border-left-color: var(--success) } .plano .pc.az { border-left-color: var(--primary) }
.plano .pc ul { margin: var(--e1) 0 0 }

/* Configurar */
.liga .ln { flex: 1 1 14rem }
.liga select { flex: 1 1 14rem; min-width: 0; max-width: 22rem }
.liga.sug { background: var(--primary-soft); border-radius: var(--r-md); padding-inline: var(--e3) }
/* Primeiros passos: a trilha numerada e o passo da vez */
.passos-lista { list-style: none; margin: 0 0 var(--e6); padding: 0; display: flex; flex-wrap: wrap; gap: var(--e2) var(--e6) }
.passos-lista li { display: flex; align-items: center; gap: var(--e2); color: var(--text-muted) }
.passos-lista li.agora { color: var(--text); font-weight: 500 }
.passos-lista li.ok { color: var(--text) }
.passos-lista .bola { width: 24px; height: 24px; border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); font-size: var(--t-small) }
.passos-lista li.agora .bola { background: var(--primary); border-color: var(--primary); color: var(--on-primary) }
.passos-lista li.ok .bola { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary) }
.passos-lista .bola .ic { width: 14px; height: 14px }
.passo-agora { margin-bottom: var(--e4) }
.passo-corpo, .passo-agora, .passos-lista { max-width: 60rem }
.boas-vindas { border: 1px solid var(--primary); border-radius: var(--r-lg); padding: var(--e3) var(--e4); margin-bottom: var(--e4) }
.boas-vindas pre { white-space: pre-wrap; font: inherit; font-size: var(--t-small); margin: var(--e2) 0 0 }
.passo-agora h3 { margin: 0 0 var(--e1) }
.estado { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic nome selo" "ic det det"; align-items: center; gap: 0 var(--e3); padding: var(--e3) 0; border-bottom: 1px solid var(--border) }
.estado:last-child { border-bottom: 0; padding-bottom: 0 }
.estado-ic { grid-area: ic; align-self: start; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--text-muted) }
.estado .nome { grid-area: nome; font-weight: 500; min-width: 0 }
.estado .det { grid-area: det; color: var(--text-muted); font-size: var(--t-small); line-height: var(--l-small); min-width: 0; overflow-wrap: anywhere }
.estado .cb { grid-area: selo }
.links-cli { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e4) }
@media (min-width: 768px) and (max-width: 1023px) { .links-cli { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.link-cli { display: grid; gap: var(--e3); padding: var(--e5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sombra-sm); min-width: 0 }
.link-cli .nome { display: flex; align-items: center; gap: var(--e3); font-weight: 500; min-width: 0 }
.link-cli .nome > span { min-width: 0 }
.link-cli .nome small { display: block; font-weight: 400; color: var(--text-muted); font-size: var(--t-caption) }
.link-cli label { display: flex; flex-direction: column; gap: var(--e1-5); font-weight: 500 }
.link-cli input { width: 100% }
.link-cli button { justify-self: start }
/* A partir de 1024: uma linha por cliente num cartão só (eram 13 cartões altos) */
@media (min-width: 1024px) {
  .links-cli { gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sombra-sm) }
  .link-cli { grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: var(--e4); padding: var(--e3) var(--e5); border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; background: none }
  .link-cli:last-child { border-bottom: 0 }
  .link-cli .nome { align-self: center }
  .link-cli label { font-size: var(--t-small) }
}
.analise { display: grid; gap: 2px; padding: var(--e3) 0; border-top: 1px solid var(--border) }
.analise:first-child { border-top: 0; padding-top: 0 }
.analise .topo { display: flex; justify-content: space-between; gap: var(--e2); flex-wrap: wrap }
.analise .topo b { font-weight: 500 }
.analise .quando { color: var(--text-muted); font-size: var(--t-small) }
.analise .num { display: flex; gap: var(--e2); flex-wrap: wrap; align-items: center; font-size: var(--t-small) }

/* Página do Design System (#ds): cores e tipografia */
.cores { display: grid; gap: var(--e3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)) }
.cor { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface) }
.cor i { display: block; height: 48px; border-bottom: 1px solid var(--border) }
.cor span { display: block; padding: var(--e2) var(--e3); font-size: var(--t-small) }
.cor small { display: block; color: var(--text-muted); font-size: var(--t-caption) }
.tipo { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--e3); align-items: baseline; padding: var(--e3) 0; border-bottom: 1px solid var(--border) }
.tipo:last-child { border-bottom: 0 }
.t-display { font-size: var(--t-display); line-height: var(--l-display); font-weight: 700 }
.t-subtitle { font-size: var(--t-subtitle); line-height: var(--l-subtitle) }
input.campo-erro { border-color: var(--danger) }

@media (max-width: 767px) {
  .campos .acoes button, .entrada button { flex: 1 1 100% }
  .critl .acoes button, .tarl .acoes button { flex: 1 1 auto }
  .modal-pe button { flex: 1 }
}

/* WhatsApp: conectar um número novo (QR code e os passos) */
.qr-caixa { display: flex; flex-wrap: wrap; gap: var(--e5); align-items: flex-start; margin-top: var(--e4); padding: var(--e4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--background) }
.qr { width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; padding: var(--e2); background: #FFFFFF; border-radius: var(--r-md); flex: none }
.qr img { width: 100%; height: 100% }
.qr .carregando { color: #333 }
.passos { margin: var(--e2) 0; padding-left: var(--e5) }
.passos li { margin: var(--e1) 0 }
