/* CRMpix — kit oficial verde, identidade final 05/11/2026.
   Sora: títulos/destaques; Inter: interface. Aliases ciano/laranja preservam seletores
   legados e apontam para Azul Elétrico/Âmbar. Não alteram marcas salvas de empresas. */
@font-face { font-family: Sora; font-weight: 600; src: url(/brand/fonts/Sora-SemiBold.ttf); font-display: swap; }
@font-face { font-family: Sora; font-weight: 700; src: url(/brand/fonts/Sora-Bold.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 400; src: url(/brand/fonts/Inter-Regular.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 500; src: url(/brand/fonts/Inter-Medium.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 600; src: url(/brand/fonts/Inter-SemiBold.ttf); font-display: swap; }
:root {
  --azul-profit: #0A2540; --verde-lucro: #12B76A; --menta: #D1FADF;
  --azul-eletrico: #2E6BFF; --ambar: #F59E0B; --grafite: #0D1F33;
  --cinza-marca: #64748B; --nevoa: #F5F7FA;
  --azul: var(--azul-profit); --azul-2: #103450; --azul-3: #174260; --azul-4: #245878;
  --ciano: var(--azul-eletrico); --ciano-esc: var(--azul-profit);
  --laranja: var(--ambar); --laranja-esc: var(--azul-profit);
  --branco: #FFFFFF; --cinza: var(--nevoa); --cinza-2: #E9EEF3; --linha: #DCE3EA; --linha-2: #EEF2F6;
  --texto: var(--grafite); --texto-2: var(--azul-profit); --texto-3: var(--azul-profit);
  --ok: var(--verde-lucro); --ok-bg: var(--menta); --aviso: var(--azul-profit); --aviso-bg: #FFFBEB;
  --erro: #B3261E; --erro-bg: #FDECEA;
  --ciano-bg: var(--nevoa); --laranja-bg: #FFFBEB;
  --raio: 14px; --raio-s: 9px;
  --sombra: 0 1px 2px rgba(10,37,64,.05), 0 6px 20px -8px rgba(10,37,64,.10);
  --sombra-alta: 0 24px 60px -20px rgba(10,37,64,.35);
  --titulo: Sora, system-ui, sans-serif; --corpo: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cinza); color: var(--texto); font: 16px/1.5 var(--corpo); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .kpi b { font-family: var(--titulo); }
h1 { font-weight: 700; font-size: 26px; margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h2 { font-weight: 600; font-size: 18px; margin: 0 0 12px; }
h3 { font-weight: 600; font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--ciano-esc); }
.muted { color: var(--texto-2); } .small { font-size: 14px; } .tiny { font-size: 13px; color: var(--texto-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid rgba(46,107,255,.5); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 264px; flex: none; background: var(--azul); color: #D7E0EA; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--verde-lucro); opacity: .9; }
.brand { display: flex; align-items: center; gap: 11px; padding: 24px 22px 18px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { font: 700 20px var(--titulo); color: var(--branco); letter-spacing: -.01em; }
.brand .brand-product-logo { flex: 0 0 34px; object-fit: contain; }
.brand .brand-divider { width: 1px; height: 30px; background: #52708d; margin-left: 2px; }
.brand .brand-company-logo { width: 34px; height: 34px; border-radius: 6px; object-fit: contain; background: var(--branco); }
.brand .brand-company-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #D7E0EA; }
.company-logo-preview { display: block; width: 64px; height: 64px; margin: 0 0 12px; object-fit: contain; border-radius: 10px; background: #F5F8FA; }
.ctx { margin: 0 14px 8px; padding: 11px 13px; background: var(--azul-2); border: 1px solid var(--azul-3); border-radius: 11px; font-size: 13.5px; }
.ctx label { display: block; color: var(--texto-3); font: 600 12px var(--titulo); margin-bottom: 4px; }
.ctx select { width: 100%; background: var(--azul-3); color: var(--branco); border: 1px solid var(--azul-4); font-size: 14px; padding: 7px 10px; }
.ctx .who { color: var(--branco); font: 600 14.5px var(--titulo); }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; }
.nav .grp { font: 600 12px var(--titulo); color: var(--texto-3); margin: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; color: #C3CFDC; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; transition: background .12s, color .12s; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav a:hover { background: var(--azul-2); color: var(--branco); }
.nav a.on { background: var(--azul-3); color: var(--branco); box-shadow: inset 3px 0 0 var(--ciano); }
.nav a.on svg { opacity: 1; stroke: var(--ciano); }
.nav a .n { margin-left: auto; font-size: 12px; background: var(--ciano); color: var(--azul); border-radius: 10px; padding: 0 7px; font-weight: 700; }
.nav a .n.alert { background: var(--laranja); color: var(--branco); }
.nav a .n:empty { display: none; }
.side-foot { margin-top: auto; padding: 14px 22px 20px; font-size: 13px; color: #8CA0B8; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--azul-2); }
.side-foot a { color: #C3CFDC; cursor: pointer; }
main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 26px 36px 18px; flex-wrap: wrap; }
.top .sub { color: var(--texto-2); margin: 5px 0 0; max-width: 720px; }
.view { padding: 0 36px 72px; max-width: 1280px; width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sp { flex: 1; }

/* ---------- cartões, tabelas ---------- */
.card { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); padding: 22px; box-shadow: var(--sombra); }
.card.flat { box-shadow: none; } .card.tight { padding: 14px 16px; }
.card h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card > h2:first-child { margin-top: -2px; }
.kpi { padding: 16px 18px 14px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 18px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--azul); }
.kpi.ciano::before { background: var(--ciano); } .kpi.laranja::before { background: var(--laranja); }
.kpi .l { font-size: 13.5px; color: var(--texto-2); margin-top: 4px; } .kpi b { display: block; font-size: 30px; font-weight: 700; line-height: 1.15; margin-top: 2px; letter-spacing: -.02em; } .kpi.ciano b { color: var(--ciano-esc); } .kpi.laranja b { color: var(--laranja-esc); } .kpi .d { font-size: 13px; color: var(--texto-3); margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 600; font-size: 13px; color: var(--texto-3); padding: 6px 10px 8px; border-bottom: 1px solid var(--linha); }
td { padding: 11px 10px; border-bottom: 1px solid var(--linha-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--cinza); }
.empty { padding: 32px 20px; text-align: center; color: var(--texto-3); font-size: 15px; }
.empty::before { content: ""; display: block; width: 36px; height: 24px; margin: 0 auto 10px; background: linear-gradient(90deg, var(--linha) 0 30%, transparent 30% 35%, var(--linha) 35% 65%, transparent 65% 70%, var(--linha) 70%); clip-path: polygon(0 60%, 30% 60%, 30% 100%, 0 100%, 35% 100%, 35% 30%, 65% 30%, 65% 100%, 70% 100%, 70% 0, 100% 0, 100% 100%, 0 100%); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--cinza-2); color: var(--texto-2); white-space: nowrap; line-height: 1.5; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.ciano { background: var(--ciano-bg); color: var(--ciano-esc); } .badge.laranja { background: var(--laranja-bg); color: var(--laranja-esc); } .badge.erro { background: var(--erro-bg); color: var(--erro); } .badge.aviso { background: var(--aviso-bg); color: var(--aviso); } .badge.azul { background: var(--azul); color: var(--branco); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--texto-3); margin-right: 6px; vertical-align: middle; }
.dot.conectado { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); } .dot.conectando, .dot.reconectando, .dot.aguardando_qr { background: var(--laranja); } .dot.erro, .dot.bloqueado { background: var(--erro); }
.note { padding: 12px 14px 12px 16px; border-radius: var(--raio-s); font-size: 14.5px; border: 1px solid transparent; border-left-width: 4px; margin-bottom: 14px; }
.note.info { background: var(--ciano-bg); border-color: var(--linha); border-left-color: var(--ciano); } .note.warn { background: var(--aviso-bg); border-color: #FDE1B9; border-left-color: var(--laranja); } .note.err { background: var(--erro-bg); border-color: #F5C2BD; border-left-color: var(--erro); } .note.ok { background: var(--ok-bg); border-color: #BFE6D0; border-left-color: var(--ok); }

/* ---------- formulários ---------- */
label.f { display: block; font-size: 13.5px; font-weight: 600; color: var(--texto-2); margin: 12px 0 5px; font-family: var(--titulo); }
input, select, textarea { font: 16px var(--corpo); color: var(--texto); background: var(--branco); border: 1px solid #C6D0DB; border-radius: var(--raio-s); padding: 9px 12px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #A9B6C4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(46,107,255,.22); }
textarea { min-height: 96px; resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--ciano-esc); }
.inline { display: flex; gap: 8px; align-items: center; } .inline input, .inline select { width: auto; flex: 1; }
.pre-choices { border: 0; padding: 0; margin: 18px 0; min-width: 0; }
.pre-choices legend { font-weight: 600; margin-bottom: 4px; }
.pre-choices .inline { min-height: 44px; margin-top: 0 !important; }
.pre-choices .inline input[type=checkbox] { flex: none; width: 18px; height: 18px; margin: 0; }
.pre-timezone-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
button, .btn { font: 600 15px var(--titulo); border: 0; border-radius: var(--raio-s); padding: 9px 16px; cursor: pointer; background: var(--azul); color: var(--branco); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; line-height: 1.3; transition: background .12s, transform .06s, box-shadow .12s; }
button:hover, .btn:hover { background: var(--azul-3); } button:active, .btn:active { transform: translateY(1px); } button:disabled { opacity: .5; cursor: default; transform: none; }
.btn.pri { background: var(--verde-lucro); color: var(--azul-profit); box-shadow: none; } .btn.pri:hover { background: var(--menta); }
.btn.sec { background: var(--branco); color: var(--azul); border: 1px solid #C6D0DB; } .btn.sec:hover { background: var(--cinza); border-color: #A9B6C4; }
.btn.ciano { background: var(--ciano); color: var(--azul); } .btn.ciano:hover { background: var(--azul-profit); }
.btn.danger { background: var(--branco); color: var(--erro); border: 1px solid #F5C2BD; } .btn.danger:hover { background: var(--erro-bg); }
.btn.sm { font-size: 13px; padding: 5px 11px; border-radius: 7px; }
.btn.link { background: none; color: var(--ciano-esc); padding: 0; box-shadow: none; } .btn.link:hover { text-decoration: underline; background: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--linha); margin: 6px 0 20px; overflow-x: auto; }
.tab { background: none; color: var(--texto-2); border-radius: 0; padding: 10px 14px 11px; border-bottom: 2px solid transparent; font-size: 14.5px; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { background: none; color: var(--azul); } .tab.on { color: var(--azul); border-bottom-color: var(--laranja); }
.pill-tabs { display: inline-flex; background: var(--cinza-2); border-radius: 999px; padding: 3px; gap: 2px; }
.pill-tabs button { background: none; color: var(--texto-2); border-radius: 999px; padding: 5px 13px; font-size: 13.5px; } .pill-tabs button.on { background: var(--branco); color: var(--azul); box-shadow: var(--sombra); }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--azul); color: var(--branco); padding: 12px 16px; border-radius: 10px; box-shadow: var(--sombra-alta); z-index: 50; max-width: 420px; font-size: 14.5px; border-left: 4px solid var(--ciano); }
.toast.err { background: var(--erro); border-left-color: #FFB4AE; } .toast.ok { background: var(--ok); border-left-color: #9EDDBA; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, 92vw); box-shadow: var(--sombra-alta); }
dialog::backdrop { background: rgba(10,37,64,.5); backdrop-filter: blur(2px); }
dialog .dh { padding: 20px 24px 0; } dialog .db { padding: 10px 24px 22px; } dialog .df { padding: 14px 24px; border-top: 1px solid var(--linha); display: flex; justify-content: flex-end; gap: 8px; background: var(--cinza); border-radius: 0 0 16px 16px; }

/* ---------- caixa de entrada ---------- */
.inbox { display: grid; grid-template-columns: 372px 1fr; gap: 16px; min-height: calc(100vh - 150px); }
.inbox .list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.inbox .filters { padding: 12px; border-bottom: 1px solid var(--linha); display: flex; flex-direction: column; gap: 8px; background: var(--branco); }
.inbox .filters .row > * { flex: 1; }
.inbox .filters input, .inbox .filters select { font-size: 14.5px; padding: 8px 10px; }
.conv-items { overflow-y: auto; flex: 1; }
.conv { padding: 12px 14px 12px 12px; border-bottom: 1px solid var(--linha-2); cursor: pointer; display: grid; grid-template-columns: 40px 1fr auto; gap: 2px 10px; align-items: start; transition: background .1s; }
.conv:hover { background: var(--cinza); } .conv.on { background: var(--ciano-bg); box-shadow: inset 3px 0 0 var(--ciano); }
.conv .av { grid-row: 1 / 3; } .conv .nm { font-weight: 600; font-family: var(--titulo); font-size: 14.5px; } .conv .tm { font-size: 12px; color: var(--texto-3); padding-top: 2px; }
.conv .lt { grid-column: 2 / -1; font-size: 13.5px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .meta { grid-column: 2 / -1; display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--titulo); color: var(--branco); background: var(--azul-3); flex: none; letter-spacing: .02em; }
.av.c1 { background: var(--azul-profit); } .av.c2 { background: var(--azul-eletrico); } .av.c3 { background: var(--grafite); } .av.c4 { background: var(--verde-lucro); color: var(--azul-profit); } .av.c5 { background: var(--ambar); color: var(--azul-profit); } .av.c6 { background: var(--menta); color: var(--azul-profit); }
.av.lg { width: 44px; height: 44px; font-size: 15px; }
.chat { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.chat .head { padding: 14px 18px; border-bottom: 1px solid var(--linha); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--branco); }
.chat .head .id { display: flex; align-items: center; gap: 12px; }
.msgs { flex: 1; overflow-y: auto; padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--nevoa); background-image: radial-gradient(rgba(10,37,64,.045) 1px, transparent 1px); background-size: 18px 18px; }
.msg { max-width: 72%; padding: 9px 13px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; word-break: break-word; position: relative; line-height: 1.45; }
.msg.contato { align-self: flex-start; background: var(--branco); border: 1px solid var(--linha); border-bottom-left-radius: 5px; box-shadow: 0 1px 1px rgba(10,37,64,.04); }
.msg.bot { align-self: flex-end; background: var(--ciano-bg); border: 1px solid var(--linha); border-bottom-right-radius: 5px; }
.msg.bot::before { content: "IA"; position: absolute; top: -9px; right: 12px; font: 700 10px var(--titulo); letter-spacing: .06em; color: var(--ciano-esc); background: var(--branco); border: 1px solid var(--linha); border-radius: 6px; padding: 0 5px; }
.msg.humano { align-self: flex-end; background: var(--azul); color: var(--branco); border-bottom-right-radius: 5px; }
.msg.sistema { align-self: center; background: var(--cinza-2); color: var(--texto-2); font-size: 12.5px; max-width: 90%; text-align: center; padding: 3px 12px; border-radius: 999px; margin: 6px 0; }
.msg + .msg.bot, .msg + .msg.humano { margin-top: 6px; }
.msg .st { display: block; font-size: 11px; opacity: .6; margin-top: 4px; text-align: right; }
.msg .src { display: block; font-size: 12px; color: var(--ciano-esc); margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--linha); }
.composer { padding: 12px 18px; border-top: 1px solid var(--linha); display: flex; gap: 8px; align-items: flex-end; background: var(--branco); }
.composer textarea { min-height: 44px; max-height: 160px; }

/* ---------- simulador ---------- */
.sim { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.sim .msgs { min-height: 360px; max-height: 520px; border: 1px solid var(--linha); border-radius: 12px; }
.flag { display: inline-block; font-size: 12px; background: var(--laranja-bg); color: var(--laranja-esc); padding: 1px 7px; border-radius: 6px; margin: 2px 2px 0 0; }
.qr { background: var(--branco); padding: 16px; border-radius: 12px; display: inline-block; border: 1px solid var(--linha); }
.qr pre { margin: 0; font-size: 6px; line-height: 6px; letter-spacing: 0; font-family: monospace; }
.diff li { margin: 2px 0; }
.ver { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linha-2); }
.ver:last-child { border-bottom: 0; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.chart .b { flex: 1; background: var(--ciano); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; } .chart .b.o { background: var(--azul); }
.chart .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--azul); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.bar { height: 8px; background: var(--cinza-2); border-radius: 4px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--ciano); } .bar i.warn { background: var(--laranja); }
.steps { counter-reset: s; display: grid; gap: 10px; } .steps div { display: flex; gap: 12px; align-items: flex-start; } .steps div::before { counter-increment: s; content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--azul); color: #fff; font: 700 13px var(--titulo); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: var(--azul); color: var(--branco); padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.login .hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(46,107,255,.18), transparent 65%); }
.login .hero h1 { font-size: 38px; line-height: 1.12; color: var(--branco); max-width: 520px; } .login .hero p { color: #B8C6D6; font-size: 17px; max-width: 460px; }
.login .hero .bars { display: flex; align-items: flex-end; gap: 10px; height: 72px; margin-bottom: 14px; } .login .hero .bars i { width: 16px; border-radius: 3px; display: block; transform-origin: bottom; animation: sobe .7s cubic-bezier(.2,.8,.2,1) both; }
.login .hero .bars i:nth-child(2) { animation-delay: .12s; } .login .hero .bars i:nth-child(3) { animation-delay: .24s; }
@keyframes sobe { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.login .box { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login form { width: min(400px, 100%); padding: 28px; }
@media (prefers-reduced-motion: reduce) { .login .hero .bars i { animation: none; } * { transition: none !important; } }
@media (max-width: 960px) { .inbox, .sim, .login { grid-template-columns: 1fr; } .login .hero { padding: 28px; } .side { position: fixed; z-index: 20; transform: translateX(-100%); transition: transform .2s; } .side.open { transform: none; } .top, .view { padding-left: 16px; padding-right: 16px; } .msg { max-width: 90%; } }
.menu-btn { display: none; }
@media (max-width: 960px) { .menu-btn { display: inline-flex; margin-bottom: 8px; } }
@media print { .side, .composer, .actions { display: none; } }

/* Aplicação da assinatura oficial: proporção intacta, sem redigitar o logotipo.
   180 px >= mínimo de 120 px; respiro de 16 px >= 1/4 do símbolo renderizado. */
.brand { flex-direction: column; align-items: flex-start; gap: 16px; }
.brand .brand-product-logo { width: 180px; height: auto; flex: none; border-radius: 0; box-shadow: none; }
.brand .brand-divider { width: 100%; height: 1px; margin: 0; }
.brand .brand-company-name, .side .nav .grp, .side .ctx label { color: var(--menta); }
.login .brand-login { width: min(262px,100%); min-width: 120px; height: auto; margin-bottom: 16px; }
.login .hero::after { background: none; }
button, .btn, label.f, .ctx label, .ctx .who, .nav .grp, .tab, .badge, th, .nav a { font-family: var(--corpo); }
.nav a.on { box-shadow: inset 3px 0 0 var(--verde-lucro); }
.nav a.on svg { stroke: var(--verde-lucro); }
.btn.ciano { color: var(--branco); }
.btn.ciano:hover { background: var(--azul-profit); }
.btn.warn, .badge.laranja, .nav a .n.alert { background: var(--ambar); color: var(--azul-profit); }
.badge.ciano, .badge.ok, .toast.ok { color: var(--azul-profit); }
input[type=checkbox] { accent-color: var(--azul-profit); }
input, select, textarea { border-color: var(--cinza-marca); }

/* Textos de interface usam Inter; pesos disponíveis localmente. */
.conv .nm, .av, .msg.bot::before, .steps div::before { font-family: var(--corpo); font-weight: 600; }
.nav a .n { font-weight: 600; color: var(--branco); }

/* ---------- Checkout PIX ---------- */
dialog.pix { width: min(440px, 94vw); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 26px 26px 22px; } /* sem position: o <dialog> modal já é fixed e serve de referência para o × */
dialog.pix h2 { font-family: var(--titulo); font-size: 1.25rem; margin: 0 0 14px; color: var(--azul-profit); }
.pix-x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--cinza-marca); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.pix-x:hover { background: var(--cinza); }
.pix-resumo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: var(--raio-s); background: var(--nevoa); border: 1px solid var(--linha); margin-bottom: 6px; }
.pix-resumo b { font-family: var(--titulo); font-size: 1.15rem; color: var(--azul-profit); white-space: nowrap; }
.pix-resumo small { font-weight: 400; font-size: .8rem; color: var(--cinza-marca); margin-left: 2px; }
.pix-cta { width: 100%; margin-top: 14px; padding: 12px; font-size: 1rem; }
.pix-qr { display: grid; place-items: center; margin: 14px 0 6px; }
.pix-qr img { width: 216px; height: 216px; image-rendering: pixelated; border: 1px solid var(--linha); border-radius: 12px; padding: 8px; background: #fff; }
.pix-qr-vazio { width: 216px; height: 216px; display: grid; place-items: center; text-align: center; padding: 18px; border: 1px dashed var(--linha); border-radius: 12px; color: var(--cinza-marca); font-size: .85rem; }
.pix-copy { display: flex; gap: 8px; }
.pix-copy input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.pix-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--raio-s); background: var(--menta); color: var(--azul-profit); font-size: .88rem; }
.pix-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--verde-lucro); animation: pix-pulso 1.4s ease-in-out infinite; }
@keyframes pix-pulso { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.pix-ok { text-align: center; padding: 18px 0 8px; }
.pix-ok-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--verde-lucro); color: #fff; font-size: 2rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pix-dot { animation: none; } }
@media (max-width: 520px) {
  dialog.pix { padding: 22px 18px 18px; }
  .pix-qr img, .pix-qr-vazio { width: 156px; height: 156px; }
  .pix-copy { flex-direction: column; }
  .pix-copy .btn { width: 100%; padding: 12px; background: var(--verde-lucro); border-color: var(--verde-lucro); color: #fff; font-weight: 600; }
}

/* ---------- Módulo 1: contrato no modal da oportunidade ---------- */
.ct-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linha); }
.ct-head h3 { margin: 0 0 4px; }
.ct-form { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 10px; }
.ct-gen { margin-top: 12px; width: 100%; justify-content: center; gap: 8px; min-height: 42px; }
.ct-gen .ct-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ct-rot .7s linear infinite; }
.ct-gen.loading .ct-spin { display: inline-block; }
.ct-gen:disabled { opacity: .75; cursor: progress; }
@keyframes ct-rot { to { transform: rotate(360deg); } }
.ct-new { margin-top: 12px; padding: 12px; border-radius: var(--raio-s); background: var(--menta); }
.ct-link { display: flex; gap: 8px; margin-top: 8px; min-width: 0; }
.ct-link input { flex: 1; min-width: 0; font-size: 13px; padding: 6px 9px; background: var(--branco); }
.ct-link .btn { flex: none; white-space: nowrap; }
.ct-err { color: var(--erro); font-size: 14px; margin: 8px 0 0; }
.ct-list { margin-top: 12px; display: grid; gap: 10px; }
.ct-item { padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--raio-s); min-width: 0; }
.ct-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-hash { font-size: 11px; overflow-wrap: anywhere; margin-top: 4px; color: var(--cinza-marca); }
@media (max-width: 520px) { .ct-form { grid-template-columns: 1fr; } .ct-link { flex-direction: column; } .ct-link .btn { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .ct-gen .ct-spin { animation: none; } }

/* Correção (mobile): tabelas largas rolam dentro do cartão em vez de alargar a página e sobrepor botões. */
@media (max-width: 960px) {
  .card > table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .view { min-width: 0; }
}
.ct-row .btn.link { font-size: 13px; font-weight: 600; color: var(--erro); }
/* Correção (mobile): rodapé do modal quebra linha em vez de cortar o primeiro botão. */
@media (max-width: 520px) { dialog .df { flex-wrap: wrap; } dialog .df .btn { flex: 1 1 auto; justify-content: center; } }

/* ---------- Módulo 2: CRMpix AI na caixa de entrada ---------- */
.msg.has-audio { min-width: min(320px, 100%); }
.aud-l { display: block; font-size: 13px; opacity: .8; margin-bottom: 4px; }
.aud-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aud-row audio { flex: 1; min-width: 0; height: 36px; max-width: 100%; }
.ai-bolt { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #A6F4C5; background: var(--branco); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .12s, transform .12s; }
.ai-bolt:hover { background: var(--menta); } .ai-bolt:active { transform: scale(.94); }
.ai-bolt svg { width: 18px; height: 18px; }
.ai-card { margin-top: 8px; background: var(--branco); color: var(--texto); border: 1px solid #A6F4C5; border-left: 4px solid #12B76A; border-radius: var(--raio-s); padding: 10px 12px; font-size: 14px; text-align: left; }
.ai-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; } .ai-h svg { width: 16px; height: 16px; } .ai-h .tiny { margin-left: auto; }
.ai-acts { margin: 4px 0 6px; padding-left: 20px; } .ai-acts li { margin: 3px 0; }
.ai-tr summary { cursor: pointer; font-size: 13px; color: var(--cinza-marca); } .ai-tr p { margin: 6px 0 0; font-size: 13.5px; white-space: pre-wrap; }
.ai-load { display: flex; align-items: center; gap: 8px; color: var(--cinza-marca); }
.ai-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #12B76A; border-right-color: transparent; animation: ct-rot .7s linear infinite; }
.ai-err { color: var(--erro); }
@media (prefers-reduced-motion: reduce) { .ai-spin { animation: none; } }

/* ---------- Módulo 3: Hub de Conteúdo ---------- */
.kb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; max-width: 420px; }
.kb-bar label.f { margin: 0; white-space: nowrap; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kb-col { background: var(--cinza-2); border-radius: var(--raio); padding: 12px; min-width: 0; }
.kb-col header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kb-col header h2 { margin: 0; font-size: 15px; }
.kb-col[data-col="rascunho"] header h2::before, .kb-col[data-col="revisao"] header h2::before, .kb-col[data-col="aprovado"] header h2::before, .kb-col[data-col="agendado"] header h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--cinza-marca); }
.kb-col[data-col="revisao"] header h2::before { background: var(--azul-eletrico); } .kb-col[data-col="aprovado"] header h2::before { background: var(--verde-lucro); } .kb-col[data-col="agendado"] header h2::before { background: var(--ambar); }
.kb-list { display: grid; gap: 10px; min-height: 90px; border-radius: var(--raio-s); transition: background .12s, outline-color .12s; outline: 2px dashed transparent; outline-offset: 2px; }
.kb-list.over { background: rgba(18,183,106,.08); outline-color: var(--verde-lucro); }
.kb-empty { font-size: 13px; color: var(--cinza-marca); text-align: center; padding: 24px 8px; border: 1px dashed var(--linha); border-radius: var(--raio-s); }
.kb-card { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio-s); overflow: hidden; cursor: pointer; box-shadow: var(--sombra); transition: transform .1s, box-shadow .1s; min-width: 0; }
.kb-card:hover { transform: translateY(-1px); box-shadow: var(--sombra-alta); } .kb-card.drag { opacity: .5; }
.kb-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--cinza-2); }
.kb-thumb img, .kb-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-count { position: absolute; right: 6px; bottom: 6px; background: rgba(10,37,64,.75); color: #fff; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.kb-body { padding: 10px 12px; display: grid; gap: 3px; } .kb-body b { font-size: 14.5px; overflow-wrap: anywhere; } .kb-body .badge { justify-self: start; margin-top: 4px; }
.kb-date { color: var(--azul-profit); font-weight: 600; }
.kb-note { font-size: 12.5px; background: var(--laranja-bg); border-radius: 6px; padding: 5px 8px; margin-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .kanban { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 8px; margin: 0 -2px; }
  .kb-col { flex: 0 0 84%; scroll-snap-align: start; }
  .kb-bar { max-width: none; }
}
/* formulário */
.pf-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0 10px; }
.pf-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.pf-m { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--cinza-2); }
.pf-m img, .pf-m video { width: 100%; height: 100%; object-fit: cover; }
.pf-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10,37,64,.8); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
@media (max-width: 520px) { .pf-grid { grid-template-columns: 1fr; } }
/* preview */
dialog.dlg-pv { width: min(520px, 94vw); }
dialog.dlg-pv .db { max-height: calc(100dvh - 190px); overflow-y: auto; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.pv { border: 1px solid var(--linha); border-radius: 12px; background: #fff; overflow: hidden; max-width: 420px; margin: 0 auto 12px; font-size: 14px; }
.pv-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; } .pv-h b { font-size: 14px; } .pv-more { margin-left: auto; }
.pv-av { width: 32px; height: 32px; font-size: 12px; }
.pv-media { position: relative; background: #000; aspect-ratio: 1; } .pv.li .pv-media { aspect-ratio: 4 / 3; }
.pv-media.empty { display: grid; place-items: center; color: #fff; background: var(--cinza-marca); font-size: 13px; }
.pv-slide { position: absolute; inset: 0; display: none; } .pv-slide.on { display: block; }
.pv-slide img, .pv-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 20px; line-height: 1; cursor: pointer; }
.pv-nav.prev { left: 8px; } .pv-nav.next { right: 8px; }
.pv-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; } .pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); } .pv-dots i.on { background: #fff; }
.pv-icons { display: flex; gap: 14px; padding: 10px 12px 4px; } .pv-icons svg { width: 24px; height: 24px; fill: none; stroke: var(--grafite); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.pv-cap { padding: 4px 12px 10px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; } .pv.li .pv-cap { padding: 0 12px 10px; }
.pv-when { padding: 0 12px 10px; }
.pv-bar { display: flex; justify-content: space-around; border-top: 1px solid var(--linha-2); padding: 8px 4px; font-size: 13px; font-weight: 600; color: var(--cinza-marca); }
textarea.invalid { border-color: var(--erro); box-shadow: 0 0 0 3px rgba(179,38,30,.15); }

/* ---------- Módulo 4: ROI real ---------- */
.roi-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.roi-filters label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 0; }
.roi-filters input[type=date] { width: auto; padding: 6px 9px; }
.roi-kpis { margin-bottom: 16px; }
.roi-kpis .kpi b { font-size: 26px; overflow-wrap: anywhere; }
.kpi.roi-pos::before { background: var(--verde-lucro); } .kpi.roi-neg::before { background: var(--erro); }
td.roi-pos { color: #067647; font-weight: 600; } td.roi-neg { color: var(--erro); font-weight: 600; }
.roi-legend { display: flex; gap: 16px; font-size: 13px; color: var(--texto-2); margin: -4px 0 12px; }
.roi-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.inv, .roi-bar.inv { background: #2E6BFF; } .sw.rec, .roi-bar.rec { background: #12B76A; }
.roi-chart { display: grid; gap: 14px; }
.roi-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--linha-2); }
.roi-row:last-child { border-bottom: 0; padding-bottom: 0; }
.roi-name { min-width: 0; display: grid; } .roi-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .roi-name .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roi-bars { display: grid; gap: 2px; min-width: 0; }
.roi-bar-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.roi-bar { height: 14px; min-width: 2px; border-radius: 0 4px 4px 0; flex: none; max-width: calc(100% - 96px); cursor: default; }
.roi-bar:focus-visible { outline: 2px solid var(--azul-profit); outline-offset: 2px; }
.roi-val { font-size: 12.5px; color: var(--texto-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.roi-tip { position: absolute; z-index: 60; background: var(--azul-profit); color: #fff; font-size: 13px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--sombra-alta); pointer-events: none; max-width: 300px; }
.roi-method { margin-top: 12px; }
@media (max-width: 640px) { .roi-row { grid-template-columns: 1fr; gap: 6px; } .roi-kpis .kpi b { font-size: 22px; } }

/* ---------- Modo demonstração ---------- */
.demo-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; font: 600 12px/1.5 var(--corpo); white-space: nowrap; }
.demo-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #F59E0B; }
.top .actions .demo-badge { margin-top: 0; }
.pix-demo { display: grid; gap: 4px; justify-items: start; margin: -4px 0 12px; font-size: 13px; color: #92400E; }
.pix-demo .demo-badge { margin-top: 0; }
.pix-qr svg { width: 200px; height: 200px; display: block; margin: 0 auto; shape-rendering: crispEdges; }
.pix-ok .demo-badge { margin: 4px auto 10px; }

/* ---------- Funil Kanban (oportunidades) ---------- */
.funil-modo { margin: 0 0 12px; }
.funil { display: grid; grid-template-columns: repeat(var(--cols), minmax(140px, 1fr)); gap: 10px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.funil-col { background: var(--cinza-2); border-radius: var(--raio); padding: 10px; min-width: 0; }
.funil-col header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.funil-col header h2 { margin: 0; font-size: 14px; }
.funil-sum { margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.funil-list { display: grid; gap: 8px; min-height: 80px; border-radius: var(--raio-s); outline: 2px dashed transparent; outline-offset: 2px; transition: background .12s, outline-color .12s; }
.funil-list.over { background: rgba(18,183,106,.08); outline-color: var(--verde-lucro); }
.funil-card { display: grid; gap: 2px; background: var(--branco); border: 1px solid var(--linha); border-left: 3px solid var(--azul-eletrico); border-radius: var(--raio-s); padding: 10px 12px; cursor: pointer; box-shadow: var(--sombra); min-width: 0; }
.funil-card:hover { box-shadow: var(--sombra-alta); } .funil-card.drag { opacity: .5; }
.funil-card b { font-size: 14px; overflow-wrap: anywhere; }
.funil-val { font-weight: 600; color: var(--azul-profit); font-variant-numeric: tabular-nums; }
.funil-col[data-stage="Ganho"] .funil-card { border-left-color: var(--verde-lucro); }
@media (max-width: 640px) {
  .funil { display: flex; scroll-snap-type: x mandatory; }
  .funil-col { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---- Plano e cobrança: tabela híbrida (4 planos), teste de 5 dias, cotas ---- */
.planos-grid.g4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; }
.card.plano { position: relative; display: flex; flex-direction: column; gap: 6px; padding-top: 30px; }
.card.plano.destaque { background: var(--azul-profit); color: var(--branco); border-color: var(--verde-lucro); box-shadow: 0 0 0 2px var(--verde-lucro), var(--sombra); }
.card.plano.destaque h2, .card.plano.destaque .tiny, .card.plano.destaque .plano-preco b, .card.plano.destaque .plano-lista li { color: var(--branco); }
.card.plano.destaque .tiny { opacity: .85; }
.card.plano.destaque label.f { color: var(--menta); }
.card.plano.destaque input { background: #10324F; color: var(--branco); border-color: #2B5577; }
.card.plano h2 { font-family: var(--titulo); font-size: 1.35rem; margin: 0; }
.plano-pop { position: absolute; top: -12px; left: 16px; font: 600 12px var(--titulo); background: var(--verde-lucro); color: var(--azul-profit); padding: 3px 10px; border-radius: 999px; }
.plano-trial { position: absolute; top: 10px; right: 12px; font: 600 11.5px Inter, sans-serif; color: var(--verde-lucro); border: 1px solid var(--verde-lucro); padding: 2px 8px; border-radius: 999px; background: rgba(18,183,106,.08); }
.plano-preco { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.plano-preco b { font-family: var(--titulo); font-size: 1.9rem; letter-spacing: -.02em; color: var(--azul-profit); }
.plano-preco small { color: var(--cinza-marca); }
.plano-lanc { flex-basis: 100%; font-size: .85rem; font-weight: 600; color: var(--verde-lucro); }
.plano-lista { margin: 8px 0 10px; padding-left: 18px; font-size: .9rem; line-height: 1.45; }
.plano-lista li { margin: 2px 0; }
.card.plano .btn { margin-top: 4px; }
.plano-cotas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 10px; }
.plano-cota { background: var(--nevoa); border: 1px solid var(--linha); border-radius: var(--raio-s); padding: 10px 12px; font-size: .9rem; }
.plano-cota span { display: block; color: var(--cinza-marca); font-size: .8rem; }
.plano-cota b { display: block; margin: 2px 0 6px; }
.pix-trial { margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--raio-s); background: var(--menta); color: var(--azul-profit); font-size: .88rem; }
.toast.upgrade { border-left-color: var(--verde-lucro); display: flex; gap: 12px; align-items: center; }
.toast.upgrade a { color: var(--menta); font-weight: 600; white-space: nowrap; }


/* ---- App instalado (PWA) ---- */
[data-pwa-install][hidden] { display: none !important; }
.side-foot .pwa-link { font-family: var(--titulo); font-weight: 600; }
.login .pwa-install { margin-top: 16px; width: 100%; justify-content: center; }
.pwa-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pwa-steps li { display: flex; align-items: center; gap: 14px; }
.pwa-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--cinza); color: var(--azul); display: inline-flex; align-items: center; justify-content: center; }
.pwa-step-n { font: 700 16px var(--titulo); }
.pwa-offline { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--azul); }
.pwa-offline .card { max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px; }
/* Barra de status translúcida no iPhone: o conteúdo não fica sob o relógio e o entalhe. */
@supports (padding: env(safe-area-inset-top)) {
  .side { padding-top: env(safe-area-inset-top); }
  main { padding-top: env(safe-area-inset-top); }
  .login { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

.brand .brand-product-logo { width: 142px; height: auto; flex: 0 0 142px; border-radius: 0; }
.brand-login { object-fit: contain; }

/* ---------- Celular (até 640 px): toque confortável, tabelas em cartões, barra do modo POP ---------- */
@media (max-width: 640px) {
  .btn, button.btn, .nav a, dialog .df .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  input, select, textarea { font-size: 16px !important; }
  input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
  textarea { min-height: 88px; }
  .top { position: sticky; top: 0; z-index: 15; background: var(--fundo, #F6F8FB); padding-top: 10px; }
  .card > table.t-cards, table.t-cards { display: block; overflow: visible; }
  table.t-cards thead { display: none; }
  table.t-cards tbody, table.t-cards tr, table.t-cards td { display: block; width: 100%; }
  table.t-cards tr { border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  table.t-cards td { border: 0 !important; padding: 4px 0 !important; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; text-align: right; }
  table.t-cards td { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
  table.t-cards td > * { min-width: 0; max-width: 100%; }
  .mono, .tiny.mono, code, pre { overflow-wrap: anywhere; word-break: break-all; white-space: pre-wrap; }
  .grid.g2, .grid.g3 { grid-template-columns: minmax(0,1fr) !important; }
  .grid > *, label.f { min-width: 0; }
  table.t-cards td::before { content: attr(data-label); font-weight: 600; color: #64748B; font-size: 13px; text-align: left; flex: 0 0 40%; }
  table.t-cards td[data-label=""]::before { content: none; }
  table.t-cards td[data-label=""] { justify-content: flex-end; }
  .kanban, .kb-board { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; -webkit-overflow-scrolling: touch; }
  .kanban > *, .kb-board > * { flex: 0 0 85%; scroll-snap-align: start; min-width: 0; }
}
#pop-bar { display: none; }
@media (max-width: 960px) {
  body.has-pop-bar #pop-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 100vw; box-sizing: border-box; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #0A2540; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(10,37,64,.18); }
  #pop-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: #CBD5E1; font: 600 11.5px var(--corpo, Inter, sans-serif); text-decoration: none; border-radius: 10px; }
  #pop-bar a.on, #pop-bar a:active { color: #fff; background: rgba(18,183,106,.18); }
  #pop-bar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  #pop-bar a:nth-child(3) svg { color: #12B76A; }
  body.has-pop-bar .view { padding-bottom: 96px; }
}
/* "Pingou!" — aviso verde do Pix recebido */
.pingou-toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); z-index: 60; background: #12B76A; color: #fff; border-radius: 14px; padding: 12px 18px; box-shadow: 0 12px 32px rgba(10,37,64,.25); display: flex; flex-direction: column; gap: 2px; min-width: 240px; max-width: calc(100vw - 24px); cursor: pointer; animation: pingou-in .25s ease-out; }
.pingou-toast b { font: 700 17px var(--titulo, Sora, sans-serif); }
.pingou-toast span { font-size: 14px; opacity: .95; }
@keyframes pingou-in { from { transform: translate(-50%, -16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pingou-toast { animation: none; } }

/* ===== Navegabilidade (teste de 09/11/2026) ===== */
/* Janelas: título e botões sempre visíveis; só o meio rola (antes os botões ficavam abaixo da tela) */
dialog#dlg[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); overflow: hidden; }
dialog#dlg .dh, dialog#dlg .df { flex: none; }
dialog#dlg .db { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* Indicadores: faixa de cor reta no topo do cartão (antes era uma "lingueta" solta) */
.kpi::before { left: 0; right: 0; width: auto; height: 3px; border-radius: 0; }
/* Planos: os 5 cabem numa linha e os botões ficam alinhados embaixo */
.planos-grid.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.card.plano .plano-lista { flex: 1 1 auto; }
/* Menu lateral: menos espaço vazio em cima */
.brand { padding: 18px 22px 10px; gap: 10px; }
.brand .brand-product-logo { width: 150px; }
/* Celular: fundo escuro atrás do menu, que fecha ao tocar fora */
.side-fundo { display: none; }
@media (max-width: 960px) {
  body.menu-aberto .side-fundo { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(10,37,64,.45); }
  body.menu-aberto { overflow: hidden; }
  /* avisos no celular: de ponta a ponta, sem cortar a borda */
  .toast { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: none; }
  body.has-pop-bar .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* caixa de entrada: sem o painel vazio "Selecione uma conversa" enquanto nada foi escolhido */
  .inbox .chat:not(.aberta) { display: none; }
  /* botão Menu na mesma linha do título, sem ocupar uma linha sozinho */
  .top > div:first-child { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
  .top > div:first-child .menu-btn { margin-bottom: 0; grid-row: 1; }
  .top > div:first-child h1 { grid-row: 1; grid-column: 2; margin: 0; }
  .top > div:first-child .sub { grid-column: 1 / -1; }
}
/* Itens do menu fora do plano: cadeado discreto com o plano mínimo */
.nav a.bloq { opacity: .62; }
.nav a.bloq .tag-plano { margin-left: auto; font: 600 10.5px var(--corpo, Inter, sans-serif); color: #0A2540; background: #9EDDBA; border-radius: 999px; padding: 2px 8px; }
/* Colunas com códigos longos (auditoria, integrações) quebram a linha em vez de empurrar a tela para o lado */
td.mono, td .mono { word-break: break-all; overflow-wrap: anywhere; }
/* Planos: preço e "/mês" na mesma linha; opção da Secretária alinhada */
.planos-grid .plano-preco { flex-wrap: wrap; }
.planos-grid .plano-preco .plano-lanc { flex-basis: 100%; }
.planos-grid .plano-preco b { font-size: clamp(1.45rem, 2.1vw, 1.9rem); white-space: nowrap; }
.card.plano label.inline, .card.plano label:has(> input[type=checkbox]) { display: flex !important; gap: 8px; align-items: flex-start; }
.card.plano label:has(> input[type=checkbox]) input { margin-top: 3px; flex: none; }
@media (max-width: 960px) {
  /* filtros da caixa de entrada: um por linha no celular (antes o texto ficava cortado) */
  .inbox .filters .row { flex-direction: column; }
}

/* Modo POP no celular: um menu só (o "Mais" da barra de baixo) */
@media (max-width: 960px) { body.has-pop-bar .menu-btn { display: none; } }

/* ==========================================================================
   CRM POP — Identidade Oficial Pingo (Verde #12B76A, Lima #B6F36A e Roxo #6D28D9 / #1A0B3B)
   Alinhada 100% com a marca final e o site crmpop.com.br, preservando CRMpix intacta.
   ========================================================================== */
body.is-pop {
  --pop-bg: #F7F4FC;
  --pop-card: #FFFFFF;
  --pop-border: #E4DBEE;
  --pop-ink: #1A0B3B;
  --pop-header-1: #2D1853;
  --pop-header-2: #1A0B3B;
  --pop-purple: #6D28D9;
  --pop-purple-ink: #42167E;
  --pop-lavender: #EFE5FF;
  --pop-lavender-border: #D8C7FA;
  --pop-green: #12B76A;
  --pop-lime: #B6F36A;
  --pop-mint: #DCF6E6;
  --pop-mint-border: #9CE4BA;
  --pop-mint-ink: #075534;
  --pop-muted: #5C4E71;
  background: var(--pop-bg);
  color: var(--pop-ink);
}

/* Regra permanente: texto escuro (#1A0B3B) sobre botão verde (#12B76A) ou lima (#B6F36A), nunca branco sobre verde */
body.is-pop .btn.pri,
body.is-pop .pingou-toast,
.pop-cta-green {
  background: #12B76A;
  color: #1A0B3B !important;
  font-family: var(--titulo);
  font-weight: 700;
}
.pop-cta-green {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(18, 183, 106, .24);
  transition: filter .14s, transform .06s;
}
.pop-cta-green:hover { background: #15C974; filter: brightness(1.02); }
.pop-cta-green:active { transform: translateY(1px); }
.pop-cta-green.sm { width: auto; min-height: 44px; padding: 9px 18px; font-size: 14px; }
.pop-cta-green svg { width: 20px; height: 20px; stroke: #1A0B3B; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* Esconde elementos corporativos no modo POP */
body.is-pop .top { display: none !important; }
body.is-pop .side-foot a[href="/docs"] { display: none !important; }
body.is-pop .view { padding: 24px 32px 84px; max-width: 100%; }

/* Sidebar do computador no modo POP (Roxo profundo #1A0B3B + Marca Pingo) */
body.is-pop .side {
  width: 270px;
  background: linear-gradient(170deg, #2D1853 0%, #1A0B3B 65%);
  color: #EAE1FA;
}
body.is-pop .side::before { background: #B6F36A; height: 3px; opacity: 1; }
body.is-pop .brand { padding: 22px 20px 14px; }
body.is-pop .pop-brand-wrap { display: inline-flex; align-items: center; text-decoration: none; }
body.is-pop .brand img.pop-logo-img { width: 146px; height: auto; flex: none; border-radius: 0; }
body.is-pop #ctx { margin: 0 14px 14px; padding: 0; background: transparent; border: 0; }
body.is-pop .side-foot { border-top-color: rgba(255, 255, 255, .1); color: #C4B5FD; }
body.is-pop .side-foot a { color: #EDE9FE; }

.pop-side-biz {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px; text-decoration: none; color: #fff; min-height: 54px;
  transition: background .14s;
}
.pop-side-biz:hover { background: rgba(255, 255, 255, .13); }
.pop-biz-avatar-ico {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: rgba(182, 243, 106, .18); color: #B6F36A;
  display: inline-flex; align-items: center; justify-content: center;
}
.pop-biz-avatar-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pop-biz-avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.pop-side-biz-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pop-side-biz-txt b { font: 700 14px var(--titulo); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-side-biz-txt small { font-size: 12px; color: #D8C7FA; }
.pop-side-biz-chev { color: #D8C7FA; display: inline-flex; }
.pop-side-biz-chev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

body.is-pop .nav { gap: 6px; padding: 6px 14px; }
body.is-pop .nav a.pop-side-link {
  min-height: 46px; padding: 10px 14px; border-radius: 14px;
  color: #E6DDF6; font: 600 15px var(--corpo); box-shadow: none;
}
body.is-pop .nav a.pop-side-link svg { width: 20px; height: 20px; stroke: currentColor; opacity: .9; }
body.is-pop .nav a.pop-side-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.is-pop .nav a.pop-side-link.on {
  background: #B6F36A; color: #1A0B3B; font-weight: 700; box-shadow: none;
}
body.is-pop .nav a.pop-side-link.on svg { stroke: #1A0B3B; opacity: 1; }

/* Cabeçalho roxo-profundo do celular (#pop-top) — oculto em computador */
.pop-mobile-header { display: none; }

@media (max-width: 960px) {
  body.is-pop .side { display: none !important; }
  body.is-pop .view { padding: 14px 16px calc(108px + env(safe-area-inset-bottom)); }
  body.is-pop.is-pop-onboarding .view { padding-bottom: 40px; }

  .pop-mobile-header {
    display: flex; flex-direction: column; gap: 7px;
    background: linear-gradient(145deg, #2D1853 0%, #1A0B3B 100%);
    color: #fff;
    padding: calc(10px + env(safe-area-inset-top)) 18px 13px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 10px 26px rgba(26, 11, 59, .18);
  }
  .pop-mh-top { display: flex; align-items: center; justify-content: space-between; }
  .pop-mh-brand { display: inline-flex; align-items: center; text-decoration: none; min-height: 36px; }
  .pop-mh-logo { height: 34px; width: auto; display: block; }
  .pop-mh-biz {
    display: flex; align-items: center; gap: 11px;
    padding: 6px 10px; margin: 0 -6px; border-radius: 14px;
    text-decoration: none; color: #fff; min-height: 44px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  }
  .pop-mh-biz-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
  .pop-mh-biz-info strong { font: 700 14.5px var(--titulo); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pop-mh-biz-info span { font-size: 12px; color: #D8C7FA; }
  .pop-mh-chev { color: #D8C7FA; display: inline-flex; }
  .pop-mh-chev svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

  /* Barra inferior de 4 abas (alinhada com o demo de crmpop.com.br: pílula lilás #EFE5FF + texto #42167E) */
  body.is-pop.has-pop-bar #pop-bar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #FFFFFF; border-top: 1px solid #EDE5FA;
    border-radius: 22px 22px 0 0;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 28px rgba(26, 11, 59, .09);
  }
  body.is-pop #pop-bar a.pop-tab {
    background: transparent !important; min-height: 52px; padding: 0;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    color: #654F87;
  }
  body.is-pop #pop-bar .pop-tab-pill {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; width: 100%; min-height: 48px; padding: 5px 8px; border-radius: 15px;
    font: 600 11.5px var(--corpo); color: inherit; transition: background .14s, color .14s;
  }
  body.is-pop #pop-bar a.pop-tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; color: inherit; }
  body.is-pop #pop-bar a.pop-tab.on .pop-tab-pill {
    background: #EFE5FF; color: #42167E; font-weight: 700;
  }
}

/* Página e tipografia POP */
.pop-page { max-width: 760px; margin: 0 auto; width: 100%; }
.pop-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pop-greeting, .pop-title { font: 700 26px/1.14 var(--titulo); color: var(--pop-ink); letter-spacing: -.025em; margin: 0; }
.pop-date, .pop-sub { font-size: 14px; color: var(--pop-muted); margin: 3px 0 14px; }
.pop-hero .pop-date { margin-bottom: 0; }

/* Seletor Hoje | Semana */
.pop-view-toggle {
  display: inline-flex; background: var(--pop-card); border: 1px solid var(--pop-border);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.pop-view-toggle button {
  min-height: 36px; padding: 5px 14px; border-radius: 999px; border: 0;
  background: transparent; color: var(--pop-muted); font: 600 13px var(--titulo); cursor: pointer;
}
.pop-view-toggle button.on { background: #6D28D9; color: #FFFFFF; }

/* 3 Atalhos rápidos em Hoje (ícones em roxo #6D28D9 igual à landing) */
.pop-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pop-qcard {
  background: var(--pop-card); border: 1px solid var(--pop-border); border-radius: 16px;
  min-height: 58px; padding: 8px 6px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  color: var(--pop-ink); font: 700 12.5px var(--corpo); text-align: center;
  box-shadow: 0 2px 10px rgba(26, 11, 59, .04);
}
.pop-qcard:hover { background: var(--pop-card); border-color: #6D28D9; }
.pop-qcard-ic { color: #6D28D9; display: inline-flex; }
.pop-qcard-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cabeçalho de seção e pílulas */
.pop-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; }
.pop-sec-head h2 { font: 700 16px var(--titulo); color: var(--pop-ink); margin: 0; }
.pop-pill-mint {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  background: var(--pop-lavender); color: var(--pop-purple-ink); font: 700 12px var(--corpo);
}

/* Cartões gerais e lista */
.pop-stack { display: flex; flex-direction: column; gap: 10px; }
.pop-card {
  background: var(--pop-card); border: 1px solid var(--pop-border); border-radius: 22px;
  padding: 20px; box-shadow: 0 4px 18px rgba(26, 11, 59, .05);
}
.pop-appt-card {
  background: var(--pop-card); border: 1.5px solid var(--pop-border); border-radius: 20px;
  padding: 13px 15px; box-shadow: 0 3px 12px rgba(26, 11, 59, .04); cursor: pointer;
  transition: border-color .14s, transform .14s; touch-action: pan-y;
}
.pop-appt-card.highlight { border-color: #9CE4BA; }
.pop-appt-card:hover { border-color: #6D28D9; }
.pop-appt-main { display: flex; align-items: flex-start; gap: 12px; }
.pop-time-pill {
  min-width: 56px; height: 44px; padding: 0 9px; border-radius: 13px;
  background: #EEE4FD; color: #4C208D; font: 700 14px var(--titulo);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.pop-appt-info { flex: 1; min-width: 0; }
.pop-appt-toprow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pop-appt-client { font: 700 16px var(--titulo); color: var(--pop-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-appt-price { font: 700 15.5px var(--titulo); color: var(--pop-ink); white-space: nowrap; }
.pop-appt-service { font-size: 13.5px; color: var(--pop-muted); margin-top: 1px; }
.pop-appt-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 7px; }

.pop-sit-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font: 700 12px var(--corpo);
}
.pop-sit-badge.confirmado { background: #DCF6E6; color: #075534; }
.pop-sit-badge.aconfirmar { background: #EEE5FF; color: #50209C; }
.pop-sit-badge.atendido { background: #E0F2FE; color: #0369A1; }
.pop-sit-badge.faltou { background: #FEF3C7; color: #92400E; }
.pop-sit-badge.cancelado { background: #FEE2E2; color: #991B1B; }
.pop-sit-inline.confirmado { color: #075534; font-weight: 600; }
.pop-sit-inline.atendido { color: #0369A1; font-weight: 600; }
.pop-sit-inline.faltou { color: #92400E; font-weight: 600; }

.pop-appt-quick { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pop-mini-btn {
  min-height: 36px; padding: 5px 10px; border-radius: 10px;
  border: 1px solid var(--pop-border); background: var(--pop-card); color: var(--pop-ink);
  font: 600 12px var(--corpo); cursor: pointer;
}
.pop-mini-btn:hover { background: var(--pop-bg); border-color: #6D28D9; }
.pop-mini-btn.ok { background: #DCF6E6; border-color: #9CE4BA; color: #1A0B3B; font-weight: 700; }

/* Botão redondo verde Falar com a POP (texto/ícone escuro #1A0B3B sobre verde #12B76A) */
.pop-mic-dock {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 18px auto 4px; text-align: center;
}
.pop-mic-fab {
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: #12B76A; color: #1A0B3B !important;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(18, 183, 106, .34); cursor: pointer;
}
.pop-mic-fab:hover { background: #15C974; }
.pop-mic-fab svg { width: 26px; height: 26px; stroke: #1A0B3B; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.pop-mic-title { font: 700 13.5px var(--titulo); color: var(--pop-ink); margin-top: 6px; }

/* Visão Semana e horários livres */
.pop-week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pop-week-range { font: 700 14px var(--titulo); color: var(--pop-ink); text-align: center; }
.pop-week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pop-day-chip {
  min-height: 68px; padding: 7px 2px; border-radius: 14px;
  border: 1px solid var(--pop-border); background: var(--pop-card); color: var(--pop-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
}
.pop-day-chip .wk { font-size: 11px; color: var(--pop-muted); font-weight: 600; }
.pop-day-chip .dy { font: 700 15px var(--titulo); }
.pop-day-chip .ct { font-size: 10.5px; color: var(--pop-muted); }
.pop-day-chip.today { border-color: #12B76A; }
.pop-day-chip.on { background: #6D28D9; border-color: #6D28D9; color: #fff; }
.pop-day-chip.on .wk, .pop-day-chip.on .ct { color: #EDE9FE; }

.pop-free-slot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 16px; border: 1px dashed #C8B7E8;
  background: rgba(255, 255, 255, .72); cursor: pointer; min-height: 54px;
}
.pop-free-slot:hover { border-color: #12B76A; background: var(--pop-card); }
.pop-free-time { font: 700 14px var(--titulo); color: #4C208D; min-width: 52px; }
.pop-free-lbl { flex: 1; font-size: 13.5px; color: var(--pop-muted); }
.pop-free-btn {
  min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 0;
  background: #B6F36A; color: #1A0B3B !important; font: 700 12.5px var(--titulo); cursor: pointer;
}
.pop-free-btn:hover { background: #12B76A; }

/* Busca, cartões de Clientes, Dinheiro e Mais */
.pop-search-box {
  position: relative; display: flex; align-items: center;
  background: var(--pop-card); border: 1px solid var(--pop-border); border-radius: 16px;
  padding: 0 12px; margin-bottom: 12px; min-height: 48px;
}
.pop-search-ic { color: #6D28D9; display: inline-flex; margin-right: 8px; }
.pop-search-ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.pop-search-box input { border: 0 !important; box-shadow: none !important; padding: 10px 4px; background: transparent; flex: 1; }
.pop-search-clear { min-height: 36px; padding: 4px 10px; border-radius: 8px; background: var(--pop-bg); color: var(--pop-ink); font-size: 12.5px; }

.pop-list-card {
  width: 100%; display: flex; align-items: center; gap: 13px;
  background: var(--pop-card); border: 1px solid var(--pop-border); border-radius: 18px;
  padding: 13px 15px; text-decoration: none; color: var(--pop-ink); text-align: left;
  box-shadow: 0 2px 10px rgba(26, 11, 59, .03); min-height: 66px; touch-action: pan-y;
}
a.pop-list-card:hover, button.pop-list-card:hover { border-color: #6D28D9; background: var(--pop-card); }
.pop-avatar-mint {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: var(--pop-lavender); color: var(--pop-purple-ink);
  font: 700 14px var(--titulo); display: inline-flex; align-items: center; justify-content: center;
}
.pop-avatar-mint.ok { background: #DCF6E6; color: #075534; border-radius: 50%; }
.pop-avatar-mint.lg { width: 58px; height: 58px; font-size: 18px; border-radius: 18px; }
.pop-avatar-mint.wait { background: #EEE5FF; color: #50209C; border-radius: 50%; }
.pop-avatar-mint svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pop-list-body { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.pop-list-body strong { font: 700 15.5px var(--titulo); color: var(--pop-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-list-body small { font-size: 13px; color: var(--pop-muted); }
.pop-list-chev { color: #8B7AA8; display: inline-flex; flex: none; }
.pop-list-chev svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Ficha do cliente e Dinheiro */
.pop-back-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pop-back-bar svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.pop-ficha-top { display: flex; align-items: center; gap: 14px; }
.pop-ficha-id h1 { font-size: 22px; margin: 0; }
.pop-ficha-id p { margin: 3px 0 0; color: var(--pop-muted); font-size: 14px; }
.pop-ficha-obs { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--pop-bg); font-size: 14px; }
.pop-ficha-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pop-ficha-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.pop-stat-box, .pop-mkpi {
  border-radius: 18px; padding: 14px 16px; border: 1px solid var(--pop-border); background: var(--pop-card);
  display: flex; flex-direction: column; gap: 4px;
}
.pop-stat-box.mint, .pop-mkpi.mint { background: #B6F36A; border-color: #9DDA50; color: #1A0B3B; }
.pop-stat-box span, .pop-mkpi span { font-size: 12.5px; font-weight: 700; color: var(--pop-muted); }
.pop-stat-box.mint span, .pop-mkpi.mint span { color: #1A0B3B; }
.pop-stat-box strong, .pop-mkpi strong { font: 800 24px/1.12 var(--titulo); color: inherit; }
.pop-ficha-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-top: 16px; }
.pop-btn-cobrar { justify-content: center; border-radius: 999px; min-height: 50px; font-weight: 700; }

.pop-money-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pop-money-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Cartão roxo-profundo "Tem equipe? Conheça a CRMpix" */
.pop-crmpix-card {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #2D1853 0%, #1A0B3B 100%);
  color: #FFFFFF; border-radius: 20px; padding: 17px 20px;
  text-decoration: none; box-shadow: 0 10px 24px rgba(26, 11, 59, .18);
}
.pop-crmpix-card strong { display: block; font: 700 16px var(--titulo); color: #FFFFFF; }
.pop-crmpix-card span { font-size: 13.5px; color: #D8C7FA; }
.pop-crmpix-chev { color: #B6F36A; display: inline-flex; }
.pop-crmpix-chev svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.4; }

/* Telas vazias acolhedoras e dica de boas-vindas */
.pop-empty-card {
  background: var(--pop-card); border: 1px dashed #C8B7E8; border-radius: 22px;
  padding: 26px 20px; text-align: center;
}
.pop-empty-card.flat { padding: 18px 14px; }
.pop-empty-card h3 { font: 700 17px var(--titulo); margin: 0 0 6px; color: var(--pop-ink); }
.pop-empty-card p { font-size: 14.5px; color: var(--pop-muted); max-width: 420px; margin: 0 auto 16px; }
.pop-empty-actions { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto; }

.pop-welcome-card {
  background: var(--pop-card); border: 2px solid #6D28D9; border-radius: 22px;
  padding: 18px 20px; margin-bottom: 16px;
}
.pop-welcome-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #B6F36A; color: #1A0B3B; font: 700 12px var(--corpo); margin-bottom: 8px; }
.pop-welcome-card h2 { font-size: 18px; margin: 0 0 6px; }
.pop-welcome-card p { font-size: 14px; color: var(--pop-muted); margin: 0 0 14px; }
.pop-welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cadastro curto em 3 passos */
.pop-wiz { max-width: 560px; margin: 6px auto 0; }
.pop-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pop-step-dot {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px;
  background: var(--pop-card); border: 1px solid var(--pop-border); color: var(--pop-muted); font-size: 12.5px; font-weight: 600;
}
.pop-step-dot span {
  width: 24px; height: 24px; border-radius: 50%; background: #EFE5FF; color: #42167E;
  display: inline-flex; align-items: center; justify-content: center; font: 700 12px var(--titulo); flex: none;
}
.pop-step-dot.on { border-color: #6D28D9; color: var(--pop-ink); }
.pop-step-dot.on span { background: #B6F36A; color: #1A0B3B; }
.pop-step-dot.done span { background: #DCF6E6; color: #075534; }

.pop-ramo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.pop-ramo-btn {
  min-height: 52px; padding: 10px 12px; border-radius: 14px;
  border: 1.5px solid var(--pop-border); background: var(--pop-card); color: var(--pop-ink);
  display: flex; align-items: center; gap: 9px; font: 600 13.5px var(--corpo); text-align: left; cursor: pointer;
}
.pop-ramo-btn:hover { border-color: #6D28D9; background: var(--pop-card); }
.pop-ramo-btn.on { border-color: #6D28D9; background: #EFE5FF; color: #1A0B3B; font-weight: 700; }
.pop-ramo-ic { display: inline-flex; color: #6D28D9; flex: none; }
.pop-ramo-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

.pop-wiz-svc-list { display: flex; flex-direction: column; gap: 10px; }
.pop-wiz-svc-row {
  padding: 12px; border-radius: 16px; border: 1px solid var(--pop-border); background: var(--pop-bg);
}
.pop-wiz-svc-row label.f { margin-top: 0; }
.pop-wiz-svc-nums { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.pop-svc-del { min-height: 42px; }
.pop-wiz-actions { margin-top: 20px; display: flex; gap: 10px; }
.pop-wiz-actions.two > button:first-child { flex: 0 0 auto; min-height: 50px; border-radius: 999px; padding: 0 20px; }
.pop-wiz-actions.two > button:last-child { flex: 1; }

/* Utilitários de formulário, Meu negócio, Plano e Preferências */
.pop-form-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pop-soft-info { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--pop-bg); font-size: 13.5px; color: var(--pop-ink); }
.pop-logo-uploader { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.pop-logo-box {
  width: 64px; height: 64px; border-radius: 18px; background: var(--pop-lavender); color: var(--pop-purple-ink);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none;
}
.pop-logo-box img { width: 100%; height: 100%; object-fit: cover; }
.pop-logo-box svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; }
.pop-days-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pop-day-check {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; min-height: 44px;
  border-radius: 12px; border: 1px solid var(--pop-border); background: var(--pop-card); font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.pop-svc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--pop-border);
}
.pop-svc-item.inactive { opacity: .6; }

.pop-quota-item { display: flex; flex-direction: column; gap: 5px; }
.pop-quota-top { display: flex; justify-content: space-between; font-size: 14px; }
.pop-quota-bar { height: 9px; border-radius: 999px; background: #EDE5FA; overflow: hidden; }
.pop-quota-bar i { display: block; height: 100%; background: #12B76A; border-radius: 999px; }

.pop-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.pop-theme-btn {
  min-height: 86px; padding: 14px; border-radius: 18px; border: 2px solid var(--pop-border);
  background: var(--pop-card); color: var(--pop-ink); display: flex; flex-direction: column;
  align-items: flex-start; gap: 3px; cursor: pointer; text-align: left;
}
.pop-theme-btn svg { width: 22px; height: 22px; stroke: #6D28D9; fill: none; stroke-width: 2; margin-bottom: 2px; }
.pop-theme-btn strong { font: 700 15px var(--titulo); }
.pop-theme-btn small { font-size: 12.5px; color: var(--pop-muted); }
.pop-theme-btn.on { border-color: #6D28D9; background: #EFE5FF; color: #1A0B3B; }
.pop-theme-btn.on small { color: #42167E; }

/* Detalhes e Falar com a POP no modal */
.pop-detail-sheet { display: flex; flex-direction: column; gap: 8px; }
.pop-detail-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--pop-border); font-size: 14.5px; }
.pop-sit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.pop-voice-box { margin: 8px 0 10px; }
.pop-voice-rec-btn {
  width: 100%; min-height: 54px; border-radius: 16px; border: 1.5px dashed #6D28D9;
  background: #EFE5FF; color: #1A0B3B; font: 700 14.5px var(--titulo);
  display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.pop-voice-rec-btn.listening { background: #B6F36A; border-color: #12B76A; }
.pop-voice-ic svg { width: 22px; height: 22px; stroke: #1A0B3B; fill: none; stroke-width: 2.1; }
.pop-quick-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pop-ai-ans { margin-top: 12px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.pop-charge-val { font: 700 30px var(--titulo); color: #075534; }
.pop-mini-doc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--pop-border); border-radius: 12px; }

/* Toast Pingou! / Desfazer com botão Lima/Verde e texto escuro #1A0B3B */
.pop-undo-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 24px; z-index: 65;
  background: #1A0B3B; color: #FFFFFF; border: 1px solid #4C208D; border-radius: 16px;
  padding: 10px 12px 10px 16px; min-width: 280px; max-width: calc(100vw - 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 14px 34px rgba(26, 11, 59, .38); font-size: 14px;
}
.pop-undo-toast.pingou { background: #B6F36A; color: #1A0B3B; border-color: #9DDA50; font-weight: 700; }
.pop-undo-btn {
  min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 0;
  background: #B6F36A; color: #1A0B3B !important; font: 700 13px var(--titulo); cursor: pointer; flex: none;
}
.pop-undo-toast.pingou .pop-undo-btn { background: #1A0B3B; color: #B6F36A !important; }

@media (max-width: 960px) {
  body.has-pop-bar .pop-undo-toast { bottom: calc(80px + env(safe-area-inset-bottom)); left: 14px; right: 14px; transform: none; min-width: 0; }
}
@media (max-width: 480px) {
  .pop-steps small { display: none; }
  .pop-step-dot { justify-content: center; }
  .pop-form-row2 { grid-template-columns: 1fr; }
  .pop-wiz-svc-nums { grid-template-columns: 1fr 1fr; }
  .pop-svc-del { grid-column: 1 / -1; }
}

/* Modo escuro completo Pingo (Roxo-noite #120729 + cartões #1E0F3D + verde/lima com texto escuro) */
body.tema-escuro {
  --pop-bg: #120729;
  --pop-card: #1E0F3D;
  --pop-border: #382068;
  --pop-ink: #F8F5FF;
  --pop-muted: #B9A8D9;
  --pop-lavender: rgba(109, 40, 217, .28);
  --pop-purple-ink: #E9D5FF;
  background: #120729;
  color: #F8F5FF;
}
body.tema-escuro .card,
body.tema-escuro dialog#dlg {
  background: #1E0F3D; color: #F8F5FF; border-color: #382068;
}
body.tema-escuro dialog#dlg .dh,
body.tema-escuro dialog#dlg .df { border-color: #382068; background: #1E0F3D; }
body.tema-escuro label.f,
body.tema-escuro h1, body.tema-escuro h2, body.tema-escuro h3 { color: #F8F5FF; }
body.tema-escuro .muted, body.tema-escuro .tiny { color: #B9A8D9; }
body.tema-escuro input,
body.tema-escuro select,
body.tema-escuro textarea {
  background: #14082C; color: #F8F5FF; border-color: #492B82;
}
body.tema-escuro .btn.sec { background: #291552; color: #F8F5FF; border-color: #492B82; }
body.tema-escuro .btn.sec:hover { background: #361C6B; }
body.tema-escuro .pop-time-pill { background: rgba(182, 243, 106, .16); color: #B6F36A; }
body.tema-escuro .pop-qcard-ic { color: #B6F36A; }
body.tema-escuro .pop-sit-badge.confirmado { background: rgba(18, 183, 106, .22); color: #6CE9A6; }
body.tema-escuro .pop-sit-badge.aconfirmar { background: rgba(167, 139, 250, .2); color: #E9D5FF; }
body.tema-escuro .pop-sit-badge.atendido { background: rgba(56, 189, 248, .2); color: #7DD3FC; }
body.tema-escuro .pop-sit-badge.faltou { background: rgba(245, 158, 11, .2); color: #FCD34D; }
body.tema-escuro .pop-free-slot { background: rgba(30, 15, 61, .65); border-color: #492B82; }
body.tema-escuro .pop-free-time { color: #B6F36A; }
body.tema-escuro .pop-mini-btn.ok { background: #12B76A; color: #1A0B3B; border-color: #12B76A; }
body.tema-escuro .pop-view-toggle button.on { background: #B6F36A; color: #1A0B3B; }
body.tema-escuro .pop-day-chip.on { background: #B6F36A; border-color: #B6F36A; color: #1A0B3B; }
body.tema-escuro .pop-day-chip.on .wk,
body.tema-escuro .pop-day-chip.on .ct { color: #1A0B3B; }
body.tema-escuro .pop-ramo-btn.on,
body.tema-escuro .pop-theme-btn.on { background: rgba(109, 40, 217, .35); border-color: #B6F36A; color: #F8F5FF; }
body.tema-escuro .pop-theme-btn.on small { color: #B6F36A; }
body.tema-escuro .pop-crmpix-card { background: #291552; border: 1px solid #492B82; }
@media (max-width: 960px) {
  body.tema-escuro.is-pop.has-pop-bar #pop-bar {
    background: #1A0B3B; border-top-color: #382068;
  }
  body.tema-escuro.is-pop #pop-bar a.pop-tab { color: #B9A8D9; }
  body.tema-escuro.is-pop #pop-bar a.pop-tab.on .pop-tab-pill {
    background: rgba(182, 243, 106, .18); color: #B6F36A;
  }
  body.tema-escuro .pop-mobile-header { border-bottom: 1px solid #382068; }
}

/* Falar com a POP — Ondas de áudio e cartão de confirmação rápida */
.pop-voice-wave { display: none; align-items: center; gap: 3px; height: 16px; }
.pop-voice-rec-btn.listening .pop-voice-wave { display: inline-flex; }
.pop-voice-wave i { display: block; width: 3px; height: 5px; border-radius: 99px; background: #1A0B3B; animation: popWave 580ms ease-in-out infinite alternate; }
.pop-voice-wave i:nth-child(2) { animation-delay: 90ms; }
.pop-voice-wave i:nth-child(3) { animation-delay: 180ms; }
.pop-voice-wave i:nth-child(4) { animation-delay: 270ms; }
.pop-voice-wave i:nth-child(5) { animation-delay: 140ms; }
@keyframes popWave { from { height: 4px; } to { height: 16px; } }
.pop-voice-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pop-voice-ex { border: 1px solid var(--pop-line, #E1D9EF); background: var(--pop-surface, #fff); color: var(--pop-ink, #1A0B3B); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.pop-voice-ex:hover { border-color: #6D28D9; background: #F4EEFF; }
body.pop-dark .pop-voice-ex { background: #261347; border-color: #492A7D; color: #F5F0FF; }
.pop-voice-preview { margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid #12B76A; background: #EEFCF4; color: #1A0B3B; }
body.pop-dark .pop-voice-preview { background: #1B2E2B; border-color: #12B76A; color: #F5F0FF; }
.pop-vp-head { margin-bottom: 6px; }
.pop-vp-title { display: block; font-size: 14px; line-height: 1.35; margin-bottom: 10px; }
.pop-vp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Chamadas das abas em roxo */
body.is-pop .pop-sub b { color: #6D28D9; font-weight: 700; }
body.tema-escuro.is-pop .pop-sub b { color: #C4B5FD; }

/* QR Code do Pix na cobrança */
.pop-pix-qr { width: 208px; max-width: 70%; margin: 0 auto; padding: 10px; background: #FFFFFF; border-radius: 18px; border: 1px solid #E2E8F0; }
.pop-pix-qr svg { display: block; width: 100%; height: auto; }

/* Instalar o app (CRM POP) */
.pwa-instalado [data-pwa-install] { display: none !important; }
.pop-install-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 14px 0 0; padding: 16px 18px; border: 1px solid #C4B5FD; border-radius: 20px; background: #EDE9FE; color: #1A0B3B; text-align: left; cursor: pointer; font: inherit; min-height: 56px; }
.pop-install-card strong { display: block; font: 700 15.5px var(--titulo, Sora, sans-serif); }
.pop-install-card small { display: block; font-size: 13px; color: #4C3D73; margin-top: 2px; }
body.tema-escuro .pop-install-card { background: #24124F; border-color: #4A2F8A; color: #F8FAFC; }
body.tema-escuro .pop-install-card small { color: #C4B5FD; }
