/* Tá na Mão CRM — estilos. Layout: landing editorial em coluna única + app em grade lateral. */
:root {
  --bg: #f4f6f3; --surface: #ffffff; --surface-2: #eaefe9; --surface-3: #dfe6df;
  --ink: #16211b; --ink-2: #4d5b53; --ink-3: #6f7d75; --line: #d9e0da;
  --brand: #1b7f5a; --brand-ink: #ffffff; --accent: #f2b134; --accent-ink: #2a1d00;
  --ok: #1b7f5a; --warn: #a8690f; --bad: #c0392b; --bad-bg: #fbe9e7;
  --shadow: 0 10px 30px rgba(22, 33, 27, .10); --shadow-sm: 0 2px 8px rgba(22, 33, 27, .08);
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px; --radius-sm: 9px; --gutter: max(16px, env(safe-area-inset-left, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1512; --surface: #161d19; --surface-2: #1c2520; --surface-3: #27322c;
    --ink: #eef2ee; --ink-2: #b6c2ba; --ink-3: #8b988f; --line: #28332c;
    --bad-bg: #3a1f1c; --warn: #e0a83a;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45); --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1512; --surface: #161d19; --surface-2: #1c2520; --surface-3: #27322c;
  --ink: #eef2ee; --ink-2: #b6c2ba; --ink-3: #8b988f; --line: #28332c;
  --bad-bg: #3a1f1c; --warn: #e0a83a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45); --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); min-height: 100vh; }
body.modal-aberto { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.warn { color: var(--warn); }
.mt { margin-top: 20px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.req { color: var(--bad); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── controles ─────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn-danger-text { color: var(--bad); }
.btn-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.btn-wa { background: #e7f8ee; border-color: #9bd6b4; color: #0b5d3b; }
:root[data-theme="dark"] .btn-wa { background: #173526; border-color: #2f6b4b; color: #9be0b9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-wa { background: #173526; border-color: #2f6b4b; color: #9be0b9; } }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn[disabled], .icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font: inherit; }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.input-sm { padding: 6px 10px; font-size: .9rem; }
.input-icone { width: 80px; text-align: center; font-size: 1.3rem; }
.textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; font-size: .9rem; }
.chip small { color: var(--ink-3); font-size: .8em; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on small { color: inherit; opacity: .7; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: color-mix(in srgb, var(--brand) 70%, var(--ink)); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tag button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 0 0 2px; font-size: .8em; }
.tag-check { cursor: pointer; background: var(--surface-2); color: var(--ink-2); }
.tag-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.tag-check.on, .tag-check:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.tag-form { display: inline-flex; gap: 6px; }
.tag-form .input { width: 140px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-sm .switch-ui { width: 34px; height: 20px; }
.switch-sm .switch-ui::after { width: 14px; height: 14px; }
.switch-sm input:checked + .switch-ui::after { transform: translateX(14px); }
.field-switch { align-self: end; padding: 8px 0; }
.mini-check { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row .btn { flex: none; }
.add-campo { display: grid; grid-template-columns: 1.4fr .9fr 1.2fr auto; }
@media (max-width: 700px) { .add-campo { grid-template-columns: 1fr 1fr; } .add-campo .btn { grid-column: 1 / -1; } .add-row:not(.add-campo) { flex-wrap: wrap; } }
.vazio { text-align: center; padding: 40px 16px; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.vazio-inline { color: var(--ink-3); padding: 8px 0; font-size: .92rem; }

/* ── barra superior (galeria / assistente) ─────────────────────────── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1180px; margin: 0 auto; }
.topbar-acoes { display: flex; align-items: center; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.logo-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-size: 1.1rem; }
.logo-text small { font-size: .7em; font-weight: 700; color: var(--ink-3); margin-left: 2px; letter-spacing: .04em; }
.rodape-simples { display: flex; justify-content: space-between; gap: 12px; padding: 28px var(--gutter); max-width: 1180px; margin: 0 auto; color: var(--ink-3); font-size: .88rem; }

/* ── landing ─────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .nav-links { display: none; } }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-block: 56px 48px; }
.hero-copy { display: grid; gap: 18px; }
.hero-copy h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-trust { color: var(--ink-3); font-size: .9rem; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-block: 36px 28px; } }
/* demo do CRM no herói */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; font-size: .78rem; }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.demo-bar .demo-dot { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.demo-bar small { margin-left: auto; opacity: .8; font-weight: 500; }
.demo-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 0; }
.demo-kpis div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.demo-kpis small { color: var(--ink-3); display: block; }
.demo-kpis b { font-family: var(--font-display); font-size: 1.3rem; }
.demo-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 14px; }
.demo-col h5 { margin: 0 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; margin-bottom: 6px; box-shadow: var(--shadow-sm); }
.demo-card strong { display: block; font-size: .8rem; }
.demo-card span { color: var(--ink-3); }
.demo-card em { font-style: normal; float: right; font-weight: 700; color: var(--brand); }
.demo-card.hot { border-color: var(--accent); }
.band { background: var(--surface); border-block: 1px solid var(--line); padding-block: 26px; }
.band .container { display: grid; gap: 14px; }
.band-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pop-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pop-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink); }
.pop-chip:hover { border-color: var(--brand); }
.pop-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-size: 1rem; }
.pop-mais { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pop-mais .pop-ico { background: rgba(255,255,255,.15); color: inherit; }
.section { padding-block: 64px; }
.section-head { display: grid; gap: 10px; max-width: 64ch; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: passo; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.step::before { counter-increment: passo; content: counter(passo); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--brand); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { display: grid; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); align-content: start; }
.feature-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); font-size: 1.2rem; }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat-card { display: grid; gap: 6px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; align-content: start; }
.cat-card:hover { border-color: var(--brand); }
.cat-icos { display: flex; gap: 4px; font-size: 1.2rem; }
.cat-card h3 { font-size: .98rem; }
.cat-card p { font-size: .84rem; }
.planos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plano { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
.plano.destaque { border-color: var(--brand); box-shadow: var(--shadow); }
.plano .preco { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.plano .preco small { font-size: .45em; color: var(--ink-3); font-weight: 600; }
.plano ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-2); font-size: .95rem; }
.plano li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.plano .ribbon { position: absolute; top: 14px; right: 14px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin-top: 10px; color: var(--ink-2); }
.cta-final { background: var(--brand); color: var(--brand-ink); border-radius: 22px; padding: 44px 32px; display: grid; gap: 14px; justify-items: start; }
.cta-final h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.cta-final .btn { background: var(--brand-ink); color: var(--brand); border-color: transparent; }
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--ink-3); font-size: .88rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: inherit; }
@media (max-width: 900px) { .steps, .features, .planos { grid-template-columns: 1fr; } .section { padding-block: 44px; } }

/* ── galeria ─────────────────────────── */
.gal { max-width: 1180px; margin: 0 auto; padding: 24px var(--gutter) 48px; padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 22px; }
.gal-head { display: grid; gap: 10px; }
.gal-tools { display: grid; gap: 12px; }
.input-busca { max-width: 520px; padding: 12px 16px; border-radius: 999px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; align-content: start; transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--mc, var(--brand)); transform: translateY(-2px); }
.mcard-top { display: flex; justify-content: space-between; align-items: center; }
.mcard-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--mc, var(--brand)) 14%, var(--surface)); font-size: 1.4rem; }
.mcard-cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.mcard p { font-size: .92rem; }
.mcard-etapas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.mcard-etapas li { font-size: .74rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.mcard-etapas li.mais { background: transparent; color: var(--ink-3); }
.mcard-meta { font-size: .8rem; }
.mcard-acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; }
.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 16px; }
.det-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 8px; }
.det-etapas { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; counter-reset: et; }
.det-etapas li { counter-increment: et; display: flex; gap: 8px; align-items: center; }
.det-etapas li::before { content: counter(et); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .7rem; font-weight: 700; }
.det-lista { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; }
@media (max-width: 640px) { .det-grid { grid-template-columns: 1fr; } }

/* ── assistente ─────────────────────────── */
.wiz { max-width: 1180px; margin: 0 auto; padding: 16px var(--gutter) 48px; padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.wiz-side { display: grid; gap: 18px; position: sticky; top: 16px; }
.wiz-side h1 { font-size: 1.8rem; }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wiz-steps button { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-2); }
.wiz-steps button small { display: block; color: var(--ink-3); font-size: .8rem; }
.wiz-steps .atual button { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.wiz-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; font-size: .85rem; flex: none; }
.wiz-steps .atual .wiz-num { border-color: var(--brand); color: var(--brand); }
.wiz-steps .feito .wiz-num { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.wiz-main { display: grid; gap: 20px; min-width: 0; }
.wiz-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 16px; }
.wiz-body h2 { font-size: 1.4rem; }
.wiz-foot { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 900px) { .wiz { grid-template-columns: 1fr; gap: 20px; } .wiz-side { position: static; } .wiz-preview { display: none; } .wiz-steps { grid-template-columns: repeat(4, 1fr); } .wiz-steps button span small { display: none; } .wiz-steps button { padding: 8px; flex-direction: column; text-align: center; gap: 6px; font-size: .8rem; } .wiz-body { padding: 18px; } }
.prev { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); font-size: .78rem; box-shadow: var(--shadow-sm); }
.prev-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--brand); color: var(--brand-ink); }
.prev-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.22); }
.prev-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 10px 0; }
.prev-kpis div { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; }
.prev-kpis small { display: block; color: var(--ink-3); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prev-kpis b { font-family: var(--font-display); font-size: 1.1rem; }
.prev-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.prev-cols small { display: block; color: var(--ink-3); font-size: .68rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prev-cols i { display: block; height: 18px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 4px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--c); cursor: pointer; position: relative; padding: 0; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch-custom { background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); font-weight: 700; overflow: hidden; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.etapa-list, .campo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.etapa-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; }
.etapa-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: .85rem; }
.item-acoes { display: flex; gap: 2px; align-items: center; }
.campo-item { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.campo-item.off { opacity: .55; }
.campo-main { display: grid; gap: 6px; min-width: 0; }
@media (max-width: 700px) { .campo-item { grid-template-columns: auto 1fr auto; } .campo-item .badge { grid-column: 2; justify-self: start; } .campo-item .mini-check { grid-column: 2; } }
.rotinas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rotinas li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .93rem; }
.rotinas li .btn { flex: none; }
.resumo { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.resumo-logo { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font-size: 1.5rem; flex: none; }

/* ── CRM ─────────────────────────── */
.crm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.crm-side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 18px 12px; padding-left: var(--gutter); background: var(--surface); border-right: 1px solid var(--line); }
.crm-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px; min-width: 0; }
.crm-brand div { min-width: 0; }
.crm-brand strong { display: block; font-family: var(--font-display); font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-brand small { color: var(--ink-3); font-size: .78rem; }
.crm-logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: var(--brand-ink); font-size: 1.15rem; font-weight: 700; flex: none; }
.crm-nav { display: grid; gap: 2px; }
.crm-nav a, .crm-tabs a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.crm-nav a:hover { background: var(--surface-2); color: var(--ink); }
.crm-nav a.on { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--ink); font-weight: 700; }
.nav-ico { width: 22px; text-align: center; opacity: .85; }
.nav-badge { margin-left: auto; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.crm-side-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 6px; }
.crm-side-foot a { text-decoration: none; }
.crm-main { min-width: 0; display: flex; flex-direction: column; }
.crm-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 14px 22px; padding-right: max(22px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crm-top h1 { font-size: 1.35rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-top-brand { display: none; }
.crm-body { padding: 20px 22px 40px; padding-right: max(22px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; align-content: start; }
.crm-tabs { display: none; }
@media (max-width: 900px) {
  .crm { grid-template-columns: 1fr; }
  .crm-side { display: none; }
  .crm-top { padding: 10px var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .crm-top-brand { display: block; }
  .crm-top h1 { font-size: 1.1rem; }
  .crm-body { padding: 14px var(--gutter) calc(84px + env(safe-area-inset-bottom, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .crm-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .crm-tabs a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .68rem; text-align: center; position: relative; }
  .crm-tabs a span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .crm-tabs a.on { color: var(--brand); font-weight: 700; }
  .crm-tabs .nav-ico { font-size: 1.15rem; width: auto; }
  .crm-tabs .nav-badge { position: absolute; top: 2px; right: 12%; margin: 0; }
  .crm-top-acoes .btn { padding: 8px 12px; font-size: .85rem; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-head h2 { font-size: 1.05rem; }
.panel-head a { text-decoration: none; }
.boas-vindas { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.boas-vindas p { color: var(--ink-2); max-width: 60ch; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .cols-2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; border-top: 3px solid var(--brand); }
.kpi small { color: var(--ink-3); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi b { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .85rem; }
.kpi-ok { border-top-color: var(--ok); }
.kpi-warn { border-top-color: var(--warn); }
.kpi-warn span { color: var(--warn); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 1.6rem; } }
.funil-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.fbar { display: grid; gap: 4px; font-size: .85rem; min-width: 0; }
.fbar-top { display: flex; justify-content: space-between; gap: 6px; }
.fbar-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.fbar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fbar-track i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.lista, .tasks, .timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.lista li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lista li:last-child, .tasks li:last-child, .timeline li:last-child { border-bottom: 0; }
.lista.compacta li { padding: 6px 0; }
.lista b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.link-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.link-row:hover strong { text-decoration: underline; text-underline-offset: 2px; }
.link-row strong, .task strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-row small, .task small, .timeline small { display: block; font-size: .8rem; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: color-mix(in srgb, var(--brand) 75%, var(--ink)); font-weight: 700; font-size: .78rem; flex: none; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.task { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task.feita strong { text-decoration: line-through; color: var(--ink-3); }
.task.atrasada .check span { border-color: var(--warn); }
.check { position: relative; width: 22px; height: 22px; flex: none; cursor: pointer; }
.check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.check span { pointer-events: none; position: absolute; inset: 0; border: 2px solid var(--ink-3); border-radius: 7px; display: grid; place-items: center; }
.check input:checked + span { background: var(--brand); border-color: var(--brand); }
.check input:checked + span::after { content: "✓"; color: var(--brand-ink); font-size: .85rem; font-weight: 800; }
.check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.timeline li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; align-items: flex-start; }
.timeline li > div > span { display: block; overflow-wrap: anywhere; }
.tl-ico { width: 24px; text-align: center; flex: none; opacity: .8; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar .input-busca { flex: 1; max-width: none; min-width: 200px; }
.toolbar .select { width: auto; min-width: 160px; border-radius: 999px; }
.list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lrow { display: grid; grid-template-columns: var(--cols, 2.2fr 1.3fr 1.5fr 1fr); gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; min-width: 0; }
.lrow:last-child { border-bottom: 0; }
.lrow > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tags { white-space: normal; }
.lrow:not(.lhead):hover { background: var(--surface-2); }
.lhead { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; cursor: default; background: var(--surface-2); }
.lnome { display: flex; align-items: center; gap: 10px; }
.lnome > span:last-child { min-width: 0; }
.lnome strong, .lnome small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnome small { font-size: .78rem; }
.ltel { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px var(--gutter); }
  .lrow > span { white-space: normal; }
  .lnome { grid-column: 1 / -1; }
  .lrow > span[data-rotulo]::before { content: attr(data-rotulo) ": "; color: var(--ink-3); }
}
/* gaveta do contato */
.drawer-back { position: fixed; inset: 0; background: rgba(10, 16, 12, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); z-index: 41; overflow-y: auto; padding: 20px 22px calc(20px + env(safe-area-inset-bottom, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); display: grid; gap: 20px; align-content: start; box-shadow: var(--shadow); }
.drawer.anim { animation: slide-in .18s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; gap: 12px; align-items: center; }
.drawer-head h2 { font-size: 1.3rem; overflow-wrap: anywhere; }
.drawer-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer section { display: grid; gap: 8px; }
.drawer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.dados { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.dados div { min-width: 0; }
.dados .span2 { grid-column: 1 / -1; }
.dados dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
.dados dd { margin: 0; overflow-wrap: anywhere; }
.nota-form { display: grid; gap: 8px; justify-items: end; }
.drawer-foot { border-top: 1px solid var(--line); padding-top: 12px; }
/* funil / kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 290px); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; scroll-snap-type: x proximity; }
.kcol { background: var(--surface-2); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; scroll-snap-align: start; min-width: 0; }
.kcol-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 6px; }
.kcol-head h3 { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcol-head small { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kcol-body { display: grid; gap: 8px; min-height: 90px; border-radius: 10px; transition: background .15s; }
.kcol-body.over { background: color-mix(in srgb, var(--brand) 14%, transparent); outline: 2px dashed var(--brand); outline-offset: -2px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; display: grid; gap: 6px; cursor: grab; box-shadow: var(--shadow-sm); border-left: 4px solid var(--brand); min-width: 0; }
.kcard:hover { border-color: var(--ink-3); border-left-color: var(--brand); }
.kcard.dragging { opacity: .5; }
.kcard.parado { border-left-color: var(--warn); }
.kcard h4 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.kcard-meta, .kcard-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; }
.kcard-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard-meta b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kcard-foot { font-size: .78rem; }
.kadd { border: 1px dashed var(--line); background: transparent; border-radius: 10px; padding: 8px; cursor: pointer; color: var(--ink-3); font-weight: 600; font-size: .86rem; }
.kadd:hover { background: var(--surface); color: var(--ink); }
.form-extra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings { display: grid; gap: 16px; max-width: 900px; }
.settings .panel h2 { font-size: 1.2rem; }

/* ── modal e toast ─────────────────────────── */
#modal-root { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(10, 16, 12, .5); }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100% - 16px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr auto; animation: pop .16s ease-out; }
.modal-largo { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 22px 0; }
.modal-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.modal-body { padding: 16px 22px 20px; overflow: auto; }
.modal-texto { color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; flex-wrap: wrap; }
#toast-root { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; pointer-events: none; width: calc(100% - 32px); display: grid; justify-items: center; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); animation: pop .18s ease-out; max-width: 100%; text-align: center; }
@media (max-width: 900px) { body.no-app #toast-root { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* ── carregando / autenticação ─────────────────────────── */
.carregando { display: grid; place-items: center; gap: 12px; padding: 80px 16px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.auth { max-width: 1180px; margin: 0 auto; padding: 32px var(--gutter) 60px; padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; justify-items: center; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-form { display: grid; gap: 12px; }
.aviso { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9rem; }
.aviso a { font-weight: 600; }
.aviso-topo { margin-bottom: 10px; }
.so-mobile { display: none; }
.badge-warn { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); }
.crm-side-foot .link { text-decoration: none; }
.crm-side-foot .link:hover { text-decoration: underline; }

/* ── menu "Mais" (celular) ─────────────────────────── */
.sheet-back { position: fixed; inset: 0; background: rgba(10, 16, 12, .35); z-index: 31; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 32; background: var(--surface); border-radius: 18px 18px 0 0; padding: 10px var(--gutter) calc(80px + env(safe-area-inset-bottom, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 2px; box-shadow: var(--shadow); animation: pop .16s ease-out; }
.sheet a, .sheet button { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font: inherit; font-weight: 500; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.sheet a.on { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); font-weight: 700; }
.sheet .nav-badge { margin-left: auto; }
.crm-tabs button { background: none; border: 0; font: inherit; cursor: pointer; color: var(--ink-2); }

/* ── WhatsApp & robô ─────────────────────────── */
.destaque-robo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.destaque-robo h2 { font-size: 1.15rem; }
.estado-wa { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.estado-wa .grow { min-width: 200px; }
.estado-wa strong, .estado-wa small { display: block; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.off { background: var(--ink-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink-3) 20%, transparent); }
.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.qr-box img { border-radius: 12px; border: 1px solid var(--line); background: #fff; width: 260px; height: 260px; max-width: 100%; }
.qr-box .spinner { margin: 110px; }
.qr-box .btn { grid-column: 1 / -1; justify-self: start; }
.qr-passos { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
@media (max-width: 640px) { .qr-box { grid-template-columns: 1fr; justify-items: center; } .qr-passos { justify-self: stretch; } }

/* ── conversas (caixa de entrada) ─────────────────────────── */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); }
.chat-lista { border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; min-width: 0; }
.chat-lista .input-busca { border-radius: var(--radius-sm); margin-bottom: 6px; }
.chat-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--radius-sm); background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; min-width: 0; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.chat-item .grow { display: grid; gap: 2px; }
.chat-item-top, .chat-item-sub { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.chat-item-top strong, .chat-item-sub small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-item-sub small { flex: 1; }
.modo-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.modo-chip.robo { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: color-mix(in srgb, var(--brand) 70%, var(--ink)); }
.modo-chip.humano { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); color: var(--accent-ink); }
:root[data-theme="dark"] .modo-chip.humano { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .modo-chip.humano { color: var(--accent); } }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-vazio { align-items: center; justify-content: center; }
.chat-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head strong, .chat-head small { display: block; }
.chat-modo { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.chat-mensagens { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat-teste { flex: none; max-height: 380px; min-height: 120px; border-radius: var(--radius-sm); }
.bolha { max-width: min(78%, 560px); display: grid; gap: 3px; }
.bolha-txt { padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.bolha small { font-size: .72rem; padding: 0 4px; }
.bolha.cliente { align-self: flex-start; }
.bolha.cliente .bolha-txt { border-bottom-left-radius: 4px; }
.bolha.robo, .bolha.humano { align-self: flex-end; text-align: right; }
.bolha.robo .bolha-txt { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, transparent); border-bottom-right-radius: 4px; text-align: left; }
.bolha.humano .bolha-txt { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-bottom-right-radius: 4px; text-align: left; }
.bolha.sistema { align-self: center; max-width: 100%; }
.bolha.sistema .bolha-txt { background: var(--bad-bg); border-color: transparent; font-size: .85rem; color: var(--bad); }
.chat-compor { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-compor .textarea { flex: 1; min-height: 42px; max-height: 160px; }
.chat-compor .btn { flex: none; }
@media (max-width: 900px) {
  .so-mobile { display: inline-flex; }
  .chat { grid-template-columns: 1fr; min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px); }
  .chat-lista { border-right: 0; }
  .chat.tem-sel .chat-lista { display: none; }
  .chat:not(.tem-sel) .chat-thread { display: none; }
  .crm-chat .crm-body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}
.nav-entrar { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; padding: 6px 10px; }
.nav-entrar:hover { color: var(--ink); }
