/* Turina — esqueleto visual (roxo = cor da marca) */
:root {
  --roxo: #7c3aed; --roxo-escuro: #4c1d95; --fundo: #f6f3fc;
  --bolha-eu: #7c3aed; --bolha-ela: #ffffff; --texto: #241b35;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--texto); background: var(--fundo); }
button { cursor: pointer; }
.hidden { display: none !important; }
.error { color: #b91c1c; min-height: 1.2em; }
.hint { color: #6b6480; }
.linklike { background: none; border: none; color: var(--roxo); }

.avatar { border-radius: 50%; background: linear-gradient(135deg, var(--roxo), #c084fc);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar-img { object-fit: cover; object-position: 57% 50%; padding: 0;
  border: 2px solid #ede9fe; background: #3b116e; }
.avatar-lg { width: 72px; height: 72px; font-size: 34px; }
.avatar-sm { width: 34px; height: 34px; font-size: 17px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; display: block; }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: #fff; padding: 28px; border-radius: 18px; width: min(380px, 92vw);
  box-shadow: 0 10px 30px rgba(76,29,149,.15); text-align: center; }
.login-card .avatar { margin: 0 auto 8px; }
.login-card form { margin-top: 18px; text-align: left; }
.login-card input, .panel input { width: 100%; padding: 11px; margin: 6px 0;
  border: 1px solid #ddd6f5; border-radius: 10px; font-size: 15px; }
.login-card button, .panel form button { width: 100%; padding: 11px; border: none; border-radius: 10px;
  background: var(--roxo); color: #fff; font-size: 15px; font-weight: 600; }
.tagline { color: #6b6480; margin-top: -8px; }

/* ---------- App ---------- */
.app-body { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #fff; border-right: 1px solid #e7e2f7;
  display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; padding: 4px 8px 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav button { text-align: left; background: none; border: none; padding: 9px 10px;
  border-radius: 9px; font-size: 15px; color: var(--texto); }
.sidebar nav button:hover { background: var(--fundo); }
.sidebar nav button.active { background: #ede9fe; font-weight: 600; }
.sidebar-foot { border-top: 1px solid #eee; padding-top: 10px; font-size: 13px; }
.whoami { color: #6b6480; margin-bottom: 4px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
/* Linha 1: frentes abertas com status · Linha 2: aba ativa */
.tabrow { display: flex; gap: 8px; align-items: center; padding: 8px 14px; overflow-x: auto; }
.tabrow-fronts { background: #fff; border-bottom: 1px solid #e7e2f7; }
.front-chip { white-space: nowrap; font-size: 13px; padding: 5px 11px; border-radius: 999px;
  background: var(--fundo); border: 1px solid #e7e2f7; }
.front-chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: #22c55e; } .dot.wait { background: #eab308; } .dot.off { background: #cbd5e1; }
.tabrow-active { background: var(--roxo-escuro); color: #fff; font-weight: 600; font-size: 15px; }

.panel { padding: 18px; }
.panel-chat { flex: 1; display: flex; flex-direction: column; padding: 0; }
.chat-head { text-align: center; padding: 16px 0 8px; }
.chat-head .avatar { margin: 0 auto; }
.chat-head-name { font-weight: 700; font-size: 18px; margin-top: 6px; }
.chat-head-status { color: #6b6480; font-size: 13px; }
.voice-button { margin-top: 8px; border: 1px solid #ddd6f5; background: #fff; color: var(--roxo-escuro);
  border-radius: 999px; padding: 7px 13px; font-weight: 700; }
.voice-button:disabled { opacity: .55; cursor: wait; }
.voice-audio { display: block; width: min(420px, 90%); margin: 8px auto 0; }
.messages { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.msg { max-width: 74%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; white-space: pre-wrap; }
.msg.ela { background: var(--bolha-ela); align-self: flex-start; border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(36,27,53,.08); }
.msg.eu { background: var(--bolha-eu); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input { display: flex; gap: 9px; padding: 12px 14px; background: #fff; border-top: 1px solid #e7e2f7; }
.chat-input input { flex: 1; padding: 12px; border: 1px solid #ddd6f5; border-radius: 12px; font-size: 15px; }
.chat-input .send { background: var(--roxo); color: #fff; border: none; border-radius: 12px; padding: 0 20px; font-weight: 600; }
/* Microfone GRANDE (decorativo no esqueleto; voz em tempo real = fase própria) */
.mic { width: 52px; height: 52px; border-radius: 50%; border: none; font-size: 24px;
  background: linear-gradient(135deg, var(--roxo), #c084fc); color: #fff; flex: none; }

.billing-box { margin-top: 18px; }
.billing-note { border: 1px solid #ddd6f5; background: #fff; border-radius: 12px; padding: 12px 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.plan-card { background: #fff; border: 1px solid #e7e2f7; border-radius: 14px; padding: 16px; }
.plan-card.current { border-color: var(--roxo); box-shadow: 0 4px 18px rgba(124,58,237,.14); }
.plan-card h3 { margin: 0 0 6px; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--roxo-escuro); }
.plan-card ul { padding-left: 18px; color: #6b6480; }
.plan-card button { width: 100%; padding: 10px; border: none; border-radius: 10px;
  background: var(--roxo); color: #fff; font-weight: 700; }
.plan-card button:disabled { background: #e7e2f7; color: #6b6480; cursor: default; }
/* Área de convite (indique e ganhe) */
.invite-box { background: #fff; border: 1px solid #e7e2f7; border-radius: 14px;
  padding: 16px; max-width: 560px; margin-top: 12px; }
.invite-box label { font-weight: 600; font-size: 14px; }
.invite-row { display: flex; gap: 9px; margin-top: 6px; }
.invite-row input { flex: 1; margin: 0; }
.invite-row .send { background: var(--roxo); color: #fff; border: none; border-radius: 10px;
  padding: 0 18px; font-weight: 600; }
.invite-stats { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.invite-stats > div { background: var(--fundo); border: 1px solid #e7e2f7; border-radius: 12px;
  padding: 10px 14px; display: flex; flex-direction: column; min-width: 120px; }
.invite-stats strong { font-size: 22px; color: var(--roxo-escuro); }
.invite-stats span { font-size: 12px; color: #6b6480; }

.vault-list { list-style: none; padding: 0; }
.vault-list li { background: #fff; border: 1px solid #e7e2f7; border-radius: 10px;
  padding: 10px 14px; margin: 7px 0; display: flex; justify-content: space-between; }
#form-vault { display: grid; gap: 4px; max-width: 420px; }

@media (max-width: 720px) {
  .sidebar { width: 62px; } .sidebar nav button { font-size: 0; text-align: center; }
  .sidebar nav button::first-letter { font-size: 19px; }
  .brand span, .sidebar-foot { display: none; }
}

/* Oferta de anúncio premiado (plano Free com a franquia esgotada) */
.ad-offer { background: #fff; border-top: 1px solid #e7e2f7; padding: 10px 14px 14px; text-align: center; }
.ad-offer p { margin: 4px 0 10px; }
.ad-offer .send { background: var(--roxo); color: #fff; border: none; border-radius: 12px;
  padding: 11px 18px; font-weight: 600; }
