/* ==========================================================
   MANITAS CHAT UI — estilo compacto tipo WhatsApp
   ========================================================== */

.mch-wrap{
  max-width:1100px;
  margin:10px auto;
  padding:8px;
  color:#172033;
  font-family:var(--manitas-font);
}

.mch-card{
  background:#ffffff;
  border:1px solid rgba(148,163,184,.20);
  border-radius:16px;
  box-shadow:0 12px 32px rgba(0,0,0,.42);
  overflow:hidden;
}

.mch-head{
  padding:12px;
  border-bottom:1px solid rgba(148,163,184,.18);
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.mch-title{
  margin:0;
  font-size:15px;
  font-weight:900;
}

.mch-sub{
  margin:3px 0 0;
  color:#64748b;
  font-size:12px;
}

.mch-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  padding:10px;
}

@media(max-width:980px){
  .mch-layout{
    grid-template-columns:1fr;
    padding:8px;
  }
}

/* Botones */
.mch-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:9px 11px;
  border-radius:12px;
  text-decoration:none;
  border:1px solid rgba(148,163,184,.20);
  background:#ffffff;
  color:#172033;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
}

.mch-btn.primary{
  border:0;
  background:#00a884;
  color:#061417;
}

.mch-btn.blue{
  border:0;
  background:rgba(59,130,246,.95);
  color:#fff;
}

.mch-btn.red{
  border:0;
  background:rgba(239,68,68,.95);
  color:#fff;
}

/* Tabs */
.mch-tabs{
  display:none;
  gap:8px;
  padding:8px;
  border-bottom:1px solid rgba(148,163,184,.15);
}

.mch-tab{
  flex:1;
  text-align:center;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.20);
  background:#f8fafc;
  font-weight:900;
  cursor:pointer;
}

.mch-tab.is-active{
  border:0;
  background:#00a884;
  color:#061417;
}

@media(max-width:980px){
  .mch-tabs{display:flex;}
  .mch-pane{display:none;}
  .mch-pane.is-active{display:block;}
}

/* Cajas */
.mch-box{
  border:1px solid rgba(148,163,184,.18);
  background:#ffffff;
  border-radius:16px;
  padding:10px;
}

.mch-chatbox{
  position:relative;
  display:flex;
  flex-direction:column;
  height:clamp(420px,62vh,680px);
  min-height:420px;
  padding:0;
  overflow:hidden;
}

/* Área de mensajes */
.mch-msgs{
  flex:1 1 auto;
  overflow:auto;
  padding:10px 10px 70px;
  scroll-behavior:smooth;
  background:
    radial-gradient(circle at top left, rgba(128,195,66,.05), transparent 30%),
    #f8fafc;
}

/* Burbuja base */
.mch-msg{
  max-width:78%;
  width:fit-content;
  margin:5px 0;
  padding:7px 10px;
  border:0;
  color:#172033;
  line-height:1.28;
  font-size:14px;
  font-weight:400;
  box-shadow:0 1px 2px rgba(0,0,0,.25);
}

/* Mensaje propio */
.mch-msg.me{
  margin-left:auto;
  margin-right:0;
  background:#e7f5dc !important;
  color:#172033 !important;
  border-radius:12px 12px 3px 12px;
}

/* Mensaje del cliente */
.mch-msg.from-client{
  margin-right:auto;
  margin-left:0;
  background:#ffffff !important;
  color:#172033 !important;
  border-left:3px solid #facc15;
  border-radius:12px 12px 12px 3px;
}

/* Mensaje del técnico */
.mch-msg.from-tech{
  margin-right:auto;
  margin-left:0;
  background:#ffffff !important;
  color:#172033 !important;
  border-left:3px solid #80c342;
  border-radius:12px 12px 12px 3px;
}

/* Otro mensaje recibido */
.mch-msg.from-other{
  margin-right:auto;
  margin-left:0;
  background:#f8fafc !important;
  color:#172033 !important;
  border-radius:12px 12px 12px 3px;
}

/* Sistema */
.mch-msg.system{
  max-width:82%;
  margin:8px auto;
  padding:5px 10px;
  text-align:center;
  border-radius:999px;
  background:rgba(134,150,160,.20) !important;
  color:#475569 !important;
  font-size:12px;
  font-weight:500;
  box-shadow:none;
}

/* Oferta / informe destacado */
.mch-msg.system.is-offer{
  max-width:88%;
  margin:8px auto;
  padding:10px;
  text-align:left;
  border-radius:12px;
  background:#ffffff !important;
  border-left:4px solid #80c342 !important;
  color:#172033 !important;
  font-size:13px;
  font-weight:600 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.25);
}

.mch-msg.system.is-offer .mch-meta,
.mch-msg.system.is-offer .mch-text{
  color:#172033 !important;
}

/* Meta y texto */
.mch-meta{
  font-size:12px;
  margin-bottom:3px;
  line-height:1.1;
}

.mch-msg.me .mch-meta{
  color:#3f6212 !important;
  font-weight:700;
}

.mch-msg.from-client .mch-meta{
  color:#facc15 !important;
  font-weight:700;
}

.mch-msg.from-tech .mch-meta{
  color:#80c342 !important;
  font-weight:700;
}

.mch-msg.from-other .mch-meta{
  color:rgba(233,237,239,.65) !important;
  font-weight:700;
}

.mch-msg.system .mch-meta{
  color:rgba(233,237,239,.60) !important;
}

.mch-text{
  white-space:pre-wrap;
  word-break:break-word;
  font-size:14px;
  line-height:1.28;
}

/* Caja de escritura */
.mch-compose{
  position:sticky;
  bottom:0;
  display:flex;
  align-items:flex-end;
  gap:7px;
  padding:7px 10px 10px;
  background:#ffffff;
  border-top:0;
}

.mch-compose textarea{
  width:100%;
  padding:10px 12px;
  border-radius:20px;
  border:0;
  background:#f8fafc;
  color:#172033;
  outline:none;
  font-weight:400;
  font-size:14px;
  min-height:44px;
  max-height:96px;
  resize:none;
}

.mch-compose textarea:focus{
  box-shadow:0 0 0 1px rgba(0,168,132,.55);
}


.mch-tools{position:relative;display:flex;gap:7px;align-items:center;padding:8px 10px 6px;background:#fff;border-top:1px solid rgba(148,163,184,.16)}
.mch-tool{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;border-radius:12px;border:1px solid #dbe3ec;background:#fff!important;color:#475569!important;cursor:pointer;font-size:19px;box-shadow:none!important}
.mch-tool:hover,.mch-tool:focus-visible{background:#f8fafc!important;border-color:#b8c4d1;outline:none}
.mch-quick{position:absolute;left:10px;right:10px;bottom:54px;z-index:55;width:calc(100% - 20px);padding:11px 12px;border-radius:12px;border:1px solid #dbe3ec;background:#fff;color:#172033;box-shadow:0 12px 30px rgba(15,23,42,.16)}
.mch-quick[hidden]{display:none!important}
/* Selector de emojis RC50 — UX inspirada en mensajería móvil moderna */
.mch-emoji-panel{
  position:absolute;left:10px;bottom:54px;z-index:60;
  width:min(390px,calc(100vw - 28px));height:min(326px,48vh);max-height:326px;
  padding:0;border-radius:18px;border:1px solid #dbe3ec;background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.20);overflow:hidden;overscroll-behavior:contain;
}
.mch-emoji-panel[hidden]{display:none!important}
.mch-emoji-panel:not([hidden]){display:flex;flex-direction:column}
.mch-emoji-tabs{display:grid;grid-template-columns:repeat(6,1fr);gap:2px;align-items:center;flex:0 0 auto;padding:6px 8px 5px;border-bottom:1px solid #edf1f4;background:#fbfcfd}
.mch-emoji-tab{position:relative;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;box-shadow:none!important;font-size:23px!important;line-height:1!important;cursor:pointer;filter:none!important}
.mch-emoji-tab:hover,.mch-emoji-tab:focus-visible{background:#eef3f5!important;outline:none!important}
.mch-emoji-tab.is-active{background:#eaf7df!important}
.mch-emoji-tab.is-active::after{content:"";position:absolute;left:24%;right:24%;bottom:1px;height:3px;border-radius:999px;background:#80c342}
.mch-emoji-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:8px 8px 10px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.mch-emoji-grid{display:grid;grid-template-columns:repeat(7,minmax(40px,1fr));gap:3px;align-content:start}
.mch-emoji-grid[hidden]{display:none!important}
.mch-emoji-grid button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:40px!important;height:44px!important;min-height:44px!important;padding:0!important;border:0!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;font-size:30px!important;line-height:1!important;cursor:pointer;filter:none!important;transition:background .12s ease,transform .08s ease;touch-action:manipulation}
.mch-emoji-grid button:hover,.mch-emoji-grid button:focus-visible{background:#f1f5f9!important;outline:none!important}
.mch-emoji-grid button:active{transform:scale(.90)}
.mch-emoji-recent-grid:empty::before{content:"Tus emojis usados recientemente aparecerán aquí";grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:150px;padding:18px;text-align:center;color:#7b8794;font-size:13px;line-height:1.45}
#btn_emoji{font-size:24px!important}
@media(max-width:520px){
  .mch-tools{flex-wrap:wrap}.mch-quick{flex:1;min-width:150px}
  .mch-emoji-panel{left:6px;right:6px;bottom:52px;width:auto;height:min(318px,46vh);max-height:318px;border-radius:18px}
  .mch-emoji-tabs{padding-left:6px;padding-right:6px}
  .mch-emoji-grid{grid-template-columns:repeat(7,minmax(38px,1fr));gap:2px}
  .mch-emoji-grid button{min-width:38px!important;height:43px!important;min-height:43px!important;font-size:30px!important}
}
@media(max-width:359px){
  .mch-emoji-grid{grid-template-columns:repeat(6,minmax(40px,1fr))}
}
.mch-tool[aria-expanded="true"]{border-color:#64748b;background:#f8fafc;color:#172033}
.mch-file-preview{margin:6px 10px 0;padding:8px 10px;border-radius:10px;background:#eef9e8;color:#35521f;font-size:12px;font-weight:700}
.mch-attachment{margin-top:7px;padding:8px;border-radius:10px;background:rgba(0,92,103,.07);border:1px solid rgba(0,92,103,.14)}
.mch-attachment img{display:block;max-width:260px;max-height:220px;border-radius:10px;margin-bottom:5px}
.mch-attachment a{color:#005C67;font-weight:800;text-decoration:none}
@media(max-width:520px){.mch-tools{flex-wrap:wrap}.mch-quick{flex:1;min-width:150px}.mch-emoji-panel{left:8px;right:8px;width:auto;max-height:176px;grid-template-columns:repeat(7,minmax(30px,1fr));bottom:50px}}

.mch-empty{height:100%;min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;color:#64748b}
.mch-empty-icon{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eef7e8;color:#5f9e25;font-size:27px;margin-bottom:12px}
.mch-empty strong{display:block;color:#172033;font-size:15px;margin-bottom:5px}
.mch-empty span{max-width:270px;font-size:13px;line-height:1.5}
.mch-chatbox.is-disabled .mch-tools,.mch-chatbox.is-disabled .mch-compose{opacity:.55;pointer-events:none}
.mch-compose .mch-btn.primary{height:44px;min-width:82px;border-radius:13px;background:#5f9e25!important;color:#fff!important;padding:0 15px}
.mch-alert:empty{display:none}
.mch-alert.mch-bad{color:#b42318;background:#fff5f4;border:1px solid #ffd5d2;border-radius:10px;padding:9px 10px!important;margin:0 10px 10px!important}
.mch-alert.mch-good{color:#356b1f}
/* Formulario de acuerdo */
.mch-section-title{
  margin:0 0 10px;
  font-size:14px;
  font-weight:900;
}

.mch-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

@media(max-width:520px){
  .mch-form{grid-template-columns:1fr;}
}

.mch-l{
  font-size:12px;
  color:#64748b;
  margin:0 0 6px;
}

.mch-inp,
.mch-sel{
  width:100%;
  padding:11px;
  border-radius:14px;
  border:1px solid #dbe3ec;
  background:#ffffff;
  color:#172033;
  outline:none;
  font-weight:600;
}

.mch-inp:focus,
.mch-sel:focus{
  border-color:rgba(0,168,132,.65);
}

/* Utilidades */
.mch-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:8px;
}

.mch-pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.18);
  background:#f8fafc;
  font-weight:800;
  font-size:12px;
}

.mch-alert{
  font-size:12px;
  color:#64748b;
  margin-top:8px;
}

.mch-bad{color:#fecaca;}
.mch-good{color:#bbf7d0;}

/* Celular */
@media(max-width:520px){
  .mch-wrap{
    margin:6px auto;
    padding:6px;
  }

  .mch-head{
    padding:10px;
  }

  .mch-title{
    font-size:14px;
  }

  .mch-chatbox{
    height:calc(100dvh - 330px);
    min-height:360px;
    max-height:610px;
  }
  .mch-msgs{padding-bottom:24px}
  .mch-tool{width:38px;height:38px;flex-basis:38px}
  .mch-compose .mch-btn.primary{min-width:76px;padding:0 13px}

  .mch-msg{
    max-width:82%;
    font-size:13.5px;
    padding:6px 9px;
  }

  .mch-text{
    font-size:13.5px;
  }

  .mch-meta{
    font-size:12px;
  }

  .mch-tab{
    padding:9px;
    font-size:14px;
  }
  .mch-form > div{
  min-width:0;
}

.mch-inp,
.mch-sel{
  box-sizing:border-box;
  min-width:0;
}
}

@media(max-width:760px){
  .mch-form{
    grid-template-columns:1fr !important;
  }

}

/* ==========================================================
   RC51 — CHAT CLARO TIPO MENSAJERÍA + IDENTIDAD MANITAS
   Capa específica del chat. No modifica el layout global.
   ========================================================== */
body.manitas-app .mch-sr-only{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}
body.manitas-app .mch-wrap{max-width:1040px!important}
body.manitas-app .mch-card{
  padding:0!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #dde5e7!important;
  border-radius:22px!important;
  box-shadow:0 12px 34px rgba(15,43,50,.08)!important;
}
body.manitas-app .mch-head{
  padding:13px 16px!important;
  background:#fff!important;
  border-bottom:1px solid #e6ecee!important;
  border-radius:0!important;
}
body.manitas-app .mch-head .mch-title{font-size:17px!important;color:#12343a!important}
body.manitas-app .mch-head .mch-sub{color:#718188!important;font-size:12px!important}
body.manitas-app .mch-head .mch-row{margin:0!important;gap:6px!important}
body.manitas-app .mch-head .mch-btn{
  min-height:40px!important;padding:8px 11px!important;border-radius:12px!important;
  border:1px solid #dce5e7!important;background:#fff!important;color:#005c67!important;box-shadow:none!important;
}

body.manitas-app .mch-tabs{
  display:flex!important;width:100%!important;max-width:none!important;margin:0!important;padding:6px 8px!important;
  gap:4px!important;background:#f8faf9!important;border-bottom:1px solid #e5eceb!important;
}
body.manitas-app .mch-tab{
  min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;
  padding:8px 12px!important;border:0!important;border-radius:12px!important;background:transparent!important;
  color:#607078!important;font-size:13px!important;font-weight:800!important;box-shadow:none!important;
}
body.manitas-app .mch-tab.is-active{
  background:#eaf7df!important;color:#005c67!important;box-shadow:inset 0 0 0 1px #cfe8bf!important;
}
body.manitas-app .mch-layout{padding:0!important;gap:0!important;background:#fff!important}
body.manitas-app .mch-pane{min-width:0!important}
body.manitas-app .mch-box.mch-chatbox{
  padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;
  height:clamp(500px,68vh,740px)!important;min-height:500px!important;overflow:hidden!important;
}

/* Cabecera de conversación */
body.manitas-app .mch-conversation-head{
  flex:0 0 auto;display:grid!important;grid-template-columns:40px 46px minmax(0,1fr) 40px!important;
  align-items:center!important;gap:8px!important;min-height:64px!important;padding:8px 10px!important;
  background:rgba(255,255,255,.98)!important;border-bottom:1px solid #e4ebed!important;
  box-shadow:0 2px 9px rgba(15,43,50,.035)!important;z-index:5!important;
}
body.manitas-app .mch-conversation-back,
body.manitas-app .mch-secure-mark{
  width:40px!important;height:40px!important;display:grid!important;place-items:center!important;border-radius:50%!important;
  color:#005c67!important;background:transparent!important;text-decoration:none!important;border:0!important;box-shadow:none!important;
}
body.manitas-app .mch-conversation-back:hover,
body.manitas-app .mch-secure-mark:hover{background:#eef7f4!important}
body.manitas-app .mch-conversation-back svg,
body.manitas-app .mch-secure-mark svg{width:23px!important;height:23px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.manitas-app .mch-peer-avatar{
  width:46px!important;height:46px!important;border-radius:50%!important;overflow:hidden!important;display:grid!important;place-items:center!important;
  background:linear-gradient(135deg,#80c342,#00a1b0)!important;color:#fff!important;font-size:18px!important;font-weight:900!important;
  border:1px solid #d8e6de!important;
}
body.manitas-app .mch-peer-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
body.manitas-app .mch-peer-avatar span{color:#fff!important}
body.manitas-app .mch-peer-copy{display:grid!important;min-width:0!important;gap:2px!important}
body.manitas-app .mch-peer-copy strong{
  color:#17272c!important;font-size:15px!important;line-height:1.15!important;font-weight:900!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.manitas-app .mch-peer-copy span{
  color:#6f7f85!important;font-size:11.5px!important;line-height:1.2!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.manitas-app .mch-secure-mark{color:#5f9e25!important}

/* Fondo claro, sutil y propio de Manitas */
body.manitas-app .mch-msgs{
  flex:1 1 auto!important;min-height:0!important;padding:12px 12px 18px!important;overflow-y:auto!important;overflow-x:hidden!important;
  background-color:#f4f7f2!important;
  background-image:
    radial-gradient(circle at 12px 12px,rgba(0,92,103,.045) 1px,transparent 1.2px),
    radial-gradient(circle at 32px 30px,rgba(128,195,66,.04) 1px,transparent 1.2px)!important;
  background-size:44px 44px!important;overscroll-behavior:contain!important;
}
body.manitas-app .mch-day-separator{display:flex!important;justify-content:center!important;clear:both!important;margin:10px 0!important}
body.manitas-app .mch-day-separator span{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:27px!important;padding:5px 10px!important;
  border:1px solid #e1e8e6!important;border-radius:999px!important;background:rgba(255,255,255,.92)!important;color:#68777c!important;
  font-size:11px!important;font-weight:800!important;box-shadow:0 1px 3px rgba(15,43,50,.04)!important;
}

/* Burbujas */
body.manitas-app .mch-msg{
  position:relative!important;max-width:min(78%,620px)!important;width:fit-content!important;margin:3px 0!important;
  padding:7px 9px 5px!important;border:1px solid #e3e9e7!important;border-radius:12px!important;
  color:#17272c!important;background:#fff!important;font-size:14px!important;line-height:1.38!important;font-weight:400!important;
  box-shadow:0 1px 2px rgba(15,43,50,.08)!important;overflow:visible!important;
}
body.manitas-app .mch-msg.me{
  margin-left:auto!important;margin-right:0!important;background:#e4f4d8!important;border-color:#d2e8c2!important;
  border-radius:12px 12px 4px 12px!important;color:#17272c!important;
}
body.manitas-app .mch-msg.from-client,
body.manitas-app .mch-msg.from-tech,
body.manitas-app .mch-msg.from-other{
  margin-left:0!important;margin-right:auto!important;background:#fff!important;border:1px solid #e3e9e7!important;
  border-radius:12px 12px 12px 4px!important;color:#17272c!important;
}
body.manitas-app .mch-author{
  margin:0 0 2px!important;color:#087985!important;font-size:10.5px!important;font-weight:900!important;line-height:1.15!important;
}
body.manitas-app .mch-text{font-size:14px!important;line-height:1.38!important;color:#17272c!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important}
body.manitas-app .mch-meta{
  display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:3px!important;
  min-height:14px!important;margin:2px 0 0!important;color:#7c8a8f!important;font-size:10.5px!important;line-height:1!important;font-weight:600!important;
}
body.manitas-app .mch-time{color:#7c8a8f!important;font-size:10.5px!important}
body.manitas-app .mch-read-state{font-size:12px!important;letter-spacing:-2px!important;color:#7f8d92!important;font-weight:900!important;line-height:1!important}
body.manitas-app .mch-read-state.is-read{color:#087985!important}
body.manitas-app .mch-msg.system{
  max-width:min(86%,680px)!important;margin:9px auto!important;padding:6px 10px!important;text-align:center!important;
  border:1px solid #dfe7e5!important;border-radius:10px!important;background:rgba(255,255,255,.90)!important;
  color:#65757a!important;font-size:11.5px!important;font-weight:700!important;box-shadow:0 1px 3px rgba(15,43,50,.035)!important;
}
body.manitas-app .mch-msg.system .mch-text{color:#65757a!important;font-size:11.5px!important;text-align:center!important}
body.manitas-app .mch-msg.system .mch-meta{display:none!important}
body.manitas-app .mch-msg.system.is-offer{
  max-width:min(92%,700px)!important;padding:12px!important;text-align:left!important;background:#fff!important;
  border:1px solid #d8e6d0!important;border-left:4px solid #80c342!important;border-radius:14px!important;box-shadow:0 3px 10px rgba(15,43,50,.06)!important;
}
body.manitas-app .mch-msg.system.is-offer .mch-text{color:#203438!important;font-size:13px!important;text-align:left!important}

/* Adjuntos */
body.manitas-app .mch-attachment{margin-top:7px!important;padding:7px!important;border:0!important;border-radius:10px!important;background:rgba(0,92,103,.055)!important}
body.manitas-app .mch-attachment img{width:auto!important;max-width:min(300px,100%)!important;max-height:260px!important;border-radius:10px!important;margin:0 0 6px!important}
body.manitas-app .mch-attachment a{display:inline-flex!important;align-items:center!important;gap:5px!important;color:#005c67!important;font-size:12px!important;font-weight:800!important;text-decoration:none!important}

/* Composer tipo mensajería */
body.manitas-app .mch-composer-shell{
  position:relative!important;flex:0 0 auto!important;display:flex!important;align-items:flex-end!important;gap:4px!important;
  padding:7px 8px!important;background:#f7f9f8!important;border-top:1px solid #e1e8e7!important;z-index:8!important;
}
body.manitas-app .mch-tools{
  position:static!important;display:flex!important;flex:0 0 auto!important;align-items:center!important;gap:1px!important;
  padding:0!important;background:transparent!important;border:0!important;
}
body.manitas-app .mch-tool{
  width:38px!important;height:42px!important;min-width:38px!important;min-height:42px!important;flex:0 0 38px!important;
  border:0!important;border-radius:50%!important;background:transparent!important;color:#607078!important;padding:8px!important;box-shadow:none!important;
}
body.manitas-app .mch-tool:hover,
body.manitas-app .mch-tool:focus-visible,
body.manitas-app .mch-tool[aria-expanded="true"]{background:#eaf1ef!important;color:#005c67!important;outline:none!important}
body.manitas-app .mch-tool svg{width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.manitas-app .mch-compose{
  position:static!important;display:flex!important;flex:1 1 auto!important;min-width:0!important;align-items:flex-end!important;gap:6px!important;
  padding:0!important;background:transparent!important;border:0!important;
}
body.manitas-app .mch-compose textarea{
  flex:1 1 auto!important;width:100%!important;min-width:0!important;min-height:42px!important;max-height:112px!important;
  padding:10px 13px!important;border:1px solid #dde5e5!important;border-radius:22px!important;background:#fff!important;
  color:#1e2f34!important;font-size:16px!important;line-height:1.3!important;font-weight:400!important;box-shadow:none!important;resize:none!important;
}
body.manitas-app .mch-compose textarea::placeholder{color:#8a969a!important}
body.manitas-app .mch-compose textarea:focus{border-color:#aacd91!important;box-shadow:0 0 0 3px rgba(128,195,66,.10)!important}
body.manitas-app .mch-send-btn{
  width:auto!important;min-width:78px!important;height:42px!important;min-height:42px!important;padding:0 14px!important;border:0!important;border-radius:21px!important;
  background:#5f9e25!important;color:#fff!important;box-shadow:none!important;gap:6px!important;flex:0 0 auto!important;
}
body.manitas-app .mch-send-label{color:#fff!important;font-size:12px!important;font-weight:900!important}
body.manitas-app .mch-send-icon{display:none!important;width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important;color:#fff!important}
body.manitas-app .mch-file-preview{
  position:absolute!important;left:8px!important;right:8px!important;bottom:58px!important;z-index:12!important;margin:0!important;
  padding:8px 10px!important;border:1px solid #cee4c0!important;border-radius:10px!important;background:#f0f9e9!important;color:#35521f!important;
  box-shadow:0 6px 18px rgba(15,43,50,.08)!important;
}
body.manitas-app .mch-chatbox>.mch-alert{flex:0 0 auto!important;margin:0!important;background:#fff!important}

/* Respuestas rápidas y emoji picker */
body.manitas-app .mch-quick{
  left:8px!important;right:8px!important;bottom:60px!important;width:auto!important;max-width:420px!important;
  border:1px solid #dce5e5!important;border-radius:14px!important;background:#fff!important;color:#24363b!important;box-shadow:0 14px 34px rgba(15,43,50,.16)!important;
}
body.manitas-app .mch-emoji-panel{
  left:8px!important;bottom:60px!important;width:min(420px,calc(100vw - 30px))!important;height:min(340px,46vh)!important;max-height:340px!important;
  border:1px solid #dce5e5!important;border-radius:18px!important;background:#fff!important;box-shadow:0 18px 44px rgba(15,43,50,.18)!important;
}
body.manitas-app .mch-emoji-body{order:1!important;background:#fff!important;padding:9px!important}
body.manitas-app .mch-emoji-tabs{order:2!important;background:#f7f9f8!important;border-top:1px solid #e6eceb!important;border-bottom:0!important;padding:5px 7px!important}
body.manitas-app .mch-emoji-tab{height:38px!important;min-height:38px!important;font-size:21px!important;border-radius:10px!important}
body.manitas-app .mch-emoji-tab.is-active{background:#eaf7df!important}
body.manitas-app .mch-emoji-grid{grid-template-columns:repeat(8,minmax(38px,1fr))!important;gap:2px!important}
body.manitas-app .mch-emoji-grid button{min-width:38px!important;height:42px!important;min-height:42px!important;font-size:29px!important;border-radius:9px!important}
body.manitas-app #btn_emoji{font-size:inherit!important}

/* Estado cerrado */
body.manitas-app .mch-chatbox.is-readonly .mch-composer-shell{opacity:.52!important;pointer-events:none!important}
body.manitas-app .mch-chatbox.is-readonly .mch-conversation-head{background:#fbfcfc!important}

@media(max-width:767px){
  body.manitas-app .mch-wrap{padding-top:6px!important}
  body.manitas-app .mch-card{padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
  body.manitas-app .mch-head{display:none!important}
  body.manitas-app .mch-tabs{
    padding:4px!important;margin:0 0 5px!important;border:1px solid #e2e9e7!important;border-radius:14px!important;background:#fff!important;
  }
  body.manitas-app .mch-tab{min-height:40px!important;font-size:12px!important;border-radius:10px!important}
  body.manitas-app .mch-layout{background:transparent!important}
  body.manitas-app .mch-box.mch-chatbox{
    height:calc(100dvh - var(--mta-topbar,60px) - var(--mta-bottom,62px) - 98px)!important;
    min-height:430px!important;max-height:none!important;border:1px solid #dfe7e6!important;border-radius:18px!important;overflow:hidden!important;background:#fff!important;
  }
  body.manitas-app .mch-conversation-head{grid-template-columns:36px 42px minmax(0,1fr) 36px!important;min-height:58px!important;padding:7px 7px!important;gap:6px!important}
  body.manitas-app .mch-conversation-back,
  body.manitas-app .mch-secure-mark{width:36px!important;height:36px!important}
  body.manitas-app .mch-peer-avatar{width:42px!important;height:42px!important}
  body.manitas-app .mch-peer-copy strong{font-size:14px!important}
  body.manitas-app .mch-peer-copy span{font-size:10.5px!important}
  body.manitas-app .mch-msgs{padding:10px 8px 14px!important}
  body.manitas-app .mch-msg{max-width:84%!important;padding:7px 8px 5px!important}
  body.manitas-app .mch-text{font-size:14px!important}
  body.manitas-app .mch-composer-shell{padding:6px 6px!important;gap:2px!important}
  body.manitas-app .mch-tools{gap:0!important}
  body.manitas-app .mch-tool{width:34px!important;min-width:34px!important;flex-basis:34px!important;height:42px!important;padding:7px!important}
  body.manitas-app .mch-tool svg{width:21px!important;height:21px!important}
  body.manitas-app .mch-compose{gap:4px!important}
  body.manitas-app .mch-compose textarea{min-height:42px!important;padding:10px 12px!important;font-size:16px!important}
  body.manitas-app .mch-send-btn{width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;padding:0!important;border-radius:50%!important}
  body.manitas-app .mch-send-label{display:none!important}
  body.manitas-app .mch-send-icon{display:block!important}
  body.manitas-app .mch-emoji-panel{
    position:absolute!important;left:0!important;right:0!important;bottom:55px!important;width:100%!important;height:min(335px,43vh)!important;max-height:335px!important;
    border-left:0!important;border-right:0!important;border-bottom:0!important;border-radius:18px 18px 0 0!important;box-shadow:0 -12px 32px rgba(15,43,50,.14)!important;
  }
  body.manitas-app .mch-emoji-grid{grid-template-columns:repeat(7,minmax(38px,1fr))!important}
  body.manitas-app .mch-emoji-grid button{height:43px!important;min-height:43px!important;font-size:30px!important}
  body.manitas-app .mch-quick{left:6px!important;right:6px!important;bottom:56px!important;max-width:none!important}
  body.manitas-app .mch-file-preview{left:6px!important;right:6px!important;bottom:56px!important}
}

@media(max-width:380px){
  body.manitas-app .mch-peer-copy span{max-width:180px!important}
  body.manitas-app .mch-tool{width:32px!important;min-width:32px!important;flex-basis:32px!important;padding:6px!important}
  body.manitas-app .mch-emoji-grid{grid-template-columns:repeat(6,minmax(38px,1fr))!important}
}
