/* Cores padrão (a cor principal é sobrescrita pela personalização do painel; troque aqui as cores/fonte quando tiver a identidade oficial) */
:root {
  --brand: #0b57d0;
  --brand-dark: color-mix(in srgb, var(--brand) 62%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --accent: #12b886;
  --red: #e03131;
  --amber: #f08c00;
  --ink: #16202e;
  --muted: #5d6b7e;
  --line: #e3e8ef;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.chat { display: flex; flex-direction: column; min-height: 0; height: 100%; position: relative; font-family: var(--font); color: var(--ink); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.msg { display: flex; max-width: 86%; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; }
.msg.card { flex-direction: column; max-width: 92%; width: 320px; }
.msg.sys { align-self: center; max-width: 90%; }
.msg.sys span { font-size: 12px; background: rgba(255, 255, 255, 0.85); color: var(--muted); padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msg.pop { animation: pop 0.22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }

.bubble { padding: 7px 10px 6px; border-radius: 10px; font-size: 14.5px; line-height: 1.38; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); overflow-wrap: anywhere; position: relative; }
.msg.out .bubble { background: var(--brand); color: #fff; }
.bubble .meta { float: right; font-size: 11px; margin: 6px 0 -3px 10px; opacity: 0.6; white-space: nowrap; }
.msg.card .meta { align-self: flex-end; font-size: 11px; color: var(--muted); margin: 2px 4px 0; }
.bubble .autor { font-size: 12px; font-weight: 700; color: #c2255c; margin-bottom: 2px; }
.ticks { color: #53bdeb; letter-spacing: -3px; }

.typing .bubble { display: flex; gap: 4px; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa5b4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; justify-content: flex-end; }
.chat-quick:empty { display: none; }
.chat-quick button { font: inherit; font-size: 13.5px; border: 1.5px solid var(--brand); color: var(--brand); background: #fff; border-radius: 18px; padding: 6px 12px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.chat-quick button:hover { background: var(--brand); color: #fff; }

.chat-form { display: flex; gap: 8px; padding: 8px 10px 10px; align-items: center; }
.chat-input { flex: 1; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px; outline: none; background: #fff; min-width: 0; }
.chat-input:focus { border-color: var(--brand); }
.chat-send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: #1f2937; color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 8px; max-width: 85%; text-align: center; z-index: 5; animation: pop 0.2s; }

/* ---------- cartões ---------- */
.pc { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); font-size: 13.5px; }
.pc p { margin: 6px 0 0; line-height: 1.4; }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--ink); }
.pc-head > span:first-child { display: flex; align-items: center; gap: 6px; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.tag-green { background: #d3f9e8; color: #087f5b; }
.tag-red { background: #ffe3e3; color: #c92a2a; }
.tag-blue { background: var(--brand-soft); color: var(--brand); }
.pc-valor { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; }
.pc-sub { color: var(--muted); font-size: 12.5px; }
.pc-pix { display: flex; gap: 10px; align-items: center; background: #f6f8fb; border-radius: 10px; padding: 8px; margin: 10px 0; }
.pc-qr { flex: none; border-radius: 6px; overflow: hidden; line-height: 0; }
.pc-qr svg { width: 92px; height: 92px; }
.pc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; margin: 4px 0 2px; }
.pc-code { font-size: 11.5px; color: var(--ink); word-break: break-all; line-height: 1.35; }
.pc-code.mono { font-family: ui-monospace, Consolas, monospace; background: #f6f8fb; border-radius: 6px; padding: 6px; }
.pc-btn { font: inherit; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; width: 100%; }
.pc-btn.ghost { background: var(--brand-soft); color: var(--brand); }
.pc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; }
.pc-grid div { display: flex; flex-direction: column; gap: 1px; }
.pc-grid .full { grid-column: 1 / -1; }
.pc-grid small { color: var(--muted); font-size: 11px; }
.pc-grid b { font-size: 13px; }
.pc-grid .warn b { color: var(--red); }
.pc-proto { margin-top: 8px; font-size: 13px; background: #f6f8fb; border: 1px dashed #c5cfdc; border-radius: 8px; padding: 8px; text-align: center; }
.pc-proto b { font-size: 17px; letter-spacing: 1px; display: block; }
.pc-upg { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-top: 10px; }
.pc-upg span:first-child { color: var(--muted); text-decoration: line-through; }
.pc-upg .arrow { color: var(--accent); font-weight: 800; }
.pc-upg b { color: var(--brand); font-size: 20px; }

.pc-planos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-plano { font: inherit; text-align: left; position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 10px 10px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: transform 0.12s, border-color 0.12s; display: flex; flex-direction: column; }
.pc-plano:hover { transform: translateY(-2px); border-color: var(--brand); }
.pc-plano.dest { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-soft), #fff 60%); }
.pc-badge { position: absolute; top: -9px; left: 10px; background: var(--amber); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.pc-pnome { font-weight: 800; font-size: 17px; color: var(--brand-dark); }
.pc-ppreco { font-weight: 800; font-size: 16px; margin-top: 2px; }
.pc-ppreco small { font-weight: 500; font-size: 11px; color: var(--muted); }
.pc-plano ul { margin: 6px 0 8px; padding-left: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.45; flex: 1; }
.pc-pcta { font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); text-align: center; border-radius: 6px; padding: 5px; }

/* faixa de demonstração: mostra o que a IA gravou no sistema do provedor */
.pc-bast { margin: 10px -12px -12px; padding: 7px 12px; background: #f1f3f5; border-top: 1px dashed #ced4da; color: #495057; font-size: 11.5px; line-height: 1.4; border-radius: 0 0 12px 12px; }
.pc-bast b { color: #212529; }

/* áudio (microfone, gravação e bolha de áudio) */
.chat-form { position: relative; }
.chat-mic { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: none; place-items: center; }
.chat-form.com-audio.vazio .chat-mic { display: grid; }
.chat-form.com-audio.vazio .chat-send { display: none; }
.chat-rec { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px 14px; background: inherit; background-color: #f0f2f5; }
.chat-rec[hidden] { display: none; }
.rec-x { background: none; border: 0; color: #54656f; cursor: pointer; padding: 6px; display: grid; place-items: center; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e03131; animation: rec-pulsa 1s infinite; }
.rec-t { font-variant-numeric: tabular-nums; font-size: 15px; color: #111b21; }
.rec-dica { flex: 1; font-size: 13.5px; color: #54656f; }
.rec-ok { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
@keyframes rec-pulsa { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.aud-bub { min-width: 220px; }
.aud { display: flex; align-items: center; gap: 10px; }
.aud-play { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; display: grid; place-items: center; }
.aud-play[disabled] { opacity: 0.5; cursor: default; }
.aud-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.15); overflow: hidden; }
.aud-bar i { display: block; height: 100%; width: 0; background: currentColor; }
.aud-dur { font-size: 12px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.aud-mic { display: grid; opacity: 0.6; }
.aud-mic svg { width: 16px; height: 16px; }
.aud-tx { font-size: 13px; font-style: italic; opacity: 0.85; margin-top: 6px; }
