/* ==========================================================================
   Mockups animados do CORA (fiéis às telas do v2.sistemascal.com.br)
   --------------------------------------------------------------------------
   Uso: <div class="cm" data-cora-mockup="funil|conversa|campanhas"
              role="img" aria-label="..."></div>
   + <link rel="stylesheet" href="assets/mockups/cora-mockups.css">
   + <script src="assets/mockups/cora-mockups.js" defer></script>
   O JS monta a tela num "app" de largura fixa (data-w, padrão 1280) e escala
   para caber no container. Dados fictícios. Originais em assets/mockups/originais/.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.cm {
  --cm-ink: #191919;
  --cm-muted: #848484;
  --cm-line: #E8E8E8;
  --cm-soft: #F5F5F5;
  --cm-green: #3E8B4D;
  --cm-dark: #13231A;
  --cm-mint: #CAF5C2;
  --cm-mint-ink: #005E25;
  --cm-link: #1F3FBF;
  --cm-col-ink: #110E3A;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #fff;
  contain: layout paint;
}
.cm-app {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  background: #fff;
  color: var(--cm-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  display: grid; grid-template-rows: 64px minmax(0, 1fr); grid-template-columns: 80px 1fr;
  overflow: hidden;
  user-select: none; pointer-events: none;
}
.cm-app svg { display: block; }
.cm-app * { box-sizing: border-box; }
.cm-app p { color: inherit; }

/* ---------- topo e trilho lateral (iguais em todas as telas) ---------- */
.cm-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 28px 0 26px; border-bottom: 1px solid var(--cm-line); }
.cm-burger { width: 26px; display: grid; gap: 5px; }
.cm-burger i { display: block; height: 2px; background: var(--cm-ink); border-radius: 2px; }
.cm-brand { display: flex; align-items: center; gap: 12px; height: 30px; }
.cm-brand img { height: 100%; width: auto; }
.cm-brand img.cora { height: 27px; margin-top: 3px; }
.cm-sep { width: 1px; height: 34px; background: var(--cm-line); margin-left: 8px; }
.cm-tagline { font-size: 11px; color: #555; }
.cm-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cm-user .av { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #2F7D45, #F28A3A); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.cm-user svg { width: 14px; height: 14px; color: #555; }

.cm-rail { border-right: 1px solid var(--cm-line); display: flex; flex-direction: column; align-items: center; gap: 32px; padding-top: 40px; }
.cm-rail span { width: 54px; height: 54px; border-radius: 8px; display: grid; place-items: center; color: var(--cm-ink); }
.cm-rail span svg { width: 22px; height: 22px; }
.cm-rail span.dark { background: var(--cm-dark); color: #fff; }
.cm-rail span.on { background: var(--cm-mint); color: var(--cm-green); }

.cm-main { position: relative; overflow: hidden; padding: 40px 40px 0; }
.cm-crumb { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cm-crumb svg { width: 16px; height: 16px; }
.cm-crumb .chev { width: 12px; height: 12px; color: #555; }
.cm-crumb b { font-weight: 600; }
.cm-h1row { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 30px; }
.cm-h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.cm-h1.sm { font-size: 30px; }
.cm-btn { height: 48px; padding: 0 30px; border-radius: 8px; background: var(--cm-green); color: #fff; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 10px; transition: transform .18s ease, filter .18s ease; }
.cm-btn.press { transform: scale(.95); filter: brightness(.9); }
.cm-btn-ic { width: 48px; height: 48px; border-radius: 8px; background: var(--cm-ink); color: #F7C22E; display: grid; place-items: center; }
.cm-btn-ic svg { width: 22px; height: 22px; }
.cm-sel { height: 44px; border: 1px solid #6B6B6B; border-radius: 6px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; }
.cm-sel.light { border-color: var(--cm-line); color: var(--cm-muted); }
.cm-sel svg { width: 14px; height: 14px; color: #777; }
.cm-filters { display: flex; align-items: center; gap: 12px; }
.cm-more { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--cm-ink); }
.cm-more svg { width: 18px; height: 18px; }
.cm-more.green { color: #1B5E2A; }
.cm-chips { display: flex; gap: 10px; margin-top: 14px; }
.cm-chip { background: var(--cm-mint); border-radius: 4px; padding: 9px 14px; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.cm-chip b { font-weight: 700; }
.cm-chip svg { width: 12px; height: 12px; }
.cm-kpis { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--cm-line); border-bottom: 1px solid var(--cm-line); margin-top: 16px; padding: 20px 0; }
.cm-kpi small { display: block; color: var(--cm-muted); font-size: 15px; }
.cm-kpi b { display: block; font-size: 15px; font-weight: 700; margin-top: 6px; transition: color .3s; }
.cm-kpi b.flash { color: var(--cm-green); }

/* ---------- FUNIL (Oportunidades) ---------- */
.cm-tools { display: flex; align-items: center; gap: 14px; margin: 16px 0 18px; }
.cm-avs { display: flex; }
.cm-avs i { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #2E7D3C; margin-left: -6px; background: #E9F7E6; font: 700 12px/34px 'Inter', sans-serif; text-align: center; color: var(--cm-ink); font-style: normal; }
.cm-avs i:first-child { margin-left: 0; }
.cm-search { flex: 0 0 360px; height: 42px; border: 1px solid var(--cm-line); border-radius: 6px; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: var(--cm-muted); font-size: 16px; }
.cm-search svg { width: 18px; height: 18px; }
.cm-tools .sp { flex: 1; }
.cm-sq { width: 44px; height: 44px; border: 1px solid #6B6B6B; border-radius: 6px; display: grid; place-items: center; }
.cm-sq svg { width: 18px; height: 18px; }
.cm-toggle { display: flex; background: #EDEDED; border-radius: 8px; padding: 4px; gap: 4px; }
.cm-toggle span { width: 48px; height: 36px; border-radius: 6px; display: grid; place-items: center; color: #BDBDBD; }
.cm-toggle span.on { background: #7A7A7A; color: #fff; }
.cm-toggle svg { width: 18px; height: 18px; }

.cm-board { display: grid; grid-auto-flow: column; grid-auto-columns: 342px; gap: 16px; height: 100%; }
.cm-col { background: #F2F2F2; border-radius: 6px 6px 0 0; display: flex; flex-direction: column; min-height: 520px; }
.cm-col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; height: 70px; border-radius: 6px 6px 0 0; color: var(--cm-col-ink); font-weight: 600; font-size: 16px; white-space: nowrap; }
.cm-col-head .t { overflow: hidden; text-overflow: ellipsis; }
.cm-sum { color: #fff; border-radius: 4px; padding: 6px 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; flex: none; transition: transform .25s ease; }
.cm-sum svg { width: 16px; height: 16px; }
.cm-sum.bump, .cm-col-head .n.bump { animation: cmBump .45s ease; }
@keyframes cmBump { 40% { transform: scale(1.12); } }
.cm-col-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cm-quick { height: 40px; border: 1px solid var(--cm-ink); border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 16px; background: #fff; }
.cm-quick svg { width: 14px; height: 14px; }
.cm-empty { text-align: center; color: var(--cm-muted); font-size: 15px; padding: 18px 0; }
.cm-card { background: #fff; border: 1px solid var(--cm-line); border-radius: 12px; padding: 12px 12px 10px; will-change: transform; }
.cm-card.lift { box-shadow: 0 24px 40px -18px rgba(0,0,0,.35); z-index: 5; position: relative; }
.cm-card-top { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--cm-line); position: relative; }
.cm-ini { width: 48px; height: 48px; border-radius: 6px; background: #D2F5CC; display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; }
.cm-card-top small { display: block; font-size: 11px; color: #555; }
.cm-card-top strong { display: block; font-size: 16px; font-weight: 600; color: var(--cm-link); margin-top: 2px; }
.cm-card-top em { display: flex; align-items: center; gap: 5px; font-style: normal; font-size: 11px; margin-top: 3px; }
.cm-card-top em svg { width: 11px; height: 11px; }
.cm-won { position: absolute; right: 0; top: 0; background: var(--cm-mint); border: 1px solid #3BB54A; color: var(--cm-mint-ink); font-size: 11px; font-weight: 500; border-radius: 4px; padding: 2px 22px; }
.cm-won.pop { animation: cmPop .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes cmPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cm-card-bot { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 10px; }
.cm-card-bot b { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cm-card-bot u { font-size: 11px; color: #333; }
.cm-val { background: #F2F2F2; border-radius: 4px; padding: 4px 8px; font-size: 11px; display: flex; gap: 6px; align-items: center; }
.cm-val svg { width: 13px; height: 13px; }
.cm-card.in { animation: cmIn .55s cubic-bezier(.2,.8,.2,1); }
@keyframes cmIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

/* ---------- CONVERSA ---------- */
.cm-app.chat .cm-main { padding: 0; display: grid; grid-template-columns: 350px 1fr 350px; grid-template-rows: minmax(0, 1fr); }
.cm-list { border-right: 1px solid var(--cm-line); padding: 16px 0 0; }
.cm-list-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.cm-list-head .cm-lt { margin: 0; font-size: 21px; font-weight: 700; }
.cm-list-head .act { display: flex; align-items: center; gap: 16px; }
.cm-plus { width: 32px; height: 32px; border-radius: 6px; background: #7AF365; display: grid; place-items: center; }
.cm-plus svg, .cm-list-head .act > svg { width: 18px; height: 18px; }
.cm-list .cm-search { margin: 12px 16px; flex: none; }
.cm-tabs { display: flex; gap: 6px; padding: 0 16px; }
.cm-tabs span { border: 1px solid var(--cm-line); border-radius: 999px; padding: 4px 10px; font-size: 15px; color: #555; white-space: nowrap; }
.cm-tabs span sub { font-size: 11px; vertical-align: baseline; margin-left: 2px; }
.cm-tabs span.on { background: var(--cm-mint); border-color: #3BB54A; color: var(--cm-ink); font-weight: 600; }
.cm-fin { display: flex; align-items: center; gap: 12px; padding: 16px; font-weight: 600; border-bottom: 1px solid var(--cm-line); }
.cm-fin svg { width: 18px; height: 18px; color: #777; }
.cm-fin span { margin-left: auto; font-size: 13px; font-weight: 500; }
.cm-conv { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--cm-line); position: relative; }
.cm-conv.on { background: #CFF7C6; box-shadow: inset 2px 0 0 var(--cm-green); }
.cm-conv .ini { width: 40px; height: 40px; border-radius: 50%; background: #D2F5CC; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; position: relative; }
.cm-conv .ini svg { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; color: #25A244; background: #fff; border-radius: 50%; padding: 1px; }
.cm-conv .tx { flex: 1; min-width: 0; }
.cm-conv strong { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; }
.cm-conv strong small { font-size: 11px; font-weight: 400; color: #555; }
.cm-conv p { margin: 3px 0 0; font-size: 11px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-conv em { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-style: normal; font-size: 11px; color: #555; margin-top: 4px; }
.cm-conv em svg { width: 10px; height: 10px; }
.cm-conv .unread { position: absolute; right: 16px; top: 38px; background: #F26B2F; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.cm-conv.in { animation: cmIn .5s cubic-bezier(.2,.8,.2,1); }

.cm-thread { display: grid; grid-template-rows: 60px minmax(0, 1fr) auto; background-color: #EBE6E0; position: relative; min-height: 0; }
.cm-thread::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%23B9B2A9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 22c-4-5-12-2-10 4 1 4 10 10 10 10s9-6 10-10c2-6-6-9-10-4z'/%3E%3Cpath d='M78 14v14M71 21h14'/%3E%3Crect x='86' y='66' width='22' height='10' rx='5' transform='rotate(-35 97 71)'/%3E%3Ccircle cx='30' cy='86' r='9'/%3E%3Cpath d='M26 86l3 3 5-6'/%3E%3Cpath d='M58 52h16v20H58z M62 52v-3h8v3'/%3E%3Cpath d='M96 104l4 4 8-9'/%3E%3C/svg%3E");
  background-size: 120px 120px; }
.cm-thread > * { position: relative; }
.cm-th-head { background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 26px; border-bottom: 1px solid var(--cm-line); }
.cm-th-head .ini { width: 40px; height: 40px; border-radius: 50%; background: #D2F5CC; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.cm-th-head strong { display: block; font-size: 16px; font-weight: 600; }
.cm-th-head small { display: flex; align-items: center; gap: 5px; color: #555; font-size: 15px; }
.cm-th-head small svg { width: 14px; height: 14px; color: #25A244; }
.cm-th-head .btns { margin-left: auto; display: flex; gap: 8px; }
.cm-th-head .ob { height: 32px; border: 1px solid var(--cm-ink); border-radius: 6px; padding: 0 18px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.cm-th-head .ob.g { background: #4E7F57; border-color: #4E7F57; color: #fff; }
.cm-th-head .ob svg { width: 14px; height: 14px; }
.cm-msgs { padding: 18px 30px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; justify-content: flex-end; min-height: 0; }
.cm-msgs > * { flex: none; }
.cm-day { align-self: center; background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: #555; letter-spacing: .02em; }
.cm-b { max-width: 70%; padding: 8px 10px 6px; border-radius: 6px; font-size: 15px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.cm-b time { display: block; text-align: right; font-size: 11px; color: #666; margin-top: 2px; }
.cm-b.them { align-self: flex-start; background: #fff; }
.cm-b.us { align-self: flex-end; background: #D6F7CB; }
.cm-b.us time { color: #3E8B4D; }
.cm-b.sys { align-self: center; background: rgba(255,255,255,.8); border-radius: 999px; padding: 8px 18px; font-size: 13px; color: #555; text-align: center; box-shadow: none; max-width: 80%; }
.cm-b.typing { display: flex; gap: 4px; padding: 12px 14px; }
.cm-b.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9A9A9A; animation: cmDot 1s infinite; }
.cm-b.typing i:nth-child(2) { animation-delay: .15s; } .cm-b.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cmDot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.cm-b.in { animation: cmMsg .4s cubic-bezier(.2,.8,.2,1); }
@keyframes cmMsg { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.cm-compose { background: #fff; padding: 14px 30px 14px; }
.cm-rt { display: inline-flex; background: var(--cm-dark); border-radius: 999px; padding: 3px; font-size: 12px; color: #fff; }
.cm-rt span { padding: 4px 10px; border-radius: 999px; font-weight: 500; }
.cm-rt span.on { background: #3E8B4D; }
.cm-box { margin-top: 10px; border: 1px solid var(--cm-line); border-radius: 8px; height: 112px; padding: 14px 18px; display: flex; flex-direction: column; justify-content: space-between; }
.cm-box .txt { font-size: 15px; color: var(--cm-ink); min-height: 20px; }
.cm-box .txt.ph { color: var(--cm-muted); }
.cm-box .txt .caret { display: inline-block; width: 1.5px; height: 17px; background: var(--cm-ink); vertical-align: -3px; margin-left: 1px; animation: cmCaret 1s steps(1) infinite; }
@keyframes cmCaret { 50% { opacity: 0; } }
.cm-box .row { display: flex; align-items: center; gap: 14px; color: #888; }
.cm-box .row svg { width: 16px; height: 16px; }
.cm-box .row .send { margin-left: auto; font-size: 15px; font-weight: 500; color: #9A9A9A; transition: color .2s; }
.cm-box .row .send.on { color: var(--cm-green); font-weight: 600; }

.cm-side { padding: 20px 20px 0; border-left: 1px solid var(--cm-line); }
.cm-side-head { display: flex; justify-content: space-between; align-items: center; }
.cm-side-head .cm-st4 { margin: 0; font-size: 19px; font-weight: 700; }
.cm-side-head svg { width: 18px; height: 18px; color: #555; }
.cm-side-who { display: flex; gap: 12px; margin: 26px 0 18px; align-items: flex-start; }
.cm-side-who .ini { width: 40px; height: 40px; border-radius: 50%; background: #D2F5CC; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.cm-side-who strong { display: block; font-size: 18px; font-weight: 600; }
.cm-tagx { display: inline-block; margin-top: 6px; border: 1px solid #2F6FD6; color: #2F6FD6; background: #EEF4FF; border-radius: 4px; font-size: 11px; padding: 2px 10px; }
.cm-tagx.verde { border-color: #3BB54A; color: var(--cm-mint-ink); background: var(--cm-mint); }
.cm-addop { height: 40px; border: 1px solid var(--cm-ink); border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; transition: transform .18s, background .3s, color .3s, border-color .3s; }
.cm-addop svg { width: 16px; height: 16px; }
.cm-addop.press { transform: scale(.96); }
.cm-addop.done { background: var(--cm-mint); border-color: #3BB54A; color: var(--cm-mint-ink); }
.cm-acc { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--cm-line); font-size: 18px; font-weight: 600; }
.cm-acc svg { width: 14px; height: 14px; color: #777; }
.cm-acc:first-of-type { margin-top: 14px; }
.cm-toast { position: absolute; right: 24px; bottom: 24px; background: var(--cm-dark); color: #fff; border-radius: 8px; padding: 12px 16px; font-size: 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 18px 36px -16px rgba(0,0,0,.5); opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; }
.cm-toast svg { width: 18px; height: 18px; color: #7AF365; }
.cm-toast.on { opacity: 1; transform: none; }

/* ---------- CAMPANHAS (Divulgar no WhatsApp) ---------- */
.cm-cards5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin: 22px 0 36px; }
.cm-kcard { border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.12); padding: 20px 16px 16px; border-top: 3px solid #F0F0F0; }
.cm-kcard small { display: block; color: #555; font-size: 15px; }
.cm-kcard b { display: block; font-size: 24px; font-weight: 600; margin-top: 4px; transition: color .3s; }
.cm-kcard b.flash { color: var(--cm-green); }
.cm-table { border: 1px solid var(--cm-line); border-radius: 6px; overflow: hidden; }
.cm-tr { display: grid; grid-template-columns: 1.05fr 1.05fr 1.05fr 1.05fr 1.05fr 1fr 60px; align-items: center; height: 56px; padding: 0 16px; border-top: 1px solid var(--cm-line); font-size: 16px; white-space: nowrap; }
.cm-tr > span { overflow: hidden; text-overflow: ellipsis; padding-right: 14px; }
.cm-tr.th { background: #F2F2F2; border-top: 0; height: 64px; font-weight: 600; }
.cm-tr .dots svg, .cm-tr.th .cfg svg { width: 18px; height: 18px; }
.cm-tr.in { animation: cmRow .6s cubic-bezier(.2,.8,.2,1); background: #F4FCF2; }
@keyframes cmRow { from { opacity: 0; transform: translateY(-16px); } }
.cm-st { font-style: normal; display: inline-block; width: 156px; text-align: center; font-size: 11px; border-radius: 4px; padding: 3px 0; border: 1px solid; transition: background .35s, color .35s, border-color .35s; }
.cm-st.ok { background: #CDF8C4; border-color: #3BB54A; color: #1E7A2E; }
.cm-st.wait { background: #F8E9FF; border-color: #B23FDB; color: #9A2FC2; }
.cm-st.cancel { background: #FFF0F0; border-color: #C43A3A; color: #B42323; }
.cm-st.late { background: #fff; border-color: #D64545; color: #D64545; }
.cm-st.done { background: #F7F7F7; border-color: #BDBDBD; color: #777; }

/* ---------- AUTOMAÇÕES ---------- */
.cm-kpis.five { grid-template-columns: repeat(5, 1fr); }
.cm-tr.au { grid-template-columns: 1.5fr .75fr 1fr .8fr .6fr 50px; }
.cm-tr.au .nm { font-weight: 600; }
.cm-tr.au.run { background: #F2FBEF; transition: background .3s; }
.cm-tr.au [data-ex] { transition: color .3s; }
.cm-tr.au.run [data-ex] { color: var(--cm-green); font-weight: 700; }
.cm-sw { display: inline-block; width: 36px; height: 20px; border-radius: 999px; background: #CFCFCF; position: relative; transition: background .3s; vertical-align: middle; }
.cm-sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.cm-sw.on { background: #6FD66F; }
.cm-sw.on::after { transform: translateX(16px); }

/* ---------- movimento reduzido: só o estado final ---------- */
@media (prefers-reduced-motion: reduce) {
  .cm-app *, .cm-app *::before { animation: none !important; transition: none !important; }
}

/* ---------- FICHA DO CLIENTE (v2) ---------- */
.cm-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 30; transition: transform .75s cubic-bezier(.45,0,.2,1); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.cm-cursor.click { animation: cmClick .3s ease; }
@keyframes cmClick { 50% { scale: .82; } }
.cm-app.cli .cl-main { padding: 0; display: grid; grid-template-columns: 362px 1fr; }
.cl-perfil { border-right: 1px solid var(--cm-line); padding: 32px 24px 0 44px; }
.cl-foto { width: 96px; height: 96px; border-radius: 22px; background: linear-gradient(140deg, #D6E9D2, #A9CDA3); color: #1E4D2B; font-size: 34px; font-weight: 700; display: grid; place-items: center; position: relative; }
.cl-foto span { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); display: grid; place-items: center; color: #777; }
.cl-foto span svg { width: 14px; height: 14px; }
.cl-nome { font-size: 26px; font-weight: 700; margin-top: 22px; }
.cl-sit { font-size: 13px; color: var(--cm-muted); margin-top: 4px; }
.cl-tags { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.cl-tag { font-size: 11px; font-weight: 500; color: #6E56CF; background: rgba(110,86,207,.1); border: 1px solid #6E56CF; border-radius: 4px; padding: 2px 12px; }
.cl-mais { width: 22px; height: 22px; border: 1px solid var(--cm-line); border-radius: 4px; display: grid; place-items: center; }
.cl-mais svg { width: 12px; height: 12px; }
.cl-dados { margin: 24px 0 0; }
.cl-dados dt { font-size: 13px; color: var(--cm-muted); margin-top: 16px; }
.cl-dados dd { margin: 4px 0 0; font-size: 15px; }
.cl-vermais { display: block; margin-top: 22px; font-size: 14px; font-weight: 600; }
.cl-acoes { margin-top: 16px; height: 48px; border-radius: 6px; background: var(--cm-dark); color: #7AF365; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cl-acoes svg { width: 14px; height: 14px; }
.cl-aten { border-top: 1px solid var(--cm-line); margin-top: 24px; padding-top: 22px; }
.cl-aten > div { margin-top: 14px; border: 1px solid var(--cm-line); border-radius: 6px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.cl-aten u { font-weight: 600; }
.cl-conteudo { padding: 28px 32px 0; position: relative; overflow: hidden; }
.cl-topo { display: flex; justify-content: space-between; align-items: center; }
.cl-abas { display: flex; gap: 4px; border: 1px solid #E5E7EB; border-radius: 8px; padding: 4px; }
.cl-abas span { padding: 10px 16px; border-radius: 6px; font-size: 15px; font-weight: 500; color: #555; transition: background .25s, color .25s; }
.cl-abas span.on { background: var(--cm-mint); color: var(--cm-mint-ink); font-weight: 700; }
.cl-painel { padding-top: 26px; height: calc(100% - 52px); overflow: hidden; }
.cl-painel.in > * { animation: clIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes clIn { from { opacity: 0; transform: translateY(10px); } }
.cl-filtros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cl-filtros small, .cl-kp small, .cl-op-g small, .cl-orig small, .cl-kpis small { display: block; font-size: 14px; color: #555; margin-bottom: 4px; }
.cl-filtros .cm-sel { border-color: #6B6B6B; font-size: 15px; height: 40px; }
.cl-resumo { margin: 16px 0 14px; font-size: 16px; }
.cl-serv { border: 1px solid var(--cm-line); border-radius: 8px; padding: 18px 24px; margin-bottom: 14px; }
.cl-serv-h { display: flex; justify-content: space-between; align-items: center; }
.cl-serv-h b { font-size: 18px; }
.cl-serv-s { color: #666; font-size: 15px; margin-top: 6px; }
.cl-serv-s u { color: var(--cm-ink); font-weight: 600; }
.pg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C9A227; margin-right: 6px; }
.pg.ok::before { background: #3E9A3E; }
.cl-barra { display: inline-flex; width: 400px; height: 5px; border-radius: 3px; overflow: hidden; background: #EEE; margin-top: 16px; vertical-align: middle; }
.cl-barra i { height: 100%; }
.cl-serv-p { display: inline-flex; align-items: center; margin-left: 14px; font-size: 15px; }
.pt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 6px 0 10px; }
.pt.d { background: #0B5A2A; } .pt.l { background: #8EE56B; } .pt.am { background: #C9A227; margin-left: 0; } .pt.ok { background: #3E9A3E; margin-left: 0; }
.cl-serv-r { display: flex; justify-content: space-between; color: #666; font-size: 15px; margin-top: 14px; }
.cl-serv-r span { color: var(--cm-ink); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cl-serv-r svg { width: 13px; height: 13px; }
.cl-sess { margin-top: 16px; }
.cl-kp { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 15px; margin-bottom: 8px; }
.cl-sr { display: grid; grid-template-columns: 30px 60px 1.2fr 1fr 1.2fr 160px; align-items: center; height: 46px; border-top: 1px solid var(--cm-line); font-size: 15px; animation: clIn .4s cubic-bezier(.2,.8,.2,1) both; }
.cl-sr .cb { width: 18px; height: 18px; border: 1.5px solid #7BD67B; border-radius: 4px; }
.cl-un { display: flex; justify-content: space-between; align-items: center; }
.cl-un b { font-size: 22px; }
.cl-btn { height: 40px; padding: 0 16px; border-radius: 6px; background: var(--cm-dark); color: #7AF365; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.cl-btn svg { width: 14px; height: 14px; }
.cl-tl { display: flex; gap: 14px; padding: 18px 0 8px; position: relative; }
.cl-tl .ic { width: 38px; height: 38px; border-radius: 8px; background: #F2F2F2; display: grid; place-items: center; color: #888; flex: none; }
.cl-tl .ic svg { width: 16px; height: 16px; }
.cl-tl > div { flex: 1; }
.cl-tl p { margin: 2px 0 0; font-size: 16px; }
.cl-tl p.tx { font-size: 15px; color: #333; margin-top: 4px; }
.cl-tl small { display: block; color: var(--cm-muted); font-size: 13px; margin-top: 8px; }
.cl-tl.ev { animation: clIn .45s cubic-bezier(.2,.8,.2,1) both; }
.cl-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: #666; margin-top: 6px; }
.cl-meta span { display: inline-flex; gap: 4px; align-items: center; }
.cl-meta svg { width: 13px; height: 13px; }
.cl-meta .ok { color: #1E7A2E; } .cl-meta .no { color: #D64545; }
.cl-acts { display: inline-flex; gap: 12px; align-items: center; }
.cl-acts > svg { width: 18px; height: 18px; }
.cl-out { border: 1px solid var(--cm-ink); border-radius: 6px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.cl-ghost { color: #666; font-size: 14px; }
.cl-vazio { color: #777; margin-top: 10px; }
.cl-cap { display: block; font-size: 12px; font-weight: 700; color: #555; letter-spacing: .03em; margin-bottom: 8px; }
.cl-hint { display: inline-flex; gap: 14px; align-items: center; font-size: 13px; color: #666; }
.cl-fin-h { display: flex; justify-content: space-between; align-items: center; }
.cl-seg { display: flex; border: 1px solid #E5E7EB; border-radius: 8px; padding: 4px; }
.cl-seg span { padding: 9px 16px; border-radius: 6px; font-size: 15px; font-weight: 500; color: #555; }
.cl-seg span.on { background: var(--cm-mint); color: var(--cm-mint-ink); font-weight: 700; }
.cl-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.cl-kpis > div { border-top: 3px solid; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.12); padding: 16px; }
.cl-kpis b { display: block; font-size: 24px; }
.cl-kpis span { font-size: 14px; }
.cl-tab { margin-top: 26px; font-size: 15px; }
.cl-tab > div { display: grid; align-items: center; min-height: 58px; border-bottom: 1px solid var(--cm-line); }
.cl-tab.pv > div { grid-template-columns: .9fr 2fr 1fr 1fr 1fr 1fr; }
.cl-tab.ex > div { grid-template-columns: 1.3fr 1fr 2.2fr 1fr; }
.cl-tab.ex > div > span:last-child { text-align: right; }
.cl-tab .th { min-height: 40px; font-size: 12px; color: #555; text-transform: uppercase; }
.cl-tab u { font-weight: 700; display: block; }
.cl-tab small { font-size: 12px; color: #666; }
.cl-tab .menos { color: #E5484D; font-weight: 600; }
.cl-tab .mais { color: #1E7A2E; font-weight: 600; }
.cl-orig { display: flex; gap: 40px; align-items: center; background: #F2F2F2; border-radius: 8px; padding: 16px 24px; font-size: 16px; }
.cl-cora { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 22px; }
.cl-box { border: 1px solid var(--cm-line); border-radius: 8px; padding: 18px 22px; }
.cl-box > b { font-size: 18px; display: block; }
.cl-box > small { font-size: 13px; color: #666; }
.cl-lado { display: flex; flex-direction: column; gap: 18px; }
.cl-op { border: 1px solid var(--cm-line); border-radius: 8px; padding: 18px 20px; margin-top: 16px; }
.cl-op .h { display: flex; justify-content: space-between; align-items: center; font-size: 17px; font-weight: 600; }
.cl-op > small { color: #666; font-size: 13px; }
.cl-steps { display: flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 15px; }
.cl-steps i { width: 26px; height: 6px; border-radius: 3px; background: #E5E7EB; transition: background .4s; }
.cl-steps i.on { background: #0B5A2A; }
.cl-steps span { margin-left: 10px; }
.cl-op-g { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; font-size: 15px; }
.cl-tarefa { display: flex; gap: 12px; margin-top: 14px; font-size: 15px; }
.cl-tarefa .o { width: 18px; height: 18px; border: 1.5px solid #999; border-radius: 50%; flex: none; margin-top: 18px; }
.cl-tarefa small { display: block; font-size: 11px; font-weight: 700; color: #666; }
.cl-tarefa em { display: block; font-style: normal; color: #555; font-size: 13px; margin-top: 4px; }
.cl-conv { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14px; }
.cl-conv > svg { width: 22px; height: 22px; color: #25A244; }
.cl-conv b { display: block; } .cl-conv span { color: #666; }
.cl-hist .cl-he { display: flex; gap: 12px; margin-top: 14px; font-size: 14px; }
.cl-he .ic { width: 30px; height: 30px; border-radius: 6px; background: #F2F2F2; color: #888; display: grid; place-items: center; flex: none; }
.cl-he .ic svg { width: 14px; height: 14px; }
.cl-he p { margin: 3px 0 0; }
.cl-he em { display: block; font-style: normal; color: var(--cm-muted); font-size: 12px; margin-top: 4px; }

/* ---------- NOTA FISCAL (v2) ---------- */
.cm-app.nf .nf-main { padding: 28px 110px 0 128px; transition: opacity .3s, transform .3s; }
.nf-main.sai { opacity: 0; transform: translateY(-8px); }
.nf-main.entra { opacity: 0; transform: translateY(10px); }
.nf-etq { position: absolute; left: 112px; bottom: 26px; z-index: 25; display: flex; align-items: center; gap: 12px; background: #002B1F; color: #F5F4EF; border-radius: 999px; padding: 10px 22px 10px 10px; font-family: 'Funnel Sans', 'Inter', sans-serif; font-size: 20px; font-weight: 600; box-shadow: 0 16px 34px -14px rgba(0,43,31,.6); opacity: 0; transform: translateY(12px); }
.nf-etq b { width: 36px; height: 36px; border-radius: 50%; background: #00EF57; color: #002B1F; display: grid; place-items: center; font-size: 18px; }
.nf-etq.on { animation: nfEtq .5s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes nfEtq { to { opacity: 1; transform: none; } }
.nf-toast { left: 50%; right: auto; bottom: 30px; transform: translate(-50%, 12px); z-index: 26; }
.nf-toast.on { transform: translate(-50%, 0); }
.nf-steps { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin-bottom: 30px; }
.nf-steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: #E5E7EB; }
.nf-st { text-align: center; position: relative; font-size: 17px; font-weight: 600; color: #13231A; }
.nf-st i { font-style: normal; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #C9CED6; background: #fff; display: grid; place-items: center; margin: 0 auto 8px; font-size: 15px; font-weight: 500; color: #888; position: relative; z-index: 1; transition: background .4s, border-color .4s, color .4s; }
.nf-st.at i { border-color: #7AF365; color: #3E8B4D; }
.nf-st.ok i { background: #7AF365; border-color: #7AF365; color: #fff; }
.nf-st span { display: block; max-width: 140px; margin: 0 auto; line-height: 1.2; }
.nf-sub { font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.nf-sub2 { color: #666; font-size: 15px; margin: 0 0 16px; }
.nf-op { display: flex; gap: 18px; border: 1px solid var(--cm-line); border-radius: 8px; padding: 24px 32px; margin-top: 14px; transition: border-color .3s, box-shadow .3s; }
.nf-op:first-of-type { border-color: #7AF365; }
.nf-op.sel { border-color: #7AF365; box-shadow: 0 0 0 1px #7AF365; }
.nf-op b { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.nf-op p { margin: 4px 0 0; color: #666; font-size: 15px; }
.nf-op .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #7AF365; flex: none; margin-top: 4px; position: relative; }
.nf-op .rd.on::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #7AF365; }
.nf-rec { font-style: normal; font-size: 11px; font-weight: 500; color: #2F6FD6; border: 1px solid #2F6FD6; background: #EEF4FF; border-radius: 4px; padding: 1px 6px; }
.nf-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--cm-line); }
.nf-volta { height: 46px; padding: 0 70px; border: 1px solid #7AF365; color: #3E8B4D; border-radius: 6px; display: flex; align-items: center; font-weight: 600; }
.nf-cont { height: 46px; padding: 0 60px; background: #7AF365; color: #13231A; border-radius: 6px; display: flex; align-items: center; font-weight: 700; transition: transform .18s, filter .18s; }
.nf-box { border: 1px solid var(--cm-line); border-radius: 8px; padding: 24px 40px; }
.nf-tg { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.nf-tg b { font-size: 17px; } .nf-tg p { margin: 2px 0 0; color: #666; font-size: 14px; }
.nf-box small { font-size: 16px; font-weight: 500; }
.nf-mail { display: flex; gap: 12px; margin: 8px 0 12px; max-width: 710px; }
.nf-mail .cm-search { color: #9A9A9A; }
.nf-mail .cm-search.dig { color: var(--cm-ink); border-color: #8FBDF7; }
.nf-add { height: 42px; padding: 0 34px; background: #EDEDED; color: #AAA; border-radius: 6px; display: flex; align-items: center; font-weight: 600; transition: transform .18s; }
.nf-chip { max-width: 708px; border: 1px solid var(--cm-line); border-radius: 6px; height: 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; animation: clIn .4s both; }
.nf-chip svg { width: 14px; height: 14px; color: #888; }
.nf-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.nf-k { border-top: 4px solid; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.12); padding: 16px; }
.nf-k small { display: block; color: #555; font-size: 15px; }
.nf-k b { display: block; font-size: 24px; font-weight: 600; margin-top: 4px; transition: color .3s; }
.nf-k b.flash { color: var(--cm-green); }
.nf-k span { font-size: 14px; }
.nf-tab { border: 1px solid var(--cm-line); border-radius: 6px; margin-top: 40px; overflow: hidden; }
.nf-tab > div { display: grid; grid-template-columns: 50px 130px 1.4fr 1.4fr 1fr 1fr 1.2fr 1.1fr 60px 50px; align-items: center; min-height: 66px; padding: 0 16px; border-top: 1px solid var(--cm-line); font-size: 16px; transition: background .3s; }
.nf-tab .th { background: #F2F2F2; border-top: 0; font-weight: 600; min-height: 64px; }
.nf-tab .tr.sel { background: #CFF7C6; }
.nf-tab small { display: block; font-size: 11px; color: #666; }
.nf-tab .cb { width: 18px; height: 18px; border: 1.5px solid #7BD67B; border-radius: 4px; }
.nf-tab svg { width: 18px; height: 18px; }
.nf-or { font-style: normal; font-size: 11px; background: #F2F2F2; border: 1px solid #CFCFCF; border-radius: 4px; padding: 2px 12px; }
.nf-proc { font-size: 12px; color: #1D8FD6; font-weight: 600; animation: nfPulse 1s infinite; }
@keyframes nfPulse { 50% { opacity: .45; } }
.nf-menu { position: absolute; right: 150px; top: 380px; width: 240px; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 10px 0; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; z-index: 6; }
.nf-menu.on { opacity: 1; transform: none; }
.nf-menu span { display: flex; align-items: center; gap: 8px; padding: 9px 18px; font-size: 16px; color: #555; }
.nf-menu span.off { color: #BBB; }
.nf-menu svg { width: 15px; height: 15px; }
.nf-drawer { position: absolute; right: 0; top: 0; bottom: 0; width: 380px; background: #fff; box-shadow: -20px 0 40px -20px rgba(0,0,0,.25); padding: 32px 26px; transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); z-index: 7; display: flex; flex-direction: column; gap: 10px; }
.nf-drawer.on { transform: none; }
.nf-drawer .x { position: absolute; right: 26px; top: 26px; } .nf-drawer .x svg { width: 22px; height: 22px; color: #666; }
.nf-drawer > b { font-size: 30px; margin-top: 40px; }
.nf-drawer > p { color: #666; margin: 10px 0 10px; }
.nf-drawer small { font-size: 15px; }
.nf-dh { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.nf-var { border: 1px solid var(--cm-line); border-radius: 999px; padding: 3px 10px; font-size: 12px; display: flex; align-items: center; gap: 4px; } .nf-var svg { width: 12px; height: 12px; }
.nf-desc { border: 1px solid #6B6B6B; border-radius: 4px; padding: 12px; font-size: 14px; line-height: 1.5; min-height: 104px; color: #6E56CF; transition: color .4s; }
.nf-desc.ok { color: var(--cm-ink); }
.nf-emit { margin-top: auto; height: 48px; border-radius: 6px; background: #7AF365; color: #13231A; font-weight: 700; display: grid; place-items: center; transition: transform .18s, filter .18s; }
.nf-doc-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.nf-doc { width: 960px; background: #fff; border: 1px solid #222; padding: 24px 30px; font-size: 16px; color: #111; box-shadow: 0 30px 60px -30px rgba(0,0,0,.4); animation: nfDoc .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes nfDoc { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.nf-doc .h { display: flex; justify-content: space-between; border-bottom: 1px solid #222; padding-bottom: 12px; }
.nf-doc .h b { display: block; font-size: 22px; } .nf-doc .h span { color: #555; }
.nf-doc .n { border-left: 1px solid #222; padding-left: 14px; min-width: 150px; text-align: right; }
.nf-doc .n b { font-size: 34px; }
.nf-doc small { display: block; font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: .03em; }
.nf-doc .s { border-bottom: 1px solid #222; padding: 10px 0; }
.nf-doc .s b { display: block; font-size: 19px; }
.nf-doc .s.g { min-height: 150px; }
.nf-doc .t { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 12px; font-size: 17px; }
.nf-doc .t .tot { background: #EEE; padding: 4px 8px; font-weight: 700; }
.nf-doc-acts { display: flex; gap: 12px; margin-top: 22px; }
.nf-doc-acts .cl-out { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 9px 16px; background: #fff; }
.nf-doc-acts svg { width: 15px; height: 15px; }
