/* ============================================================
   iPrado demo — CRM (Pipelines, Kanban, celular do cliente, modal, contatos)
   ============================================================ */
.crm-grad{background:linear-gradient(135deg,#6366f1 0%,#8b5cf6 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.crm-em{color:#10B981}
.crm-h1{font-size:30px;line-height:36px;font-weight:700;letter-spacing:-0.035em}

/* ---------------- Pipelines ---------------- */
.crm-pl-page{padding:4px 4px 90px;display:flex;flex-direction:column;gap:32px}
.crm-pl-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.crm-pl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
@media (max-width:1100px){.crm-pl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.crm-pl-card{position:relative;background:rgba(255,255,255,.5);backdrop-filter:blur(4px);border:1px solid rgba(218,223,231,.5);border-radius:16px;padding:24px;
  box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);transition:all .3s}
.crm-pl-card:hover{background:rgba(255,255,255,.8);border-color:rgba(67,73,239,.2);box-shadow:0 10px 15px -3px rgba(67,73,239,.05),0 4px 6px -4px rgba(67,73,239,.05)}
.crm-pl-card.off{background:rgba(255,255,255,.3);border-color:rgba(218,223,231,.3);opacity:.6}
.crm-pl-card.off:hover{opacity:.8}
.crm-pl-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:16px}
.crm-pl-ic{padding:12px;border-radius:12px;background:rgba(234,237,241,.2);display:inline-flex;color:var(--primary);transition:transform .2s}
.crm-pl-ic svg.lucide{width:24px;height:24px}
.crm-pl-card.off .crm-pl-ic{color:var(--muted-fg)}
.crm-pl-card:hover .crm-pl-ic{transform:scale(1.1)}
.crm-pl-off{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:500;color:var(--muted-fg);background:rgba(234,237,241,.3);border:1px solid rgba(218,223,231,.4);padding:2px 8px;border-radius:999px}
.crm-pl-off svg.lucide{width:10px;height:10px}
.crm-pl-gear{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted-fg);opacity:0;transition:opacity .2s}
.crm-pl-gear svg.lucide{width:16px;height:16px}
.crm-pl-card:hover .crm-pl-gear{opacity:1}.crm-pl-gear:hover{background:var(--accent)}
.crm-pl-link{display:block}
.crm-pl-link h3{font-size:18px;line-height:28px;font-weight:600;margin-bottom:8px;transition:color .2s}
.crm-pl-card:hover .crm-pl-link h3{color:var(--primary)}
.crm-pl-link>div{margin-bottom:16px}
.crm-pl-dots{display:flex}
.crm-pl-dot{width:24px;height:24px;border-radius:50%;border:1px solid var(--background);margin-left:-8px}
.crm-pl-dot:first-child{margin-left:0}
.crm-pl-foot{padding-top:16px;border-top:1px solid rgba(218,223,231,.5)}
.crm-pl-foot a{font-size:14px;font-weight:500;color:var(--primary);display:inline-flex;align-items:center;gap:4px;transition:gap .2s}
.crm-pl-foot a:hover{gap:8px}
.crm-pl-foot svg.lucide{width:12px;height:12px}

/* ---------------- Kanban: layout ---------------- */
.crm-kb{height:100%;display:flex;gap:12px;min-height:0;min-width:0}
.crm-kb-main{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
.crm-kb-head{display:flex;flex-direction:column;gap:18px;margin-bottom:18px;flex-shrink:0}
.crm-kb-r1{display:flex;align-items:center;justify-content:space-between;gap:12px}
.crm-kb-title{font-size:30px;line-height:36px;font-weight:700;letter-spacing:-0.035em;display:flex;align-items:center;gap:12px}
.crm-kb-cfg{width:32px;height:32px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted-fg);opacity:.5;transition:all .15s}
.crm-kb-cfg:hover{opacity:1;color:var(--primary);background:var(--accent)}
.crm-kb-cfg svg.lucide{width:20px;height:20px}
.crm-kb-sub{color:var(--muted-fg);font-size:14px;margin-top:4px}
.crm-kb-acts{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex-shrink:0}
.crm-btn-parc{border-color:rgba(67,73,239,.2);color:var(--primary);background:var(--background)}
.crm-btn-parc:hover{background:rgba(67,73,239,.05)}
.crm-btn-new{color:#09090B} /* peculiaridade do original: text-white vira quase preto no tema claro */
.crm-kb-r2{display:flex;align-items:center;gap:16px}
.crm-search{flex:1 1 220px;max-width:384px;min-width:0}
.crm-search .input{background:rgba(234,237,241,.3);border-color:rgba(218,223,231,.5);height:36px}
.crm-filter{flex-shrink:0}
.crm-filter svg.lucide{width:16px;height:16px}
.crm-stats{margin-left:auto;display:flex;gap:8px;flex-shrink:0}
.crm-stat{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:12px;font-size:14px;white-space:nowrap}
.crm-stat svg.lucide{width:16px;height:16px}
.crm-stat b{font-weight:600}
@keyframes crmFadeDown{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

.crm-board-wrap{position:relative;flex:1;min-height:0;overflow:hidden}
.crm-board{display:flex;gap:16px;align-items:stretch;overflow-x:auto;overflow-y:hidden;height:100%;padding-bottom:14px;min-width:0}
.crm-board.scrollbar-x-visible::-webkit-scrollbar-thumb{border:2px solid transparent;background-clip:content-box}

/* coluna */
.kanban-column{background:linear-gradient(180deg,rgba(245,245,247,.7) 0%,rgba(240,241,244,.5) 100%);backdrop-filter:blur(12px);border:1px solid rgba(209,213,219,.5);border-radius:16px}
.kanban-column-header{background:rgba(240,241,244,.8);border-bottom:1px solid rgba(200,214,230,.4)}
.crm-col{flex:1 0 280px;min-width:280px;max-width:350px;height:100%;display:flex;flex-direction:column;overflow:hidden}
.crm-col-h{padding:16px;border-radius:15px 15px 0 0;flex-shrink:0;min-height:82px}
.crm-col-row{display:flex;align-items:center;gap:8px}
.crm-grip{color:rgba(100,116,139,.3);padding:4px;margin-left:-8px;border-radius:6px;cursor:grab;display:flex}
.crm-grip svg.lucide{width:16px;height:16px}
.crm-st-tile{padding:8px;border-radius:10px;display:flex;background:rgba(234,237,241,.5);color:var(--primary);flex-shrink:0}
.crm-st-tile svg.lucide{width:16px;height:16px}
.crm-st-tile.won{background:rgba(16,185,129,.2);color:#34D399}
.crm-st-tile.lost{background:rgba(239,68,68,.2);color:#F87171}
.crm-st-tile.wait{background:rgba(245,158,11,.2);color:#FBBF24}
.crm-col-nm{flex:1;min-width:0}
.crm-col-title{display:flex;align-items:center;gap:6px;flex-wrap:wrap;row-gap:3px}
.crm-col-title h3{font-size:14px;font-weight:600;line-height:20px;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-type-pill{padding:1px 8px;border-radius:999px;font-size:10px;font-weight:700;text-transform:uppercase;border:1px solid;line-height:14px}
.crm-type-pill.won{background:rgba(16,185,129,.2);color:#10B981;border-color:rgba(16,185,129,.3)}
.crm-type-pill.lost{background:rgba(239,68,68,.2);color:#EF4444;border-color:rgba(239,68,68,.3)}
.crm-type-pill.wait{background:rgba(245,158,11,.2);color:#D97706;border-color:rgba(245,158,11,.3)}
.crm-col-count{font-size:10px;color:var(--muted-fg);margin-top:2px}
.crm-col-acts{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:4px}
.crm-gear,.crm-plus{padding:6px;border-radius:10px;display:flex;transition:transform .15s,background .15s}
.crm-gear{background:rgba(234,237,241,.5);color:var(--muted-fg)}.crm-gear:hover{background:var(--secondary);transform:scale(1.1)}
.crm-plus{background:rgba(67,73,239,.1);color:var(--primary)}.crm-plus:hover{background:rgba(67,73,239,.2);transform:scale(1.1)}
.crm-gear svg.lucide,.crm-plus svg.lucide{width:16px;height:16px}
.crm-col-total{display:flex;align-items:center;gap:6px;font-size:12px;margin-top:12px;color:#10B981;font-weight:600}
.crm-col-total svg.lucide{width:12px;height:12px}
.crm-col-b{flex:1;min-height:0;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px}

/* cartão de oportunidade */
.opportunity-card{background:rgba(245,245,247,.9);border:1px solid rgba(209,213,219,.8);backdrop-filter:blur(2px);border-radius:12px;transition:all .25s cubic-bezier(.4,0,.2,1)}
.opportunity-card:hover{background:rgba(243,244,246,.95);border-color:rgba(191,199,212,1);box-shadow:0 4px 12px rgba(0,0,0,.06);transform:translateY(-1px)}
.crm-card{padding:16px;cursor:grab;flex-shrink:0}
.crm-card-h{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:12px}
.crm-card-h h3{font-size:14px;font-weight:600;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;transition:color .15s}
.crm-card:hover .crm-card-h h3{color:var(--primary)}
.crm-card-menu{opacity:0;padding:4px;border-radius:8px;color:var(--muted-fg);display:flex;transition:opacity .15s;margin:-4px -4px 0 0}
.crm-card-menu svg.lucide{width:16px;height:16px}
.crm-card:hover .crm-card-menu{opacity:1}
.crm-card-ct{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted-fg);margin-bottom:6px}
.crm-av{width:24px;height:24px;border-radius:50%;background:rgba(67,73,239,.2);color:var(--primary);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.crm-av svg.lucide{width:12px;height:12px}
.crm-av.lg{width:36px;height:36px}.crm-av.lg svg.lucide{width:16px;height:16px}
.crm-assignee{display:inline-flex;align-items:center;gap:4px;font-size:10px;padding:1px 8px;border-radius:999px;border:1px solid rgba(59,130,246,.3);background:rgba(59,130,246,.1);color:#3B82F6;margin-bottom:6px}
.crm-assignee svg.lucide{width:10px;height:10px}
.crm-card-v{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.crm-val{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:10px;background:rgba(16,185,129,.1);color:#10B981;font-size:12px;font-weight:600}
.crm-val svg.lucide{width:12px;height:12px}
.crm-prio{display:inline-flex;align-items:center;font-size:10px;padding:2px 8px;border-radius:999px;border:1px solid;line-height:14px;font-weight:500}
.crm-p-low{background:rgba(100,116,139,.1);color:#94A3B8;border-color:rgba(100,116,139,.2)}
.crm-p-med{background:rgba(59,130,246,.1);color:#60A5FA;border-color:rgba(59,130,246,.2)}
.crm-p-high{background:rgba(249,115,22,.1);color:#FB923C;border-color:rgba(249,115,22,.2)}
.crm-p-urg{background:rgba(239,68,68,.1);color:#F87171;border-color:rgba(239,68,68,.2)}
.crm-paused{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;background:rgba(245,158,11,.14);color:#B45309;border:1px solid rgba(245,158,11,.3);line-height:14px;white-space:nowrap}
.crm-paused svg.lucide{width:11px;height:11px}
.crm-card-f{display:flex;align-items:center;justify-content:space-between;padding-top:12px;border-top:1px solid rgba(255,255,255,.05);font-size:11px;color:var(--muted-fg)}
.crm-card-f span{display:inline-flex;align-items:center;gap:6px}
.crm-card-f svg.lucide{width:12px;height:12px}
.crm-exp{color:rgba(217,119,6,.8)}
.crm-new{box-shadow:0 0 0 2px rgba(99,102,241,.35),0 10px 24px -10px rgba(99,102,241,.45)}
.crm-fly{position:fixed;z-index:90;pointer-events:none;margin:0;background:#fff!important;border-color:rgba(99,102,241,.45)!important}
.crm-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;min-height:120px;cursor:pointer;
  background:linear-gradient(180deg,rgba(99,102,241,.05) 0%,transparent 100%);border:2px dashed rgba(99,102,241,.2);border-radius:16px;transition:all .3s}
.crm-empty:hover{border-color:rgba(99,102,241,.4)}
.crm-empty-ic{padding:12px;border-radius:50%;display:flex}
.crm-empty-ic svg.lucide{width:20px;height:20px}
.crm-empty p{font-size:14px;color:var(--muted-fg)}

/* ---------------- Celular (WhatsApp do cliente) ---------------- */
.crm-phone-col{width:338px;flex-shrink:0;display:flex;flex-direction:column;min-height:0;padding:0 8px 10px 8px}
.crm-ph-label{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted-fg);height:30px;margin-bottom:8px;flex-shrink:0}
.crm-ph-dot{width:8px;height:8px;border-radius:50%;background:#25D366;box-shadow:0 0 0 3px rgba(37,211,102,.2)}
.crm-ph-toggle{margin-left:auto;display:inline-flex;background:var(--muted);border-radius:10px;padding:2px;letter-spacing:0;text-transform:none}
.crm-ph-toggle button{height:26px;padding:0 10px;border-radius:8px;font-size:12px;font-weight:500;color:var(--muted-fg)}
.crm-ph-toggle button.on{background:#fff;color:var(--foreground);box-shadow:var(--shadow-sm)}
.crm-phone{flex:1;min-height:0;max-height:780px;background:#1a1a1c;border-radius:46px;padding:9px;position:relative;
  box-shadow:0 0 0 1.5px #3a3a3e,0 0 0 4px #121214,0 30px 60px -20px rgba(15,23,42,.45),0 18px 36px -18px rgba(15,23,42,.35)}
.crm-phone::before{content:"";position:absolute;right:-6px;top:120px;width:3px;height:64px;border-radius:0 3px 3px 0;background:#2b2b2f}
.crm-phone::after{content:"";position:absolute;left:-6px;top:100px;width:3px;height:36px;border-radius:3px 0 0 3px;background:#2b2b2f;box-shadow:0 52px 0 #2b2b2f,0 100px 0 #2b2b2f}
.crm-phone-screen{height:100%;border-radius:38px;overflow:hidden;display:flex;flex-direction:column;background:#EFEAE2;position:relative;font-family:-apple-system,'SF Pro Text','Segoe UI',Roboto,Helvetica,Arial,sans-serif;letter-spacing:0}
.wa-status{height:36px;flex-shrink:0;background:#075E54;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:4px 22px 0 28px;position:relative;font-size:13px;font-weight:600}
.wa-island{position:absolute;left:50%;top:8px;transform:translateX(-50%);width:92px;height:25px;border-radius:999px;background:#000}
.wa-sicons{display:flex;align-items:center;gap:4px}
.wa-sicons svg.lucide{width:14px;height:14px}
.wa-head{flex-shrink:0;background:#075E54;color:#fff;display:flex;align-items:center;gap:8px;padding:6px 12px 9px 6px}
.wa-back{width:22px;height:22px}
.wa-avatar{width:34px;height:34px;border-radius:50%;background:#fff;color:#09090B;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;letter-spacing:-.02em;font-family:var(--font)}
.wa-who{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.wa-who b{font-size:15px;font-weight:600}
.wa-sub{font-size:11.5px;opacity:.85;transition:color .2s}
.wa-sub.typing{color:#9EF5C0;opacity:1;font-style:italic}
.wa-hic{width:19px;height:19px;margin-left:12px;opacity:.95}
.wa-body{flex:1;min-height:0;overflow-y:auto;padding:10px 10px 8px;display:flex;flex-direction:column;gap:2px;
  background-color:#EFEAE2;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d9cfc1' stroke-width='1.3' stroke-linecap='round' opacity='.45'%3E%3Ccircle cx='18' cy='20' r='7'/%3E%3Cpath d='M48 12l8 8-8 8M78 18h14M85 11v14'/%3E%3Cpath d='M100 52c4-6 12-6 14 0s-6 10-7 14c-1-4-11-8-7-14z'/%3E%3Crect x='14' y='56' width='16' height='12' rx='3'/%3E%3Cpath d='M52 60c6-8 16 0 10 6M70 92l6-10 6 10zM20 96c4 4 10 4 14 0M104 96a6 6 0 1 1-12 0'/%3E%3Ccircle cx='60' cy='106' r='3'/%3E%3Cpath d='M38 82l6 4M90 74h8'/%3E%3C/g%3E%3C/svg%3E");background-size:120px 120px}
.wa-day{align-self:center;background:#fff;color:#54656F;font-size:11px;font-weight:500;padding:4px 10px;border-radius:7px;box-shadow:0 1px .5px rgba(11,20,26,.13);margin:2px 0 8px;text-transform:uppercase;letter-spacing:.02em}
.wa-e2e{align-self:center;background:#FFEECD;color:#54656F;font-size:10.5px;line-height:1.35;padding:6px 10px;border-radius:8px;text-align:center;max-width:90%;margin-bottom:10px;box-shadow:0 1px .5px rgba(11,20,26,.1)}
.wa-e2e svg.lucide{width:10px;height:10px;display:inline;vertical-align:-1px;margin-right:4px}
.wa-row{display:flex;margin-top:1px}
.wa-row.tail{margin-top:7px}
.wa-row.out{justify-content:flex-end}
.wa-bubble{position:relative;max-width:84%;padding:6px 8px 7px 9px;border-radius:8px;font-size:13.2px;line-height:1.36;color:#111B21;box-shadow:0 1px .5px rgba(11,20,26,.13);word-wrap:break-word;overflow-wrap:anywhere}
.wa-row.in .wa-bubble{background:#fff}
.wa-row.out .wa-bubble{background:#D9FDD3}
.wa-row.in.tail .wa-bubble{border-top-left-radius:0}
.wa-row.out.tail .wa-bubble{border-top-right-radius:0}
.wa-row.in.tail .wa-bubble::before{content:"";position:absolute;left:-7px;top:0;border-top:0 solid transparent;border-right:8px solid #fff;border-bottom:10px solid transparent}
.wa-row.out.tail .wa-bubble::before{content:"";position:absolute;right:-7px;top:0;border-left:8px solid #D9FDD3;border-bottom:10px solid transparent}
.wa-bubble b{font-weight:700}
.wa-meta{float:right;display:inline-flex;align-items:center;gap:3px;font-size:10.5px;color:#667781;margin:6px 0 -4px 10px;line-height:1}
.wa-ticks{color:#53BDEB;width:15px;height:10px}
.wa-anim{animation:waIn .32s cubic-bezier(.2,.8,.2,1) both}
.wa-row.out.wa-anim{transform-origin:right bottom}.wa-row.in.wa-anim{transform-origin:left bottom}
@keyframes waIn{from{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:none}}
.wa-typing .wa-bubble{padding:9px 12px}
.wa-empty{margin:auto;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:18px;background:rgba(255,255,255,.75);border-radius:16px;max-width:82%;color:#54656F;font-size:12px;line-height:1.4;backdrop-filter:blur(4px);box-shadow:0 1px 2px rgba(11,20,26,.08)}
.wa-empty b{color:#111B21;font-size:13px}
.wa-empty-ic{width:40px;height:40px;border-radius:50%;background:rgba(37,211,102,.14);color:#00A884;display:flex;align-items:center;justify-content:center}
.wa-empty-ic svg.lucide{width:20px;height:20px}
.wa-compose{flex-shrink:0;display:flex;align-items:flex-end;gap:6px;padding:6px 7px 6px;background:#EFEAE2}
.wa-input{flex:1;min-width:0;min-height:40px;background:#fff;border-radius:22px;display:flex;align-items:flex-end;gap:8px;padding:10px 12px;box-shadow:0 1px .5px rgba(11,20,26,.1);color:#8696A0}
.wa-cic{width:19px;height:19px;flex-shrink:0}
.wa-field{flex:1;min-width:0;font-size:13.5px;line-height:1.3;color:#111B21;max-height:84px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end}
.wa-ph{color:#8696A0}
.wa-mic{width:40px;height:40px;border-radius:50%;background:#00A884;color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .15s}
.wa-mic svg.lucide{width:19px;height:19px}
.wa-mic.send{transform:scale(1.05)}
.wa-home{height:18px;flex-shrink:0;background:#EFEAE2;position:relative}
.wa-home::after{content:"";position:absolute;left:50%;top:5px;transform:translateX(-50%);width:110px;height:4px;border-radius:999px;background:#111}

/* pontinhos animados (digitando / aguardando) */
.crm-dots{display:inline-flex;gap:3px;align-items:center;font-style:normal}
.crm-dots i{width:5px;height:5px;border-radius:50%;background:#8B5CF6;animation:crmDot 1.2s infinite ease-in-out}
.crm-dots.dark i{background:#8696A0;width:6px;height:6px}
.crm-dots i:nth-child(2){animation-delay:.15s}.crm-dots i:nth-child(3){animation-delay:.3s}
@keyframes crmDot{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1}}

/* ---------------- Bastidor da IA (faixa no rodapé do quadro) ---------------- */
.crm-trace{position:absolute;left:10px;right:10px;bottom:54px;z-index:5;display:flex;align-items:stretch;gap:10px;background:rgba(255,255,255,.95);backdrop-filter:blur(14px);
  border:1px solid rgba(99,102,241,.28);border-radius:16px;padding:8px 8px 8px 12px;box-shadow:0 18px 40px -16px rgba(67,73,239,.45),0 4px 12px -4px rgba(15,23,42,.12)}
.crm-trace.crm-trace-in{animation:animIn .35s both}
.crm-trace-h{flex:0 0 auto;display:flex;flex-direction:column;justify-content:center;gap:3px;color:#4F46E5;padding-right:10px;border-right:1px solid rgba(99,102,241,.15)}
.crm-trace-h>div{display:flex;align-items:center;gap:5px}
.crm-trace-h svg.lucide{width:13px;height:13px}
.crm-trace-h b{font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:10px;white-space:nowrap}
.crm-trace-h span{color:var(--muted-fg);font-size:10px;background:rgba(99,102,241,.08);padding:1px 7px;border-radius:999px;align-self:flex-start;white-space:nowrap}
.crm-trace-body{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:6px}
.crm-trace-list{display:contents}
.crm-chip{flex:1 1 150px;min-width:0;display:flex;align-items:center;gap:7px;padding:5px 8px;border-radius:10px;background:rgba(99,102,241,.06);border:1px solid rgba(99,102,241,.14)}
.crm-chip-e{font-size:13px;line-height:1;width:16px;text-align:center;flex-shrink:0}
.crm-chip-t{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.crm-chip-t b{font-size:12px;font-weight:600;color:var(--foreground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-chip-t span{font-size:10.5px;color:var(--muted-fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-chip-s{width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#8B5CF6;flex-shrink:0}
.crm-chip-s svg.lucide{width:13px;height:13px}
.crm-chip.done .crm-chip-s{background:#10B981;color:#fff}
.crm-chip.done .crm-chip-s svg.lucide{width:11px;height:11px;stroke-width:3}
.crm-chip.audit{background:rgba(16,185,129,.07);border-color:rgba(16,185,129,.22)}
.crm-chip.hand{background:rgba(245,158,11,.08);border-color:rgba(245,158,11,.28)}
.crm-chip.crm{background:rgba(59,130,246,.06);border-color:rgba(59,130,246,.18)}
.crm-trace-wait{flex:1 1 100%;display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:10px;background:rgba(99,102,241,.06);border:1px solid rgba(99,102,241,.14)}
.crm-trace-wait>svg.lucide{width:18px;height:18px;color:#8B5CF6;flex-shrink:0;animation:crmHg 2s ease-in-out infinite}
.crm-trace-wait div{flex:1;display:flex;flex-direction:column;line-height:1.3;min-width:0}
.crm-trace-wait b{font-size:12.5px;font-weight:600}
.crm-trace-wait span{font-size:11px;color:var(--muted-fg)}
.crm-trace-body .crm-trace-wait.silent{flex:1 1 220px;min-width:0;padding:5px 8px;gap:7px}
.crm-trace-body .crm-trace-wait.silent b,.crm-trace-body .crm-trace-wait.silent span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-trace-body .crm-trace-wait.silent b{font-size:12px}.crm-trace-body .crm-trace-wait.silent span{font-size:10.5px}
.crm-trace-body .crm-trace-wait.silent>svg.lucide{width:15px;height:15px}
.crm-trace-wait.silent{background:rgba(245,158,11,.08);border-color:rgba(245,158,11,.28)}
.crm-trace-wait.silent>svg.lucide{color:#D97706;animation:none}
@keyframes crmHg{0%,40%{transform:rotate(0)}50%,90%{transform:rotate(180deg)}100%{transform:rotate(180deg)}}

/* ---------------- Modal da oportunidade ---------------- */
.dialog.crm-vm.side{right:356px;max-width:calc(100vw - 388px)}
.dialog.crm-vm{padding:0;gap:0;width:62vw;max-width:62vw;height:90vh;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
.dialog.crm-vm .dialog-body{flex:1;min-height:0;display:flex;flex-direction:column}
.crm-vm-head{padding:20px 56px 16px 24px;border-bottom:1px solid rgba(218,223,231,.5);display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-shrink:0}
.crm-vm-title{font-size:18px;font-weight:700;line-height:1.25}
.crm-vm-meta{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
.crm-stage-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;padding:2px 8px;border-radius:999px;border:1px solid}
.crm-stage-badge i{width:6px;height:6px;border-radius:50%}
.crm-vm-date{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted-fg)}
.crm-vm-date svg.lucide{width:12px;height:12px}
.crm-vm-acts{flex-shrink:0;display:flex;gap:8px;align-items:center}
.crm-lock{display:flex;align-items:center;gap:8px;font-size:12px;color:#D97706;background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.3);border-radius:10px;padding:6px 10px}
.crm-lock svg.lucide{width:14px;height:14px}
.crm-vm-body{flex:1;min-height:0;overflow-y:auto;padding:20px 24px 28px}
.crm-vm-grid{display:grid;grid-template-columns:3fr 2fr;gap:24px}
.crm-vm-left,.crm-vm-right{display:flex;flex-direction:column;gap:12px;min-width:0}
.crm-vm-right{gap:12px}
.crm-sec{display:flex;align-items:center;gap:8px;margin-top:4px}
.crm-sec-ic{width:24px;height:24px;border-radius:6px;background:rgba(67,73,239,.1);color:var(--primary);display:flex;align-items:center;justify-content:center}
.crm-sec-ic svg.lucide{width:14px;height:14px}
.crm-sec-t{font-size:12px;font-weight:600;color:var(--muted-fg);text-transform:uppercase;letter-spacing:.025em}
.crm-sec-n{margin-left:auto;font-size:10px;height:16px;padding:0 6px;border-radius:999px;background:var(--secondary);display:inline-flex;align-items:center;font-weight:600}
.crm-vm-tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.crm-vm-tile{padding:12px;background:rgba(234,237,241,.3);border-radius:16px;border:1px solid rgba(218,223,231,.4);display:flex;flex-direction:column;gap:2px}
.crm-vm-tile>span{font-size:10px;text-transform:uppercase;letter-spacing:.025em;color:var(--muted-fg)}
.crm-vm-line{display:flex;flex-wrap:wrap;gap:16px;font-size:14px}
.crm-vm-line>span{display:inline-flex;align-items:center;gap:6px}
.crm-vm-line svg.lucide{width:14px;height:14px;color:var(--muted-fg)}
.crm-vm-sep{opacity:.5;margin:6px 0}
.crm-vm-none{font-size:14px;font-style:italic;color:var(--muted-fg)}
.crm-vm-sub{display:flex;align-items:center;gap:6px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-top:2px}
.crm-vm-sub svg.lucide{width:12px;height:12px}
.crm-vm-sub.em{color:#10B981}.crm-vm-sub.blue{color:#3B82F6}
.crm-vm-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;background:rgba(234,237,241,.2);border-radius:10px;border:1px solid rgba(218,223,231,.3);font-size:14px}
.crm-vm-item>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.crm-vm-src{font-size:11px;color:var(--muted-fg);margin-top:1px}
.crm-chev{width:14px;height:14px;color:rgba(67,73,239,.6)}
.crm-gift{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:600;padding:1px 6px;border-radius:999px;background:rgba(245,158,11,.12);color:#D97706;border:1px solid rgba(245,158,11,.3);vertical-align:1px}
.crm-gift svg.lucide{width:10px;height:10px}
.crm-private{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:12px;background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(139,92,246,.06));border:1px dashed rgba(99,102,241,.4)}
.crm-private>svg.lucide{width:18px;height:18px;color:#6366F1;flex-shrink:0;margin-top:1px}
.crm-private div{display:flex;flex-direction:column;gap:2px;line-height:1.35}
.crm-private b{font-size:13px;color:#4338CA}
.crm-private span{font-size:12px;color:var(--muted-fg)}
.crm-vm-pay{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:rgba(234,237,241,.2);border-radius:10px;border:1px solid rgba(218,223,231,.4);font-size:14px}
.crm-vm-pay.trade{background:rgba(59,130,246,.05);border-color:rgba(59,130,246,.2)}
.crm-vm-pay.trade span.font-medium,.crm-vm-pay.trade b{color:#2563EB}
.crm-vm-sum{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;font-size:13px;border:1px solid}
.crm-vm-sum svg.lucide{width:16px;height:16px}
.crm-vm-sum span{flex:1}
.crm-vm-sum.ok{background:rgba(16,185,129,.05);border-color:rgba(16,185,129,.2);color:#059669}
.crm-vm-sum.warn{background:rgba(245,158,11,.06);border-color:rgba(245,158,11,.25);color:#D97706}
.crm-vm-sum b{color:var(--foreground)}
.crm-vm-ct{display:flex;align-items:center;gap:12px;padding:12px;background:rgba(234,237,241,.3);border-radius:16px;border:1px solid rgba(218,223,231,.4)}
.crm-vm-ctl{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted-fg);padding:0 2px}
.crm-vm-ctl span{display:flex;align-items:center;gap:8px}
.crm-vm-ctl svg.lucide{width:14px;height:14px}
.crm-vm-ctl small{font-size:11px}
.crm-vm-ctl .dim{opacity:.5}
.crm-vm-notes{padding:12px;background:rgba(234,237,241,.2);border-radius:10px;border:1px solid rgba(218,223,231,.6);font-size:12.5px;line-height:1.55;color:#475569;white-space:pre-wrap}
.crm-vm-notes b{color:var(--foreground);font-weight:600}
.crm-mark{background:rgba(99,102,241,.14);color:#4338CA;border-radius:4px;padding:0 3px;font-weight:600}
.crm-tl{display:flex;flex-direction:column;gap:0;position:relative;padding-left:4px}
.crm-tl-i{display:flex;gap:10px;position:relative;padding-bottom:12px}
.crm-tl-i::before{content:"";position:absolute;left:4px;top:12px;bottom:-2px;width:1px;background:var(--border)}
.crm-tl-i:last-child::before{display:none}
.crm-tl-dot{width:9px;height:9px;border-radius:50%;background:#A5B4FC;margin-top:6px;flex-shrink:0;box-shadow:0 0 0 3px rgba(99,102,241,.12)}
.crm-tl-i.esc .crm-tl-dot{background:#F59E0B;box-shadow:0 0 0 3px rgba(245,158,11,.15)}
.crm-tl-i.move .crm-tl-dot{background:#10B981;box-shadow:0 0 0 3px rgba(16,185,129,.15)}
.crm-tl-i.create .crm-tl-dot{background:#6366F1}

/* ---------------- Contatos ---------------- */
.crm-ct-page{height:100%;display:flex;flex-direction:column;gap:16px;padding:4px 4px 0;min-height:0}
.crm-ct-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.crm-ct-h2{font-size:24px;line-height:32px;font-weight:700;letter-spacing:-0.035em}
.crm-ct-btns{display:flex;flex-wrap:wrap;gap:8px}
.crm-ct-btns .btn-outline{background:#fff}
.crm-b-amber{border-color:rgba(245,158,11,.2)!important;color:#F59E0B}.crm-b-amber:hover{background:rgba(245,158,11,.1)!important}
.crm-b-em{border-color:rgba(16,185,129,.2)!important;color:#10B981}.crm-b-em:hover{background:rgba(16,185,129,.1)!important}
.crm-b-red{border-color:rgba(239,68,68,.2)!important;color:#EF4444}.crm-b-red:hover{background:rgba(239,68,68,.1)!important}
.crm-ct-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.crm-ct-filters .input-wrap{flex:1;max-width:384px}
.crm-ct-filters .input,.crm-ct-filters .select{background:rgba(234,237,241,.3);border-color:rgba(255,255,255,.05)}
.crm-ct-filters .select{width:180px}
.crm-ct-table{border-radius:10px;border:1px solid rgba(255,255,255,.05);background:rgba(0,0,0,.09);backdrop-filter:blur(4px);overflow-x:auto}
.crm-ct-table table{width:100%;min-width:700px}
.crm-ct-table thead tr{background:rgba(234,237,241,.3)}
.crm-ct-table th{height:40px;padding:0 10px;text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgba(100,116,139,.75);white-space:nowrap}
.crm-ct-table td{padding:12px 10px;vertical-align:middle;white-space:nowrap;font-size:14px}
.crm-ct-table tbody tr{border-top:1px solid rgba(255,255,255,.35);transition:background .15s}
.crm-ct-table tbody tr:hover{background:rgba(255,255,255,.12)}
.crm-ct-table tbody tr.crm-row-new{background:rgba(99,102,241,.08)}
.crm-ct-av{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,rgba(67,73,239,.2),rgba(67,73,239,.1));color:var(--primary);font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.1);flex-shrink:0}
.crm-ct-name{font-weight:500;color:rgba(15,23,42,.9)}
.crm-ct-st{display:inline-flex;align-items:center;gap:4px;border-radius:999px;font-size:12px;font-weight:500;padding:2px 8px;line-height:16px}
.crm-ct-st svg.lucide{width:12px;height:12px}
.crm-st-active{background:rgba(16,185,129,.15);color:#10B981}
.crm-st-esc{background:rgba(245,158,11,.15);color:#D97706}
.crm-st-assigned{background:rgba(59,130,246,.15);color:#3B82F6}
.crm-st-off{background:rgba(239,68,68,.15);color:#EF4444}
.crm-tag{display:inline-flex;align-items:center;gap:4px;border-radius:5px;background:rgba(234,237,241,.5);padding:2px 6px;font-size:10px;border:1px solid rgba(255,255,255,.05);margin-right:4px}
.crm-tag svg.lucide{width:10px;height:10px;opacity:.5}
.crm-ct-acts{display:flex;gap:4px;justify-content:flex-end}
.crm-ct-acts button{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted-fg);transition:all .15s}
.crm-ct-acts button svg.lucide{width:16px;height:16px}
.crm-ct-acts button:hover{background:rgba(255,255,255,.5);color:var(--foreground)}
.crm-ct-acts button.on{color:#10B981}
.crm-ct-pag{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px 0 90px}
.crm-ct-pag .btn{width:32px;height:32px;padding:0}

/* ---------------- responsivo ---------------- */
@media (max-width:1500px){
  .crm-kb.has-phone .crm-col{flex-basis:258px;min-width:258px}
  .crm-kb.has-phone .crm-stats .crm-stat:first-child{display:none}
}
@media (max-width:1400px){
  .crm-kb{gap:8px}
  .crm-phone-col{width:316px}
  .crm-kb-title{font-size:28px;line-height:34px}
  .crm-kb-head{gap:14px;margin-bottom:14px}
  .crm-col-h{padding:14px}
  .crm-card{padding:14px}
  .crm-kb.has-phone .crm-kb-acts .crm-btn-parc{display:none}
  .crm-kb.has-phone .crm-grip{display:none}
  .crm-kb.has-phone .crm-col-row{gap:7px}
}
@media (max-width:1280px){.crm-kb.has-phone .crm-stats{display:none}}
@media (max-height:820px){
  .crm-phone{border-radius:40px;padding:8px}
  .crm-phone-screen{border-radius:33px}
  .wa-status{height:32px}
  .crm-ph-label{height:24px;margin-bottom:6px}
}
@media (max-width:1023px){.crm-phone-col{display:none}.crm-trace{right:10px}}
@media (max-width:900px){.crm-stats{display:none}}
