.communication-panel{padding:24px;margin-bottom:20px}.communication-panel form{display:grid;gap:18px}.communication-panel .field{min-width:0}.communication-panel details .field{margin-top:16px}.communication-panel select,.communication-panel input,.communication-panel textarea{max-width:100%}.communication-panel fieldset{border:1px solid #e4e7ee;border-radius:12px;padding:16px;min-width:0}.communication-quotas{display:grid;gap:16px}.communication-tabs{display:flex;gap:10px;margin-bottom:22px;flex-wrap:wrap}.communication-inbox{display:grid;grid-template-columns:minmax(240px,32%) minmax(0,1fr);overflow:hidden;min-height:540px}.communication-inbox aside{padding:20px;border-right:1px solid #e4e7ee;min-width:0}.communication-contact{display:flex;flex-direction:column;gap:7px;width:100%;padding:15px 12px;text-align:left;background:#fff;border:0;border-bottom:1px solid #edf0f5;color:inherit;cursor:pointer;border-radius:8px;overflow:hidden}.communication-contact.selected{background:#eeeaff;color:#5432a9}.communication-contact small,.communication-contact span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.communication-thread{padding:24px;min-width:0}.communication-messages{max-height:560px;overflow:auto;display:flex;flex-direction:column;gap:12px;margin:20px 0}.communication-message{background:#f1f4f8;border-radius:12px;padding:12px 16px;max-width:90%;align-self:flex-start;overflow-wrap:anywhere}.communication-message.outbound{background:#e4f5ed;align-self:flex-end}.communication-message p,.communication-preview{white-space:pre-wrap;overflow-wrap:anywhere}.communication-message small{font-size:11px;color:#667085}.communication-pagination{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}.communication-panel .switch-row{gap:16px}.communication-thread form{display:grid;gap:12px}@media(max-width:700px){.communication-inbox{grid-template-columns:1fr}.communication-inbox aside{border-right:0;border-bottom:1px solid #e4e7ee;max-height:340px;overflow:auto}.communication-panel,.communication-thread{padding:16px}.communication-panel .form-grid{grid-template-columns:1fr}.communication-panel legend{white-space:normal}.communication-message{max-width:100%}}
.crm-inbox-shell{display:grid;grid-template-columns:320px minmax(0,1fr) 340px;min-height:680px;border:1px solid #e4e7ee;border-radius:14px;background:#fff;overflow:hidden}.crm-inbox-list{border-right:1px solid #e4e7ee;padding:16px;min-width:0}.crm-inbox-list-head,.crm-chat-header,.crm-context-head{display:flex;align-items:center;gap:10px}.crm-inbox-list-head{justify-content:space-between;margin-bottom:14px}.crm-inbox-filters{display:flex;gap:6px;overflow:auto;margin:12px 0}.crm-inbox-filters button,.crm-context-tabs span{border:0;background:#f4f7f8;border-radius:999px;padding:7px 10px;font-size:11px;white-space:nowrap;color:#60757d;cursor:pointer}.crm-inbox-filters button.selected,.crm-context-tabs span.selected{background:#dff4f0;color:#087d86}.crm-conversation-items{margin:0 -8px;max-height:590px;overflow:auto}.crm-conversation-item{display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;width:100%;padding:12px 8px;text-align:left;border:0;border-left:3px solid transparent;background:transparent;cursor:pointer;color:inherit}.crm-conversation-item:hover,.crm-conversation-item.selected{background:#f1faf8;border-left-color:#18aaa0}.crm-conversation-item>span:last-child{min-width:0;display:grid;gap:3px}.crm-conversation-item strong,.crm-conversation-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-conversation-item small{font-size:11px;color:#60757d}.crm-conversation-item em{font-style:normal;font-size:10px;color:#8a9aa0}.crm-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#dff4f0;color:#087d86;font-size:11px;font-weight:700;flex:0 0 36px}.crm-inbox-chat{display:flex;flex-direction:column;min-width:0;background:#fbfdfd}.crm-chat-header{padding:16px;border-bottom:1px solid #e4e7ee;background:#fff}.crm-chat-header>div{min-width:0;display:grid;gap:3px;flex:1}.crm-chat-header small{color:#6e8086;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-chat-header .status-badge{margin-left:auto}.crm-chat-messages{flex:1;overflow:auto;padding:22px;display:flex;flex-direction:column;gap:10px}.crm-chat-composer{display:flex;gap:10px;padding:14px;border-top:1px solid #e4e7ee;background:#fff}.crm-chat-composer textarea{flex:1;resize:vertical}.crm-inbox-context{border-left:1px solid #e4e7ee;padding:18px;min-width:0;overflow:auto}.crm-context-head{flex-direction:column;align-items:flex-start;padding-bottom:16px}.crm-context-head h2{margin:0;font-size:18px}.crm-context-head small{color:#6e8086}.crm-context-tabs{display:flex;gap:6px;margin-bottom:18px}.crm-contact-data{display:grid;grid-template-columns:90px 1fr;gap:9px 12px;font-size:12px}.crm-contact-data dt{color:#839197}.crm-contact-data dd{margin:0;overflow-wrap:anywhere}.crm-context-section{border-top:1px solid #edf0f2;padding:15px 0;font-size:12px}.crm-context-section strong{display:block;margin-bottom:9px}.crm-context-section p{margin:7px 0;color:#60757d}.crm-context-section select{width:100%;min-height:38px}.crm-inbox-empty{margin:auto;text-align:center;padding:30px;color:#687d83}.crm-skeleton{height:70px;border-radius:8px;background:linear-gradient(90deg,#f2f5f5,#fbfdfd,#f2f5f5);margin:5px 0}.crm-empty-copy{padding:18px}@media(max-width:1100px){.crm-inbox-shell{grid-template-columns:280px minmax(0,1fr)}.crm-inbox-context{display:none}}@media(max-width:700px){.crm-inbox-shell{grid-template-columns:1fr;min-height:620px}.crm-inbox-list{border-right:0;border-bottom:1px solid #e4e7ee;max-height:300px}.crm-inbox-chat{min-height:500px}.crm-inbox-context{display:block;border-left:0;border-top:1px solid #e4e7ee}.crm-chat-composer{flex-direction:column}}
/* Fase 3 · Pipeline comercial */
.pipeline-toolbar{display:flex;gap:10px;align-items:center;margin:18px 0;flex-wrap:wrap}.pipeline-toolbar select{min-width:190px}.pipeline-toolbar .search-field{flex:1;min-width:240px}.pipeline-board{display:flex;gap:14px;overflow-x:auto;align-items:flex-start;padding-bottom:18px}.pipeline-column{background:#f5f8f8;border:1px solid #e5eeee;border-radius:16px;min-width:260px;width:280px;flex:1;max-width:360px}.pipeline-column>header{position:sticky;top:0;z-index:2;background:#f5f8f8;border-radius:16px 16px 0 0;padding:14px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e5eeee}.pipeline-stage-title{font-weight:700;display:flex;gap:7px;align-items:center}.pipeline-stage-title i{width:8px;height:8px;border-radius:99px;display:inline-block}.pipeline-column header small{display:block;color:#71858a;font-size:12px;margin-top:4px}.pipeline-column-body{padding:10px;min-height:115px}.pipeline-column.drag-over{outline:2px dashed #55c7b4;outline-offset:3px}.pipeline-card{background:#fff;border:1px solid #e3eded;border-radius:12px;padding:12px;margin-bottom:10px;box-shadow:0 3px 10px #173e4210;cursor:grab}.pipeline-card:active{cursor:grabbing}.pipeline-card strong,.pipeline-card small{display:block}.pipeline-card strong{margin:8px 0 4px}.pipeline-card small{color:#71858a}.pipeline-card-top,.pipeline-card-foot{display:flex;justify-content:space-between;gap:8px;align-items:center}.pipeline-card-foot{margin-top:12px;font-size:12px}.pipeline-dot{width:8px;height:8px;border-radius:99px}.pipeline-task{display:flex;gap:3px;align-items:center;color:#64777b;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pipeline-task .icon{width:13px}.pipeline-task.overdue,.pipeline-no-task{color:#c15e5e}.pipeline-column-empty{text-align:center;color:#91a1a4;padding:25px 8px;font-size:13px}.pipeline-list{overflow:auto}.pipeline-list table{min-width:850px}.pipeline-list td,.pipeline-list th{white-space:nowrap}.table-link{background:none;border:0;color:#147e79;font-weight:700;cursor:pointer;padding:0}.pipeline-empty{text-align:center;padding:72px 20px}.pipeline-empty>.icon{width:42px;height:42px;color:#67cbb9}.pipeline-empty h2{margin:16px 0 5px}.pipeline-drawer{position:fixed;right:0;top:0;bottom:0;width:min(430px,100vw);background:#fff;z-index:30;box-shadow:-12px 0 35px #14373d20;padding:25px;overflow:auto}.pipeline-drawer-head{display:flex;justify-content:space-between;gap:15px}.pipeline-drawer-head h2{margin:8px 0 2px}.pipeline-drawer-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}.pipeline-drawer-grid div{background:#f5f8f8;border-radius:10px;padding:12px}.pipeline-drawer-grid span{display:block;color:#7b8b8f;font-size:12px}.pipeline-drawer-grid strong{display:block;margin-top:5px}.pipeline-drawer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.pipeline-drawer h3{font-size:14px;margin:20px 0 10px}.pipeline-timeline>div{display:flex;gap:10px}.pipeline-timeline i{width:7px;height:7px;border-radius:99px;background:#67cbb9;margin:6px 0 0 3px;flex:0 0 auto}.pipeline-timeline p{margin:0 0 13px}.pipeline-timeline strong,.pipeline-timeline small{display:block}.pipeline-timeline small{color:#7b8b8f;font-size:11px;margin-top:3px}.pipeline-task-row{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1f1}.pipeline-task-row .btn{padding:5px 8px;font-size:12px}@media(max-width:760px){.pipeline-board{padding-left:2px}.pipeline-column{min-width:270px}.pipeline-drawer{width:100%}}
.productivity-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;grid-column:1/-1;width:100%}.productivity-tools select{padding:6px;border:1px solid #ccd9d7;border-radius:8px}.crm-chat-composer{flex-wrap:wrap}.productivity-suggestions{width:100%;max-height:180px;overflow:auto;border:1px solid #dae5e3;border-radius:8px;background:white}.productivity-suggestions button{display:block;width:100%;padding:9px;text-align:left;border:0;background:white}.productivity-suggestions button[aria-selected=true]{background:#def4ed}.internal-notes{max-height:180px;overflow:auto}.internal-note{background:#fff8de;border-left:3px solid #d9b64d;padding:10px;margin:8px;border-radius:8px}.internal-note p{white-space:pre-wrap}.internal-note small{color:#736b56}.note-composer{background:#fff8de}

/* CRM 360° · bandeja visual WhatsApp 1.57 */
.crm-inbox-shell{grid-template-columns:340px minmax(0,1fr) 350px;height:clamp(560px,calc(100dvh - 235px),820px);min-height:560px;border:1px solid #d9e2e7;border-radius:16px;background:#fff;box-shadow:0 12px 32px #143b4914;overflow:hidden}
.crm-inbox-list{display:flex;flex-direction:column;padding:0;border-right:1px solid #dfe7eb;background:#fff;min-height:0;overflow:hidden}
.crm-inbox-list-head{flex:0 0 auto;min-height:70px;padding:17px 20px 13px;margin:0;border-bottom:1px solid #e8eef1}.crm-inbox-list-head strong{font-size:20px;color:#152a35}.crm-inbox-list-head .badge{min-width:28px;padding:5px 9px;border-radius:999px;font-size:11px}
.crm-inbox-list>.search-field{flex:0 0 auto;margin:14px 16px 8px;width:auto;min-height:42px;border:1px solid #dbe5e9;border-radius:10px;background:#f8fafb}.crm-inbox-list>.search-field input{font-size:12px}
.crm-inbox-filters{flex:0 0 auto;padding:0 16px 12px;margin:0;gap:6px;overflow-x:auto;scrollbar-width:none}.crm-inbox-filters::-webkit-scrollbar{display:none}.crm-inbox-filters button{padding:8px 12px;border:1px solid transparent;background:#f4f7f8;font-size:11px}.crm-inbox-filters button.selected{background:#23b35c;color:#fff;border-color:#23b35c;box-shadow:0 3px 8px #23b35c2e}
.crm-conversation-items{flex:1;min-height:0;max-height:none;margin:0;overflow-y:auto;overflow-x:hidden;border-top:1px solid #edf1f3;scrollbar-width:thin;scrollbar-color:#c7d6da transparent}.crm-conversation-items::-webkit-scrollbar{width:7px}.crm-conversation-items::-webkit-scrollbar-thumb{background:#c7d6da;border-radius:8px}
.crm-conversation-item{grid-template-columns:48px minmax(0,1fr);gap:11px;padding:13px 16px;border-left:4px solid transparent;border-bottom:1px solid #edf2f3;min-height:76px}.crm-conversation-item:hover{background:#f6fbfa}.crm-conversation-item.selected{background:#e7f7f1;border-left-color:#16b477}.crm-conversation-item>span:last-child{gap:4px}.crm-conversation-item strong{font-size:13px;color:#142934}.crm-conversation-item small{font-size:11px;color:#60747d}.crm-conversation-item em{font-size:10px;color:#84969e}.crm-avatar{width:44px;height:44px;flex-basis:44px;background:#e1f4ef;color:#087e76;font-size:13px}
.crm-inbox-chat{height:100%;min-height:0;background:#efeae2;background-image:radial-gradient(#ffffff42 1px,transparent 1px),radial-gradient(#d8cfc533 1px,transparent 1px);background-position:0 0,14px 14px;background-size:28px 28px}
.crm-chat-header{flex:0 0 72px;min-height:72px;padding:12px 18px;border-bottom:1px solid #dce5e8;background:#fff}.crm-chat-header .crm-avatar{width:46px;height:46px;flex-basis:46px;font-size:14px}.crm-chat-header>div{gap:2px}.crm-chat-header strong{font-size:15px;color:#172b37}.crm-chat-header small{font-size:11px;color:#71828a}.crm-chat-header .status-badge{padding:6px 11px;border-radius:999px;background:#e4f7eb;color:#147743;font-size:10px;border:1px solid #c8ecd7}
.crm-chat-messages{min-height:0;padding:26px clamp(18px,4vw,48px);gap:9px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#bdc9c5 transparent}.crm-chat-messages::-webkit-scrollbar{width:8px}.crm-chat-messages::-webkit-scrollbar-thumb{background:#bdc9c5;border-radius:8px}.communication-message{max-width:min(74%,620px);padding:10px 13px;border:1px solid #e0e4e1;border-radius:9px;background:#fff;box-shadow:0 1px 2px #233b3314;color:#1b2f36}.communication-message.outbound{background:#d8ffc9;border-color:#c0edb0;align-self:flex-end}.communication-message p{font-size:13px;line-height:1.45}.communication-message small{display:block;margin-top:5px;font-size:10px;color:#78877f;text-align:right}.crm-chat-composer{flex:0 0 auto;align-items:center;min-height:70px;padding:12px 18px;border-top:1px solid #dce5e0;background:#f7faf9}.crm-chat-composer textarea{height:44px;min-height:44px;max-height:120px;resize:vertical;padding:12px 17px;border:1px solid #d7e0e1;border-radius:24px;background:#fff;font-size:13px}.crm-chat-composer .btn{min-height:44px;border-radius:22px;padding:11px 18px}
.crm-inbox-context{height:100%;padding:0;background:#fff;border-left:1px solid #dfe7eb;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c7d6da transparent}.crm-context-head{display:grid;grid-template-columns:56px minmax(0,1fr);grid-template-rows:auto auto;column-gap:13px;align-items:center;padding:20px 20px 16px;border-bottom:1px solid #e8eef0}.crm-context-head .crm-avatar{grid-row:1 / span 2;width:56px;height:56px;flex-basis:56px;font-size:16px}.crm-context-head h2{font-size:17px;color:#142b37;line-height:1.2}.crm-context-head small{font-size:11px;color:#71828b;line-height:1.4}.crm-context-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0;padding:0 12px;border-bottom:1px solid #e5ecee}.crm-context-tabs span{padding:13px 6px 11px;border-radius:0;background:transparent;text-align:center;font-size:11px}.crm-context-tabs span.selected{background:transparent;color:#058c6a;border-bottom:3px solid #058c6a;font-weight:700}
.crm-contact-data{margin:14px 16px;padding:15px 13px;grid-template-columns:75px 1fr;gap:9px 10px;border:1px solid #e3eaec;border-radius:12px;background:#fbfcfc;font-size:11px}.crm-contact-data dt{color:#7a8a91}.crm-contact-data dd{color:#263b43}.crm-context-section{margin:0 16px 10px;padding:14px;border:1px solid #e3eaec;border-radius:12px;background:#fff;font-size:11px;box-shadow:0 2px 7px #143b4908}.crm-context-section strong{font-size:12px;color:#1d333d}.crm-context-section select{min-height:36px;border:1px solid #d8e2e5;border-radius:8px;background:#fff;font-size:11px}.crm-context-actions{display:flex;gap:8px;margin:0 16px 10px}.crm-context-actions .btn{flex:1;min-height:36px;padding:8px 10px;font-size:10px;border-radius:9px}.crm-inbox-empty{min-height:100%;display:grid;place-content:center;text-align:center;padding:30px;color:#687d83}.crm-inbox-empty .empty-art{margin:auto}
@media(max-width:1200px){.crm-inbox-shell{grid-template-columns:300px minmax(0,1fr) 315px}.crm-inbox-list-head strong{font-size:18px}}
@media(max-width:1050px){.crm-inbox-shell{grid-template-columns:300px minmax(0,1fr)}.crm-inbox-context{display:none}}
@media(max-width:760px){.crm-inbox-shell{height:auto;min-height:0;grid-template-columns:1fr;border-radius:12px}.crm-inbox-list{height:310px;min-height:310px;border-right:0;border-bottom:1px solid #dfe7eb}.crm-conversation-items{max-height:none}.crm-inbox-chat{height:620px;min-height:620px}.crm-chat-messages{padding:20px 14px}.communication-message{max-width:88%}.crm-chat-composer{align-items:stretch;flex-direction:column}.crm-chat-composer .btn{width:100%}.crm-inbox-context{display:block;height:auto;border-left:0;border-top:1px solid #dfe7eb}.crm-context-section{margin-left:12px;margin-right:12px}}

/* CRM 360° full-height conversation mode 1.58 */
.crm-topbar-title{display:flex;flex-direction:column;justify-content:center;gap:1px;margin-left:18px;padding-left:18px;border-left:1px solid #d5e1e4;line-height:1.2;white-space:nowrap}.crm-topbar-title span{font-size:9px;letter-spacing:1.3px;text-transform:uppercase;color:#087e76;font-weight:700}.crm-topbar-title strong{font-size:13px;color:#243b45;font-weight:650}
.crm-inbox-list-head{align-items:center}.crm-inbox-list-tools{display:flex;align-items:center;gap:8px}.crm-inbox-refresh{width:31px;height:31px;padding:0;color:#56747b}.crm-inbox-refresh:hover{color:#087e76;background:#e9f7f2}.crm-inbox-refresh .icon{width:16px;height:16px}
.crm-inbox-shell{height:clamp(560px,calc(100dvh - 195px),820px);margin-top:-8px}
.crm-inbox-chat{background-color:#efeae2;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23c4bdb5' stroke-width='1.25' opacity='.32'%3E%3Cpath d='M18 28c0-7 6-12 13-12h24c7 0 13 5 13 12v15c0 7-6 12-13 12H40l-9 8v-8h0c-7 0-13-5-13-12z'/%3E%3Cpath d='M111 18l4 8 9 1-7 6 2 9-8-5-8 5 2-9-7-6 9-1z'/%3E%3Ccircle cx='128' cy='92' r='16'/%3E%3Cpath d='M118 92h20M128 82v20M30 121c0-9 7-16 16-16s16 7 16 16v13H30zM39 96h14'/%3E%3Cpath d='M103 135c0-8 6-14 14-14h28c8 0 14 6 14 14v13h-9l-8 8v-8h-25c-8 0-14-6-14-14z'/%3E%3Cpath d='M17 159l9-9 9 9-9 9z'/%3E%3C/g%3E%3C/svg%3E");background-size:180px 180px}
@media(max-width:760px){.crm-topbar-title{display:none}.crm-inbox-shell{height:auto;margin-top:0}}
