/* Grafite Neon — mesmo visual dos protótipos */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  /* Grafite Neon White */
  --bg: #F6F8F3; --card: #FFFFFF; --card-2: #F1F5EC; --line: #E3E8DD; --line-2: #DDE3D6; --line-3: #C9D0C3;
  --text: #111413; --muted: #5B635D; --soft: #3D443F;
  --accent: #B9ED80; --ink: #2F6B12; --green: #2F6B12; --ok: #1E7A44; --warn: #8A5A00; --info: #1F4E99;
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, system-ui, sans-serif; margin: 0; }
a { color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; }
.brand::before { content: ""; width: 28px; height: 28px; flex: none; background: url("/static/logo.svg") center / contain no-repeat; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line-3); background: transparent; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); color: #111413; border-color: var(--accent); }
.btn.small-btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { width: 48px; height: 48px; flex: none; border-radius: 14px; border: 1px solid var(--line-3); background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-btn.primary { background: var(--accent); border-color: var(--accent); color: #111413; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(17,20,19,.04); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); resize: vertical; }
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }

.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ia { background: #EAF6DC; color: var(--green); }
.pill.aguardando { background: #FFF3D6; color: var(--warn); }
.pill.humano { background: #E3EEFF; color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ok); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.error { color: #B42318; font-size: 14px; min-height: 20px; }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #111413; display: grid; place-items: center; font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-weight: 700; flex: none; }
.chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; }
.bubble { max-width: 80%; padding: 12px 16px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: #EEF2EA; border-radius: 18px 18px 18px 4px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #111413; border-radius: 18px 18px 4px 18px; }
.bubble.human { align-self: flex-end; background: #E3EEFF; color: #1F4E99; border-radius: 18px 18px 4px 18px; }
.bubble.typing { color: var(--muted); }
.composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 48px; max-height: 160px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line-3); background: var(--bg); resize: none; }

/* Opções de conexão */
.choice { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--bg); border: 2px solid var(--line-2); cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--ink); background: #F4FBEC; }
.choice .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qr-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-2); }
.qr-box img { width: 200px; height: 200px; border-radius: 10px; background: #fff; padding: 6px; }
