/* Painel do prestador: celular primeiro (menu embaixo); a partir de 900 px, menu à esquerda. */
html, body { height: 100%; }
body { overscroll-behavior-y: none; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 400px; }
.logo-login { height: 40px; display: block; margin: 4px 0 16px; }
.pe-login { text-align: center; margin: 16px 0 0; }
.app { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.barra { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--papel); border-bottom: 1px solid var(--linha); }
.logo-barra { height: 32px; width: 32px; flex: none; }
.titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.titulo strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--papel); border-top: 1px solid var(--linha);
  padding-bottom: env(safe-area-inset-bottom); }
.menu a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; color: var(--suave); text-decoration: none; font-size: .7rem; font-weight: 600; }
.menu a span { font-size: 1.15rem; line-height: 1; }
.menu a[aria-current="page"] { color: var(--acento); }
.menu .extra { display: none; }
main#vista { padding: 16px; max-width: 900px; width: 100%; min-width: 0; margin: 0 auto; outline: none; }
.app > * { min-width: 0; }
.chat, .mensagens, .compor, .atalhos { min-width: 0; max-width: 100%; }
@media (min-width: 900px) {
  .app { grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; padding-bottom: 0; }
  .barra { grid-column: 1 / -1; }
  .menu { position: sticky; top: 57px; align-self: start; height: calc(100dvh - 57px); display: flex; flex-direction: column; border-top: 0; border-right: 1px solid var(--linha); padding: 12px 8px; }
  .menu a { flex-direction: row; gap: 10px; font-size: .95rem; padding: 10px 12px; border-radius: 10px; }
  .menu a[aria-current="page"] { background: color-mix(in srgb, var(--trena) 22%, transparent); color: var(--texto); }
  .menu .extra { display: flex; } .menu .so-celular { display: none; }
}
h1.vt { font-size: 1.35rem; margin: 4px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px; }
.kpi small { color: var(--suave); display: block; font-size: .78rem; }
.kpi b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.lista { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lista > li, .linha { background: var(--papel); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.lista > li.toca { cursor: pointer; }
@media (hover: hover) { .lista > li.toca:hover { border-color: var(--acento); } }
.lista .principal { min-width: 0; flex: 1 1 55%; }
.lista > li { flex-wrap: wrap; row-gap: 8px; }
.lista > li > .btn { flex: 0 0 auto; }
.acoes input { min-width: 0; }
.lista .principal b, .lista .principal span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista .valor { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--suave) 16%, transparent); color: var(--texto); }
.chip.enviado, .chip.agendada { background: color-mix(in srgb, var(--trena) 35%, transparent); }
.chip.convertido, .chip.concluida, .chip.paga, .chip.feita { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.chip.recusado, .chip.vencido, .chip.cancelada { background: color-mix(in srgb, var(--alerta) 18%, transparent); }
.secao { margin: 22px 0 8px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--suave); }
.vazio { text-align: center; color: var(--suave); padding: 28px 12px; }
.form-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-linha > div { min-width: 0; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.aviso-flutuante { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--grafite); color: #fff; padding: 10px 16px;
  border-radius: 12px; font-weight: 600; z-index: 9; max-width: calc(100vw - 32px); animation: sobe 200ms var(--curva); }
@keyframes sobe { from { opacity: 0; transform: translate(-50%, 8px); } }
.banner { background: color-mix(in srgb, var(--trena) 22%, var(--papel)); border: 1px solid color-mix(in srgb, var(--trena) 60%, transparent); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
/* simulador do WhatsApp */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 57px - 68px - 32px - env(safe-area-inset-bottom)); min-height: 380px; background: #ECE5DD; border-radius: 16px; overflow: hidden; border: 1px solid var(--linha); }
@media (min-width: 900px) { .chat { height: calc(100dvh - 57px - 32px); } }
:root[data-theme="dark"] .chat { background: #0B141A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chat { background: #0B141A; } }
.chat-topo { background: #075E54; color: #fff; padding: 10px 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.chat-topo small { font-weight: 400; opacity: .8; }
.mensagens { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 86%; padding: 7px 10px; border-radius: 10px; white-space: pre-wrap; word-wrap: break-word; font-size: .93rem; line-height: 1.38; color: #111; box-shadow: 0 1px 0 rgb(0 0 0 / .08); }
.msg.entrada { align-self: flex-end; background: #D9FDD3; }
.msg.saida { align-self: flex-start; background: #fff; }
.msg .doc { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px; border-radius: 8px; background: #F0F2F5; color: #111; text-decoration: none; font-weight: 600; }
.msg .doc b { background: #B3261E; color: #fff; font-size: .68rem; padding: 3px 5px; border-radius: 4px; }
.msg.digitando { color: #667; font-style: italic; }
.compor { display: flex; gap: 8px; padding: 8px; background: #F0F2F5; align-items: flex-end; }
:root[data-theme="dark"] .compor { background: #1F2C33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .compor { background: #1F2C33; } }
.compor textarea { resize: none; min-height: 44px; max-height: 120px; border-radius: 22px; padding: 11px 16px; border: 0; }
.redondo { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: #00A884; color: #fff; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }
.redondo.gravando { background: #B3261E; animation: pulsa 1s infinite; }
@keyframes pulsa { 50% { transform: scale(1.08); } }
.atalhos { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px 0; background: #F0F2F5; scrollbar-width: none; }
:root[data-theme="dark"] .atalhos { background: #1F2C33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .atalhos { background: #1F2C33; } }
.atalhos button { flex: none; border: 1px solid #cfd6db; background: #fff; color: #111; border-radius: 99px; padding: 5px 12px; font-size: .82rem; cursor: pointer; }
dialog { border: 0; border-radius: 16px; padding: 18px; width: min(520px, calc(100vw - 32px)); background: var(--papel); color: var(--texto); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
