/* Identidade Blueprint IA. As cores mudam pelo atributo data-tema (ver tema.js). */
/* Fontes Montserrat e Inter (licença OFL, em /fontes), servidas pelo próprio app. */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url("/fontes/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url("/fontes/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url("/fontes/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url("/fontes/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url("/fontes/inter-latin-700-normal.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --f-titulo: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --f-texto: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --topo: #123b63; --pagina: #d8dce1; --fundo: #efefef; --superficie: #fff;
  --texto: #262b30; --suave: #59616a; --linha: #dddfe2; --linha-forte: #c2c7cd;
  --acento: #2a75ba; --sobre-acento: #fff; --acento-texto: #1f5f99;
  --balao-pessoa: #dceaf7; --balao-pessoa-borda: #c6dcf0; --rodape: #fff; --selo: #e7e9ec;
  --atencao: #fcebc9; --atencao-texto: #6e4300; --ok: #d3eee5; --ok-texto: #00604c;
  --grava: #fdecea; --grava-texto: #8a1c12; --sombra: 0 1px 2px #262b3014;
}
:root[data-tema="escuro"] {
  color-scheme: dark;
  --pagina: #0b0d0f; --fundo: #15181b; --superficie: #22272c;
  --texto: #eceff1; --suave: #a6b0b8; --linha: #333a41; --linha-forte: #4c535a;
  --acento: #62a8e5; --sobre-acento: #0d1b28; --acento-texto: #86beee;
  --balao-pessoa: #1f4467; --balao-pessoa-borda: #2c5a85; --rodape: #1b1f23; --selo: #333a41;
  --atencao: #4a3a14; --atencao-texto: #ffd98a; --ok: #10443a; --ok-texto: #93e3cc;
  --grava: #46201d; --grava-texto: #ffb4ab; --sombra: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 var(--f-texto); background: var(--pagina); color: var(--texto); }
.app { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--fundo); }
.app.larga { max-width: 960px; }
header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--topo); color: #fff; }
h3, header strong, .progresso { font-family: var(--f-titulo); }
h3 { font-size: 16px; line-height: 1.3; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff url("/blueprint-ia.svg") center / 64% no-repeat; }
.titulo { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.titulo span { font-size: 12px; opacity: .85; }
nav { display: flex; background: var(--superficie); border-top: 1px solid var(--linha); }
nav a { flex: 1; text-align: center; padding: 12px 4px; color: var(--suave); text-decoration: none; font-size: 13px; }
nav a.atual { color: var(--acento-texto); font-weight: 700; box-shadow: inset 0 3px var(--acento); }
.rolagem { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rolagem > * { flex: none; }
button { font: inherit; border: 0; border-radius: 20px; padding: 8px 14px; cursor: pointer; background: var(--acento); color: var(--sobre-acento); font-weight: 600; }
button:disabled { opacity: .45; cursor: default; }
button.claro { background: var(--superficie); color: var(--texto); border: 1px solid var(--linha-forte); }
/* Link com aparência de botão (mesmo desenho do button.claro). */
a.botao.claro { display: inline-block; align-self: flex-start; border-radius: 20px; padding: 8px 14px; font-weight: 600; text-decoration: none; background: var(--superficie); color: var(--texto); border: 1px solid var(--linha-forte); }
button.perigo { background: var(--grava); color: var(--grava-texto); align-self: flex-start; }
a { color: var(--acento-texto); }
input, textarea, select { font: inherit; padding: 9px 12px; border: 1px solid var(--linha-forte); border-radius: 8px; background: var(--superficie); color: inherit; min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; flex: none; }
input.curto { width: 90px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.linha, label.linha { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
label.linha { flex-wrap: nowrap; }
.linha.entre { justify-content: space-between; }
.cartao { background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cartao.centro { margin: auto; max-width: 380px; width: 100%; text-align: center; }
.cartao h3, .cartao p { margin: 0; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.grade h3 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--linha); border-radius: 8px; margin: 0; }
.nota { font-size: 13px; color: var(--suave); margin: 0; }
.quebra { overflow-wrap: anywhere; }
.selo { font-size: 12px; padding: 2px 9px; border-radius: 10px; background: var(--selo); white-space: nowrap; }
.selo.em_andamento, .selo.pronta { background: var(--atencao); color: var(--atencao-texto); }
.selo.enviada { background: var(--ok); color: var(--ok-texto); }
/* Selo do link do cliente: ativo ou inativo (bloqueado ou vencido). */
.selo.link_ativo { background: #009072; color: #fff; }
.selo.link_inativo { background: #df8c04; color: #0a1512; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--fundo); padding: 10px; border-radius: 8px; max-height: 360px; overflow: auto; font-size: 12px; margin: 0; }
.etapas { list-style: none; margin: 0; padding: 14px 16px; background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; }
.etapas li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--linha-forte); margin-left: 6px; }
.etapas li:last-child { border-color: transparent; padding-bottom: 0; }
.etapas li::before { content: ""; position: absolute; left: -8px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--superficie); border: 2px solid var(--linha-forte); }
.etapas li.andamento::before { border-color: var(--acento); box-shadow: 0 0 0 3px var(--balao-pessoa); }
.etapas li.concluida::before { border-color: #009072; background: #009072; }
.etapas li .selo { margin-left: 8px; }
.etapas p { margin: 4px 0 0; }
.etapas .partes { list-style: none; margin: 10px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.etapas .partes li { padding: 0 0 0 24px; margin: 0; border: 0; }
.etapas .partes li::before { content: ""; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--superficie); border: 2px solid var(--linha-forte); }
.etapas .partes li.atual::before { border-color: var(--acento); box-shadow: 0 0 0 3px var(--balao-pessoa); }
.etapas .partes li.feita::before { content: "✓"; display: grid; place-items: center; width: 16px; height: 16px; left: -2px; top: 1px; border: 0; background: var(--acento); color: var(--sobre-acento); font-size: 11px; font-weight: 700; box-shadow: none; }
.etapas.equipe { border: 0; padding: 4px 0 0; }
.etapas.equipe > li { display: flex; flex-direction: column; gap: 8px; }
.etapas.equipe p { margin: 0; }
.etapas.equipe label { flex: 1; min-width: 200px; }
.etapas.equipe .partes { margin: 4px 0 0; }
.estados { display: flex; flex-wrap: wrap; gap: 6px; }
.estados button { font-size: 12px; padding: 5px 11px; border: 1px solid transparent; }
.estados button.claro { border-color: var(--linha-forte); }
/* Status escolhido, na ordem Pendente, Em andamento, Concluída: cores iguais nos dois temas. */
.estados button[aria-pressed="true"] { color: #fff; }
.estados button[aria-pressed="true"]:nth-child(1) { background: #df8c04; color: #0a1512; }
.estados button[aria-pressed="true"]:nth-child(2) { background: #2a75ba; }
.estados button[aria-pressed="true"]:nth-child(3) { background: #009072; }
.data { position: relative; display: inline-block; }
.data .calendario { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
/* Ícones em uma só cor (branco) sobre fundo azul, nos dois temas. */
button.icone { width: 36px; height: 36px; flex: none; padding: 0; border-radius: 50%; background: #2a75ba; display: grid; place-items: center; }
button.icone::before { content: ""; width: 20px; height: 20px; background: #fff; }
button.icone.mais::before { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat; }
button.icone.lapis::before { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.cadeado { display: flex; align-items: center; gap: 6px; }
.cadeado::before { content: ""; width: 15px; height: 15px; flex: none; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.fim-parte { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; background: var(--superficie); border: 1px solid var(--linha); border-radius: 12px; }
.fim-parte .linha { justify-content: center; }
.progresso { display: flex; align-items: center; gap: 10px; padding: 6px 14px; background: var(--superficie); border-bottom: 1px solid var(--linha); font-size: 12px; }
.barra { flex: 1; height: 6px; border-radius: 3px; background: var(--selo); overflow: hidden; }
.preenchida { height: 100%; width: 0; background: var(--acento); transition: width .4s; }
.aviso { padding: 8px 14px; background: var(--atencao); color: var(--atencao-texto); font-size: 13px; border-radius: 4px; }
.conversa { gap: 8px; }
.conversa.estatica { display: flex; flex-direction: column; padding: 10px; background: var(--fundo); border-radius: 8px; }
.balao { align-self: flex-start; max-width: 82%; padding: 8px 12px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--sombra); background: var(--superficie); border: 1px solid var(--linha); }
.balao.pessoa { align-self: flex-end; background: var(--balao-pessoa); border-color: var(--balao-pessoa-borda); }
.balao audio { display: block; width: 240px; max-width: 100%; margin-bottom: 6px; }
button.ouvir { background: none; color: var(--acento-texto); padding: 0 0 0 6px; font-size: 13px; }
.balao > button.ouvir:first-child, .balao.pessoa > button.ouvir { display: block; padding: 0 0 4px; }
.conversa > button { align-self: center; }
.rodape-fechado button { margin-left: 8px; }
.digitando::after { content: "digitando…"; opacity: .55; font-style: italic; }
.rapidas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px; }
.gravando { padding: 6px 14px; font-size: 13px; background: var(--grava); color: var(--grava-texto); }
.gravando i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d93025; animation: pisca 1s infinite alternate; }
@keyframes pisca { to { opacity: .2; } }
footer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); background: var(--rodape); border-top: 1px solid var(--linha); }
footer textarea { flex: 1; resize: none; border: 1px solid var(--linha); border-radius: 20px; max-height: 160px; font-size: 16px; }
button.redondo { width: 44px; height: 44px; flex: none; padding: 0; border-radius: 50%; font-size: 18px; }
button.redondo.ativo { background: #d93025; color: #fff; }
.rodape-fechado { padding: 12px; text-align: center; background: var(--rodape); border-top: 1px solid var(--linha); font-size: 13px; }
.voltar { background: none; color: #fff; font-size: 20px; padding: 4px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; font-size: 22px; padding: 0 8px; }
.menu > div { position: absolute; right: 0; top: 36px; z-index: 2; width: 260px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--superficie); color: var(--texto); border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 4px 18px #0004; }
button.alternar { width: 36px; height: 36px; flex: none; padding: 0; border-radius: 50%; background: #ffffff1f; color: #fff; display: grid; place-items: center; }
button.alternar::before { content: ""; width: 20px; height: 20px; background: currentColor; mask: var(--icone-tema) center / contain no-repeat; }
:root { --icone-tema: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
:root[data-tema="escuro"] { --icone-tema: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
