/* Painel da prospecção (mesma direção visual do Atendente) — direção visual aprovada pelo Luis em 25/10/2026:
   degradê azul-marinho → royal, vidro fosco, Plus Jakarta Sans, cores com função. */

:root {
  --marinho: #0B1B3A;
  --royal: #1E4FBF;
  --royal-claro: #2F6BFF;
  --royal-escuro: #173E99;
  --tinta: #0F172A;
  --texto-2: #5B6475;
  --texto-3: #64748B;
  --texto-4: #8792A2;
  --linha: #DCE3EC;
  --linha-2: #EDF1F6;
  --fundo: #F3F6FA;
  --branco: #FFFFFF;
  --ok: #0B7A70;
  --ok-fundo: rgba(20, 150, 160, 0.14);
  --atencao: #A04A00;
  --atencao-fundo: rgba(255, 170, 60, 0.2);
  --atencao-borda: #E08A1E;
  --urgente: #B91C1C;
  --urgente-fundo: #FDECEC;
  --sombra-1: 0 4px 16px rgba(15, 30, 70, 0.06);
  --sombra-2: 0 6px 22px rgba(15, 30, 70, 0.08);
  --sombra-3: 0 10px 30px rgba(15, 30, 70, 0.14);
  --grad-heroi: radial-gradient(circle at 88% 6%, rgba(56, 160, 220, 0.3) 0%, rgba(56, 160, 220, 0) 42%),
    radial-gradient(circle at 0% 100%, rgba(20, 150, 160, 0.5) 0%, rgba(20, 150, 160, 0) 50%),
    linear-gradient(155deg, #0B1B3A 0%, #1E4FBF 58%, #12306E 100%);
  --grad-botao: linear-gradient(135deg, #2F6BFF, #1E4FBF);
  --grad-prof-0: linear-gradient(135deg, #3B7BFF, #1E4FBF);
  --grad-prof-1: linear-gradient(135deg, #17847A, #0F5E6E);
  --grad-prof-2: linear-gradient(135deg, #64748B, #334155);
  --raio: 18px;
  --fonte: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--fonte);
  color: var(--tinta);
  background: linear-gradient(180deg, #F3F6FA 0%, #F8FAFC 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: var(--royal); }
a:hover { color: var(--royal-escuro); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(47, 107, 255, 0.45); outline-offset: 2px; }
.esconder { display: none !important; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; gap: 14px; padding: 14px; }
.lateral {
  width: 250px; flex-shrink: 0; border-radius: 26px; color: #fff; padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px; background: var(--grad-heroi);
  position: sticky; top: 14px; height: calc(100vh - 28px); overflow-y: auto;
}
.lateral .marca { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.lateral .marca .selo { width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); display: grid; place-items: center; font-weight: 800; }
.lateral .marca b { display: block; font-size: 15px; }
.lateral .marca small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.8); }
.ponto-vivo { width: 7px; height: 7px; border-radius: 4px; background: #5EEAD4; display: inline-block; }
.lateral a.item {
  min-height: 44px; border-radius: 14px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 500; border: 1px solid transparent;
}
.lateral a.item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.lateral a.item.ativo { color: #fff; background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); font-weight: 700; }
.contador { font-size: 11px; font-weight: 800; color: var(--marinho); background: #93C5FD; border-radius: 999px; padding: 1px 8px; }
.contador.urgente { background: #FCA5A5; }
.lateral .destaque-mes { margin-top: auto; border-radius: 20px; padding: 14px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24); backdrop-filter: blur(14px); }
.lateral .destaque-mes b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; display: block; }
.lateral .destaque-mes span { font-size: 12px; color: rgba(255,255,255,0.85); }
.lateral .usuario { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 8px; font-size: 13px; color: rgba(255,255,255,0.85); }
.lateral .usuario button { background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.barra-inferior { display: none; }

@media (max-width: 999px) {
  .app { padding: 0; gap: 0; }
  .lateral { display: none; }
  .principal { padding-bottom: 96px; }
  .barra-inferior {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
    height: 64px; border-radius: 22px; background: rgba(255,255,255,0.88); backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 79, 191, 0.12); box-shadow: var(--sombra-3);
  }
  .barra-inferior a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--texto-3); font-size: 11px; font-weight: 500; position: relative; }
  .barra-inferior a.ativo { color: var(--royal); font-weight: 700; }
  .barra-inferior a .bolinha { position: absolute; top: 8px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 4px; background: #EF4444; }
}

/* ---------- Topo em degradê (heroi) ---------- */
.heroi {
  position: relative; color: #fff; background: var(--grad-heroi); border-radius: 28px; padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 999px) { .heroi { border-radius: 0 0 30px 30px; padding: 20px 18px 22px; } }
.heroi h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.heroi .sub { font-size: 13px; color: rgba(255,255,255,0.8); }
.heroi-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vidro { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24); backdrop-filter: blur(18px); border-radius: 22px; padding: 16px; }
.botao-vidro {
  height: 44px; min-width: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; position: relative;
}
.botao-vidro:hover { background: rgba(255,255,255,0.22); color: #fff; }
.botao-vidro .bolinha { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 5px; background: #F59E0B; border: 2px solid var(--royal); }
.botao-claro { height: 44px; padding: 0 16px; border-radius: 14px; border: none; background: #fff; color: var(--marinho); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.heroi select { height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.14); color: #fff; padding: 0 10px; font-weight: 600; }
.heroi select option { color: var(--tinta); }

/* ---------- Conteúdo ---------- */
.secao { padding: 0 4px; }
@media (max-width: 999px) { .secao { padding: 0 16px; } }
.titulo-secao { margin: 8px 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cartao { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-2); padding: 14px; }
.grade-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.resumo b { font-size: 24px; font-weight: 800; display: block; }
.resumo span { font-size: 12px; color: var(--texto-2); }
.resumo .ok { color: var(--ok); }
.resumo .atencao { color: var(--atencao); }

.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.linha-consulta {
  width: 100%; text-align: left; border: none; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-1);
  padding: 12px; display: flex; align-items: center; gap: 12px;
}
.linha-consulta:hover { box-shadow: var(--sombra-2); }
.linha-consulta.feita { opacity: 0.72; }
.linha-consulta .meio { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.linha-consulta b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-consulta small { font-size: 12px; color: var(--texto-2); }

.avatar { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.avatar.grande { width: 52px; height: 52px; border-radius: 26px; font-size: 17px; font-weight: 800; }
.av-0 { background: linear-gradient(135deg, #9ED9D2, #3D8FB8); color: #10325A; }
.av-1 { background: linear-gradient(135deg, #B9E6FF, #7AA8FF); color: #17306B; }
.av-2 { background: linear-gradient(135deg, #C9D3E3, #8C9BB5); color: #1E2A44; }
.av-3 { background: linear-gradient(135deg, #E9DCC0, #C9A66B); color: #4A3208; }
.av-4 { background: linear-gradient(135deg, #BFD4F2, #7FA3D9); color: #0B1B3A; }
.av-5 { background: linear-gradient(135deg, #E3E7EE, #C8D0DC); color: #3A4458; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-fundo); }
.chip.atencao { color: var(--atencao); background: var(--atencao-fundo); }
.chip.urgente { color: #fff; background: var(--urgente); }
.chip.neutro { color: var(--texto-2); background: var(--linha-2); }
.chip.azul { color: var(--royal-escuro); background: rgba(47, 107, 255, 0.12); }
.cabeca-fio .chip { background: #fff; }
.heroi .chip.claro { color: #fff; background: rgba(94, 234, 212, 0.18); border: 1px solid rgba(94, 234, 212, 0.45); }

.alerta-urgente {
  border-radius: var(--raio); padding: 12px 14px; background: linear-gradient(135deg, #FDECEC 0%, #FFF4F2 100%);
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tinta);
}
.alerta-urgente .icone { width: 36px; height: 36px; border-radius: 18px; background: linear-gradient(135deg, #EF4444, #B91C1C); display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 6px 14px rgba(185, 28, 28, 0.3); color: #fff; }
.alerta-urgente b { color: #991B1B; font-size: 14px; display: block; }
.alerta-urgente span { font-size: 13px; color: #5B2121; }

/* ---------- Botões e formulários ---------- */
.botao {
  height: 44px; padding: 0 18px; border-radius: 14px; border: none; background: var(--grad-botao); color: #fff;
  font-weight: 700; font-size: 14px; box-shadow: 0 8px 20px rgba(30, 79, 191, 0.3); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.botao:hover { color: #fff; filter: brightness(1.05); }
.botao:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.botao.grande { height: 54px; border-radius: 18px; font-size: 16px; width: 100%; }
.botao.pequeno { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; box-shadow: none; }
.botao-sec {
  height: 44px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--linha); background: #fff; color: var(--tinta);
  font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.botao-sec:hover { border-color: #b9c6d6; color: var(--tinta); }
.botao-sec.pequeno { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.botao-sec.perigo { color: var(--urgente); border-color: #F5C2C2; }
.botao-icone { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--linha); background: #fff; display: inline-grid; place-items: center; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--texto-2); }
.campo input, .campo select, .campo textarea {
  min-height: 46px; border-radius: 12px; border: 1px solid #D3DCE7; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--tinta); background: #fff; width: 100%;
}
.campo textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.campo .ajuda { font-weight: 500; color: var(--texto-3); }
.linha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form { display: flex; flex-direction: column; gap: 14px; }

.opcoes-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opcao {
  min-height: 52px; border-radius: 16px; border: 1px solid var(--linha); background: #fff; font-weight: 600; font-size: 15px; text-align: left; padding: 0 16px;
}
.opcoes-2 .opcao { text-align: center; }
.opcao[aria-pressed="true"] { border: none; background: var(--grad-botao); color: #fff; box-shadow: 0 8px 20px rgba(30, 79, 191, 0.3); }
.opcao-aberta { border-radius: 18px; padding: 14px 16px; background: linear-gradient(135deg, rgba(47, 107, 255, 0.08), rgba(20, 150, 160, 0.08)); border: 1.5px solid rgba(30, 79, 191, 0.45); display: flex; flex-direction: column; gap: 10px; }
.opcao-aberta > b { color: var(--royal-escuro); }
.vagas { display: flex; flex-wrap: wrap; gap: 8px; }
.vaga { height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--linha); background: #fff; font-weight: 600; font-size: 13px; }
.vaga[aria-pressed="true"] { background: var(--grad-botao); color: #fff; border: none; }

.interruptor { width: 52px; height: 32px; border-radius: 16px; border: none; background: #DCE3EC; padding: 3px; display: flex; justify-content: flex-start; flex-shrink: 0; transition: background 0.15s; }
.interruptor span { width: 26px; height: 26px; border-radius: 13px; background: #fff; display: block; box-shadow: 0 2px 6px rgba(15, 30, 70, 0.2); }
.interruptor[aria-checked="true"] { background: var(--grad-botao); justify-content: flex-end; box-shadow: 0 4px 12px rgba(30, 79, 191, 0.3); }
.interruptor:disabled { opacity: 0.5; cursor: not-allowed; }

.segmentado { display: inline-flex; background: rgba(255,255,255,0.8); border: 1px solid #DCE3EC; border-radius: 14px; padding: 4px; }
.segmentado button { height: 36px; padding: 0 14px; border: none; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.segmentado button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 8px rgba(15, 30, 70, 0.12); color: var(--tinta); font-weight: 700; }

/* ---------- Folha inferior (celular) / janela (computador) ---------- */
.fundo-folha { position: fixed; inset: 0; background: rgba(11, 27, 58, 0.45); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.folha {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: rgba(255,255,255,0.98); border-radius: 30px 30px 0 0;
  padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 -10px 40px rgba(11, 27, 58, 0.25);
}
.folha .alca { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #D3DCE7; flex-shrink: 0; }
.folha h2 { margin: 0; font-size: 20px; font-weight: 800; }
.folha .cabeca { display: flex; align-items: center; gap: 12px; }
.folha .cabeca small { display: block; font-size: 13px; color: var(--texto-2); }
.folha fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.folha legend { font-size: 15px; font-weight: 700; margin-bottom: 10px; padding: 0; }
.acoes-folha { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 1000px) {
  .fundo-folha { align-items: center; }
  .folha { border-radius: 28px; padding: 24px 26px 26px; }
  .folha .alca { display: none; }
}

.aviso-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 80; background: var(--marinho); color: #fff;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--sombra-3); font-size: 14px; font-weight: 600; max-width: calc(100vw - 32px);
}
.aviso-toast.erro { background: var(--urgente); }
@media (min-width: 1000px) { .aviso-toast { bottom: 28px; } }

.vazio { text-align: center; color: var(--texto-2); padding: 28px 16px; font-size: 14px; }
.carregando { padding: 40px; text-align: center; color: var(--texto-3); }

/* ---------- Login ---------- */
.tela-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--grad-heroi); }
.caixa-login { width: 100%; max-width: 420px; background: rgba(255,255,255,0.97); border-radius: 28px; padding: 30px 26px; box-shadow: 0 20px 60px rgba(11, 27, 58, 0.35); display: flex; flex-direction: column; gap: 18px; }
.caixa-login h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.caixa-login p { margin: 0; color: var(--texto-2); font-size: 14px; }
.erro-form { color: var(--urgente); font-size: 14px; font-weight: 600; }

/* ---------- Agenda ---------- */
.barra-agenda { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 4px 0; }
@media (max-width: 999px) { .barra-agenda { padding: 16px 16px 0; } }
.barra-agenda h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.barra-agenda .grupo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.barra-agenda select { height: 44px; border-radius: 14px; border: 1px solid var(--linha); background: #fff; padding: 0 12px; font-weight: 600; }
.legenda { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; font-weight: 600; color: #475569; padding: 0 4px; }
@media (max-width: 999px) { .legenda { padding: 0 16px; } }
.legenda span { display: flex; align-items: center; gap: 6px; }
.legenda i { width: 14px; height: 14px; border-radius: 5px; display: inline-block; }
.legenda .p0 { background: var(--grad-prof-0); }
.legenda .p1 { background: var(--grad-prof-1); }
.legenda .p2 { background: var(--grad-prof-2); }
.legenda .pend { background: var(--atencao-fundo); border: 1.5px dashed var(--atencao-borda); }
.quadro-agenda { overflow-x: auto; background: rgba(255,255,255,0.88); backdrop-filter: blur(16px); border: 1px solid #E4EAF2; border-radius: 26px; box-shadow: var(--sombra-2); }
@media (max-width: 999px) { .quadro-agenda { margin: 0 12px; border-radius: 22px; } }
.grade-agenda { display: grid; padding: 0 10px 10px 0; }
.dia-cabeca { height: 56px; display: flex; flex-direction: column; justify-content: center; padding-left: 10px; }
.dia-cabeca small { font-size: 12px; color: var(--texto-2); font-weight: 600; text-transform: capitalize; }
.dia-cabeca b { font-size: 18px; font-weight: 800; }
.dia-cabeca.hoje b { display: inline-flex; align-self: flex-start; background: var(--grad-botao); color: #fff; border-radius: 10px; padding: 0 8px; }
.coluna-horas span { display: block; font-size: 11px; font-weight: 600; color: var(--texto-4); text-align: right; padding-right: 10px; }
.coluna-dia { position: relative; border-left: 1px solid var(--linha-2); cursor: copy; }
.coluna-dia.hoje { background: linear-gradient(180deg, rgba(47, 107, 255, 0.06), rgba(47, 107, 255, 0.02)); }
.coluna-dia .linha-hora { position: absolute; left: 0; right: 0; height: 1px; background: #F1F4F8; pointer-events: none; }
.bloco {
  position: absolute; left: 5px; right: 5px; border-radius: 12px; padding: 6px 10px; border: none; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; color: #fff; cursor: pointer; font-size: 11px; line-height: 1.3;
}
.bloco b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bloco.p0 { background: var(--grad-prof-0); box-shadow: 0 6px 16px rgba(30, 79, 191, 0.25); }
.bloco.p1 { background: var(--grad-prof-1); box-shadow: 0 6px 16px rgba(15, 94, 110, 0.25); }
.bloco.p2 { background: var(--grad-prof-2); }
.bloco.pendente { background: rgba(255, 170, 60, 0.16); border: 1.5px dashed var(--atencao-borda); color: var(--tinta); box-shadow: none; }
.bloco.pendente span { color: var(--atencao); font-weight: 600; }
.bloco.feito { opacity: 0.6; }
.bloqueio { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(30, 79, 191, 0.07) 0 8px, rgba(30, 79, 191, 0) 8px 16px); pointer-events: none; }
.bloqueio span { position: absolute; top: 6px; left: 8px; right: 8px; font-size: 11px; font-weight: 700; color: #475569; background: rgba(255,255,255,0.92); border-radius: 8px; padding: 3px 8px; }
.agora { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #EF4444, rgba(239, 68, 68, 0.2)); pointer-events: none; z-index: 2; }
.agora::before { content: ""; position: absolute; left: -5px; top: -5px; width: 12px; height: 12px; border-radius: 6px; background: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2); }

/* ---------- Conversas ---------- */
.conversas { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; min-height: calc(100vh - 28px); }
@media (max-width: 999px) { .conversas { grid-template-columns: 1fr; min-height: 0; } .conversas.com-aberta .lista-conversas { display: none; } .conversas:not(.com-aberta) .fio { display: none; } }
.lista-conversas { background: #fff; border-radius: 26px; box-shadow: var(--sombra-2); overflow: hidden; display: flex; flex-direction: column; }
@media (max-width: 999px) { .lista-conversas { border-radius: 0; box-shadow: none; background: transparent; } }
.lista-conversas .topo { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--linha-2); }
.lista-conversas h1 { margin: 0; font-size: 24px; font-weight: 800; }
.item-conversa { display: flex; gap: 12px; align-items: center; padding: 12px 16px; text-decoration: none; color: var(--tinta); border-bottom: 1px solid var(--linha-2); }
.item-conversa:hover, .item-conversa.ativo { background: #F3F6FA; color: var(--tinta); }
.item-conversa .meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-conversa b { font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.item-conversa b time { font-size: 11px; font-weight: 500; color: var(--texto-3); }
.item-conversa small { font-size: 13px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fio { background: #fff; border-radius: 26px; box-shadow: var(--sombra-2); display: flex; flex-direction: column; overflow: hidden; min-height: 70vh; }
@media (max-width: 999px) { .fio { border-radius: 0; min-height: calc(100vh - 96px); } }
.fio .cabeca-fio { padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #fff; background: var(--grad-heroi); }
.fio .cabeca-fio .meio { flex: 1; min-width: 140px; }
.fio .cabeca-fio small { display: block; color: rgba(255,255,255,0.8); font-size: 12px; }
.mensagens { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, #F3F6FA, #F8FAFC); }
.balao { max-width: min(78%, 520px); padding: 10px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 2px 8px rgba(15, 30, 70, 0.06); }
.balao small { display: block; font-size: 11px; margin-top: 4px; opacity: 0.75; }
.balao.paciente { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.balao.ia { align-self: flex-end; background: rgba(47, 107, 255, 0.12); border-bottom-right-radius: 4px; }
.balao.humano { align-self: flex-end; background: var(--marinho); color: #fff; border-bottom-right-radius: 4px; }
.balao.sistema { align-self: flex-end; background: #E9EEF5; color: #334155; border-bottom-right-radius: 4px; }
.balao .botoes-msg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.balao .botoes-msg span { font-size: 12px; font-weight: 700; color: var(--royal-escuro); background: #fff; border-radius: 10px; padding: 5px 10px; }
.balao.erro-envio { outline: 2px solid #F5C2C2; }
.compor { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--linha-2); background: #fff; align-items: flex-end; }
.compor textarea { flex: 1; min-height: 46px; max-height: 160px; border-radius: 14px; border: 1px solid #D3DCE7; padding: 12px; resize: none; font-size: 15px; }
.faixa-aviso { padding: 10px 16px; font-size: 13px; background: var(--atencao-fundo); color: var(--atencao); font-weight: 600; }

/* ---------- Pacientes ---------- */
.etapas { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 6px; }
@media (max-width: 999px) { .etapas { padding: 2px 16px 6px; } }
.etapas button { flex-shrink: 0; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--linha); background: #fff; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.etapas button[aria-pressed="true"] { background: var(--grad-botao); color: #fff; border: none; }
.etapas button em { font-style: normal; font-size: 12px; opacity: 0.8; }
.busca { height: 46px; border-radius: 14px; border: 1px solid var(--linha); padding: 0 14px; background: #fff; width: 100%; max-width: 360px; font-size: 15px; }
.heroi .busca { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.95); }
.item-paciente { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tinta); background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-1); padding: 12px; }
.item-paciente:hover { box-shadow: var(--sombra-2); color: var(--tinta); }
.item-paciente .meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-paciente small { font-size: 12px; color: var(--texto-2); }
.grade-ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 999px) { .grade-ficha { grid-template-columns: 1fr; padding: 0 16px; } }
.linha-ajuste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linha-2); }
.linha-ajuste:last-child { border-bottom: none; }
.linha-ajuste span { display: flex; flex-direction: column; gap: 2px; }
.linha-ajuste small { color: var(--texto-2); font-size: 12px; }
.historico li { padding: 10px 0; border-bottom: 1px solid var(--linha-2); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.historico li:last-child { border-bottom: none; }
.historico small { display: block; color: var(--texto-2); font-size: 12px; }

/* ---------- Mensagens automáticas ---------- */
.automacao { background: #fff; border-radius: 20px; box-shadow: var(--sombra-2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.automacao .topo-auto { display: flex; align-items: center; gap: 12px; }
.automacao .icone-auto { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.automacao .meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: none; padding: 0; }
.automacao .meio b { font-size: 15px; }
.automacao .meio small { font-size: 12px; color: var(--texto-2); }
.previa { background: linear-gradient(135deg, #EEF6F8, #EEF2FA); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.previa .balao-previa { align-self: flex-start; max-width: 360px; background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 2px 8px rgba(15, 30, 70, 0.06); white-space: pre-wrap; }
.previa .botoes-msg { display: flex; flex-wrap: wrap; gap: 6px; }
.previa .botoes-msg span { font-size: 12px; font-weight: 700; color: var(--royal-escuro); background: #fff; border-radius: 10px; padding: 6px 12px; }

/* ---------- Mais / números ---------- */
.menu-mais a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; text-decoration: none; color: var(--tinta); font-weight: 600; border-bottom: 1px solid var(--linha-2); }
.menu-mais a:last-child { border-bottom: none; }
.menu-mais a small { display: block; font-weight: 500; color: var(--texto-2); font-size: 12px; margin-top: 2px; }
.grade-numeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.numero b { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; display: block; }
.numero span { font-size: 13px; color: var(--texto-2); }
.numero.destaque { background: var(--grad-heroi); color: #fff; }
.numero.destaque span { color: rgba(255,255,255,0.85); }

/* ---------- Simulador ---------- */
.simulador { max-width: 460px; width: 100%; margin: 0 auto; background: #fff; border-radius: 28px; box-shadow: var(--sombra-3); overflow: hidden; display: flex; flex-direction: column; height: min(760px, calc(100vh - 140px)); }
.simulador .botoes-resp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.simulador .botoes-resp button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(30, 79, 191, 0.25); background: #fff; color: var(--royal-escuro); font-weight: 700; font-size: 13px; }

/* ---------- Ajustes ---------- */
.nome-prox { margin: 2px 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.alerta-urgente .meio { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fio-sim { padding: 14px 16px; color: #fff; background: var(--grad-heroi); }
.fio-sim small { color: rgba(255,255,255,0.8); }
.heroi .sub, .vidro .sub { color: rgba(255,255,255,0.8); }
.secao .sub, .folha .sub, .barra-agenda .sub { color: var(--texto-2); font-size: 13px; margin: 0; }
details summary { cursor: pointer; padding: 6px 0; }
.lista-conversas .segmentado { align-self: flex-start; }
.titulo-secao .botao-sec { flex-shrink: 0; }
.heroi-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.heroi-controles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.heroi-controles select { flex: 1; min-width: 160px; max-width: 280px; height: 44px; border-radius: 14px; }
.botao-vidro:disabled { opacity: 0.45; cursor: default; }
.faixa-aviso.urgente { background: var(--urgente-fundo); color: #991B1B; }
.fab { position: fixed; right: 20px; bottom: 92px; z-index: 31; width: 56px; height: 56px; border-radius: 28px; border: none; background: var(--grad-botao); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(30, 79, 191, 0.45); }
.so-cel { display: none !important; }
@media (max-width: 999px) {
  .so-cel { display: inline-flex !important; }
  .fab.so-cel { display: grid !important; }
  .so-pc { display: none !important; }
  .barra-agenda h1 { font-size: 24px; }
  .barra-agenda .grupo { gap: 6px; }
  .barra-agenda .grupo .botao-sec, .barra-agenda .grupo .botao-icone, .barra-agenda select { height: 40px; }
  .barra-agenda .grupo .botao-icone { width: 40px; }
}

/* ---------- Administração ---------- */
.segmentado-vidro { display: inline-flex; flex-wrap: wrap; gap: 4px; align-self: flex-start; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.24); backdrop-filter: blur(14px); border-radius: 16px; padding: 4px; }
.segmentado-vidro button { height: 38px; padding: 0 14px; border: none; border-radius: 12px; background: transparent; color: rgba(255,255,255,0.85); font-weight: 600; font-size: 14px; }
.segmentado-vidro button[aria-selected="true"] { background: #fff; color: var(--marinho); font-weight: 700; }
.linha-admin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.linha-admin .meio { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.linha-admin small { font-size: 12px; color: var(--texto-2); }
.linha-admin small.horarios { white-space: pre-wrap; color: var(--royal-escuro); font-weight: 600; }
.linha-admin.inativo { opacity: 0.6; }
.dia-horario { border-bottom: 1px solid var(--linha-2); padding-bottom: 8px; }
.periodos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 6px; }
.periodos .campo input { min-height: 42px; width: 112px; padding: 8px 10px; }
.periodos .ate { font-size: 13px; color: var(--texto-2); }
.periodos .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texto-2); margin-left: 6px; }
.periodos input:disabled { opacity: 0.4; }
.senha-provisoria { display: flex; flex-direction: column; gap: 12px; background: linear-gradient(135deg, #EEF6F8, #EEF2FA); box-shadow: none; }
.senha-provisoria span { display: flex; flex-direction: column; gap: 2px; }
.senha-provisoria small { font-size: 12px; color: var(--texto-2); font-weight: 600; }
.senha-provisoria b { font-size: 20px; letter-spacing: 0.04em; word-break: break-all; }
.lateral .usuario { flex-direction: column; align-items: stretch; }
.lateral .usuario .nome-usuario { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .usuario .botoes-usuario { display: flex; gap: 6px; }
.lateral .usuario .botoes-usuario button { flex: 1; }
.periodos .campo input { width: 132px; }

/* ---------- Prospecção ---------- */
.estados { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.estados .chip { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.28); }
.estados .chip.ok { background: rgba(94, 234, 212, 0.18); border-color: rgba(94, 234, 212, 0.45); color: #fff; }
.estados .chip.atencao { background: rgba(255, 170, 60, 0.25); border-color: rgba(255, 170, 60, 0.6); color: #fff; }
.grade-resumo.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .grade-resumo.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.filtros button { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--linha); background: #fff; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.filtros button[aria-pressed="true"] { background: var(--marinho); border-color: var(--marinho); color: #fff; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 16px; }
.qr img { width: 260px; height: 260px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.upload input[type=file] { font-size: 13px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th, .tabela td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linha-2); }
.tabela th { color: var(--texto-2); font-weight: 600; }
.relatorio-texto { white-space: pre-wrap; font-size: 13px; line-height: 1.5; margin: 0; }
.nota small { color: var(--texto-2); }
.problemas { max-height: 220px; overflow-y: auto; font-size: 13px; }
.dias-semana { display: flex; flex-wrap: wrap; gap: 6px; }
.dias-semana label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.balao.saida { align-self: flex-end; background: rgba(47, 107, 255, 0.12); border-bottom-right-radius: 4px; }
.balao.entrada { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.form > .botao.pequeno, .form > .botao-sec.pequeno { align-self: flex-start; min-width: 120px; }
a.cartao { text-decoration: none; color: inherit; }
a.cartao:hover { box-shadow: var(--sombra-2); color: inherit; }
.relatorio-texto { font-family: var(--fonte); }

/* Avisos do início: abrir a conversa e responder agora */
.acoes-aviso { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- Robô de promoções ---------- */
.oferta { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra-1); padding: 12px; }
.oferta img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--linha-2); flex-shrink: 0; }
.oferta .meio { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.oferta .meio b { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oferta .preco { font-size: 15px; font-weight: 800; }
.oferta .preco s { color: var(--texto-3); font-weight: 500; font-size: 13px; margin-right: 6px; }
.oferta .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.texto-copia { white-space: pre-wrap; font-size: 13px; line-height: 1.45; background: var(--linha-2); border-radius: 12px; padding: 12px; margin: 0 0 8px; word-break: break-word; }
.grade-canais { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grade-canais .cartao b.grande { font-size: 28px; font-weight: 800; display: block; }
.previa-link { display: flex; gap: 12px; align-items: center; }
.previa-link img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.filtros-ofertas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtros-ofertas .segmentado { overflow-x: auto; max-width: 100%; }
.filtros-ofertas .segmentado button { white-space: nowrap; flex-shrink: 0; }
.texto-copia { font-family: var(--fonte); }
