:root{
  --navy:#071a2d;--navy2:#0b4a7a;--blue:#1677ff;--cyan:#11c9f4;--bg:#f7f4ef;
  --surface:#fffdfa;--text:#1c2026;--muted:#6b7078;--line:#e4ddd4;--green:#21835c;
  --danger:#b3261e;--warn:#f2a120;--shadow:0 10px 30px rgba(6,25,43,.12)
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:var(--bg);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text)}
button,input,textarea,select{font:inherit}button{cursor:pointer}body{overflow:hidden}.hidden{display:none!important}
.boot-screen{position:fixed;inset:0;display:grid;place-items:center;align-content:center;gap:26px;background:linear-gradient(145deg,#031827,#0a3557);z-index:9999}.boot-screen img{width:min(66vw,280px);height:auto}.spinner{width:34px;height:34px;border:3px solid rgba(255,255,255,.22);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.login-screen{position:fixed;inset:0;background:url('assets/login-bg-premium.png') center/cover no-repeat;overflow:auto}.login-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(7,26,45,.18),rgba(0,13,42,.55))}.login-content{position:relative;min-height:100dvh;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:max(24px,env(safe-area-inset-top)) 20px max(18px,env(safe-area-inset-bottom));gap:18px}.login-brand{text-align:center;color:#fff;margin-top:8px}.login-brand img{width:min(58vw,250px)}.login-brand h1{margin:5px 0 2px;font-size:30px}.login-brand p{margin:0;color:rgba(255,255,255,.88);font-size:15px}.login-card{width:min(100%,430px);background:#fdfeff;border-radius:28px;padding:20px;box-shadow:0 20px 55px rgba(2,17,33,.35);display:grid;gap:13px}.login-card h2{margin:0;color:#0d1b57;font-size:27px}.login-card p{margin:3px 0 0;color:#5b6692}.field{display:grid;gap:6px}.field>span{font-size:12px;font-weight:700;color:#4e587c}.field-box{height:53px;border:1px solid #cfd5e1;border-radius:17px;display:flex;align-items:center;padding:0 13px;gap:10px;background:#fff}.field-box:focus-within{border-color:#1677ff;box-shadow:0 0 0 3px rgba(22,119,255,.1)}.field-box i{font-style:normal;color:#5a648a}.field-box input{border:0;outline:0;background:transparent;width:100%;font-size:16px}.icon-inline,.text-btn{border:0;background:transparent;color:#315eaf}.login-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.remember{display:flex;align-items:center;gap:6px;font-size:13px}.remember input{width:18px;height:18px}.text-btn{font-weight:700;font-size:13px;padding:8px 0}.form-alert{padding:10px 12px;border-radius:12px;background:#fff0ee;color:#9a2d25;font-size:13px}.primary,.secondary{border:0;border-radius:14px;font-weight:800}.primary{background:linear-gradient(135deg,#1677ff,#0c55c2);color:#fff}.secondary{background:#eef5ff;color:#155fca;border:1px solid #cfdef6}.large{height:52px;font-size:16px}.wide{width:100%;min-height:46px}.powered{width:150px;opacity:.92}
.mobile-app{position:fixed;inset:0;background:var(--bg)}.mobile-main{height:calc(100dvh - 67px);overflow:hidden}.mobile-section{height:100%;display:none;overflow:auto;background:#f8f4ee}.mobile-section.active{display:block}.app-header,.chat-header{min-height:66px;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;display:flex;align-items:center;gap:9px;background:linear-gradient(90deg,#031827,#07375b,#0b4a7a);color:#fff}.app-header.simple{padding-bottom:12px}.brand-avatar,.chat-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.18);font-weight:900;overflow:hidden;flex:none}.brand-avatar img,.chat-avatar img{width:100%;height:100%;object-fit:cover}.app-header-copy,.chat-title{display:grid;min-width:0;flex:1}.app-header-copy b,.chat-title b{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-header-copy small,.chat-title small{font-size:10.5px;color:#7ee8c1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-header-copy small i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3de18e;margin-right:4px}.header-action,.chat-head-btn{width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;font-size:24px;display:grid;place-items:center}.blue-line{height:2px;background:linear-gradient(90deg,transparent,#1ea7ff,transparent)}
.conversation-toolbar,.contacts-toolbar{padding:10px 12px 7px;background:#f8f4ee;position:sticky;top:0;z-index:3}.mobile-search{height:44px;border:1px solid #ddd4ca;border-radius:15px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 12px;box-shadow:0 2px 8px rgba(15,40,65,.04)}.mobile-search input{border:0;outline:0;background:transparent;width:100%;font-size:14px}.mobile-search span{font-size:18px;color:#777}.filter-scroll{display:flex;gap:7px;overflow-x:auto;padding:9px 0 3px;scrollbar-width:none}.filter-scroll::-webkit-scrollbar{display:none}.filter-scroll button{white-space:nowrap;border:1px solid #ddd4ca;background:#fff;color:#59616a;padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800}.filter-scroll button.active{background:#eaf3ff;color:#1262cf;border-color:#a9cbfb}.list-meta{display:flex;justify-content:space-between;align-items:center;padding:8px 2px 2px;color:#70767d}.list-meta span{font-weight:800;font-size:12px}.list-meta small{font-size:10px}.conversation-list,.contacts-list{padding:0 10px 18px;display:grid;gap:8px}.conversation-card,.contact-card{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eee7df;border-radius:17px;padding:10px;box-shadow:0 2px 8px rgba(20,38,57,.05)}.conversation-card:active,.contact-card:active{transform:scale(.995)}.avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;flex:none;font-weight:900;color:#1d5b89;background:linear-gradient(135deg,#d9edff,#e8f8f2);overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.card-main{min-width:0;flex:1;display:grid;gap:3px}.card-title-row{display:flex;justify-content:space-between;gap:8px;align-items:baseline}.card-title-row b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-title-row time{font-size:10px;color:#8c9096;flex:none}.card-preview{font-size:12px;color:#73777e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-meta{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.pill{display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:999px;font-size:9px;font-weight:800;background:#eef2f6;color:#5d6874}.pill.unread{background:#1677ff;color:#fff}.pill.pending{background:#fff1d9;color:#9f6510}.pill.priority{background:#fff0ee;color:#b13c32}.pill.final{background:#edf0f2;color:#68727c}.pill.client{background:#e8f8ef;color:#1f7c51}.pill.lead{background:#eef3ff;color:#4667a7}.empty-state{padding:60px 24px;text-align:center;color:#7a7f86}.empty-state b{display:block;color:#30353b;margin-bottom:5px}
.bottom-nav{position:fixed;left:0;right:0;bottom:0;height:calc(67px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(3,1fr);background:#fff;border-top:1px solid #e7e0d8;z-index:20}.bottom-nav button{border:0;background:transparent;color:#747a82;display:grid;place-items:center;align-content:center;gap:2px}.bottom-nav button span{font-size:22px}.bottom-nav button b{font-size:10px}.bottom-nav button.active{color:#1677ff}.bottom-nav button.active span{background:#eaf3ff;border-radius:16px;padding:2px 12px}
.settings-list{padding:12px 12px 90px;display:grid;gap:10px}.settings-card{background:#fff;border-radius:17px;padding:13px;box-shadow:0 2px 9px rgba(22,37,52,.06);display:grid;gap:7px}.settings-title{display:flex;align-items:center;gap:9px}.settings-title i{font-style:normal;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#eaf3ff;color:#1677ff}.settings-card strong{font-size:16px}.settings-card>span{font-size:13px;color:#6d737b}.settings-card>small{color:#1677ff;font-weight:700}.settings-card p{margin:0;color:#6d737b;font-size:13px;line-height:1.45}.choice-row{display:flex;gap:6px;overflow:auto}.choice-row button{border:1px solid #d7dfe8;background:#fff;padding:8px 10px;border-radius:11px;font-size:12px;font-weight:700}.settings-hint{color:#7b8289!important;font-weight:500!important;line-height:1.4}.logout{margin-top:4px}
.chat-view{position:fixed;inset:0;background:linear-gradient(#f7f4ef,#f2eee8);z-index:50;display:flex;flex-direction:column}.chat-header{padding-left:5px;padding-right:6px}.chat-head-btn{font-size:30px}.chat-owner-strip{align-self:center;margin:6px 10px 0;background:#fff;border-radius:999px;padding:5px 10px;font-size:11px;color:#65717b;box-shadow:0 1px 5px rgba(0,0,0,.08)}.chat-window-warning{margin:7px 9px 0;background:#fff4e3;border:1px solid #f6d6a2;border-radius:12px;padding:8px 10px;display:grid;gap:2px;font-size:11px}.chat-window-warning b{color:#9b6210}.chat-window-warning span{color:#7a6750}.chat-messages{flex:1;overflow:auto;padding:10px 10px 14px;display:flex;flex-direction:column;gap:5px;overscroll-behavior:contain}.date-chip{align-self:center;background:rgba(255,255,255,.94);border-radius:999px;padding:4px 10px;color:#70767d;font-size:10px;box-shadow:0 1px 4px rgba(0,0,0,.08);margin:5px 0}.message-row{display:flex}.message-row.mine{justify-content:flex-end}.bubble{max-width:84%;padding:8px 9px 5px;border-radius:15px 15px 15px 4px;background:#fff;box-shadow:0 1px 4px rgba(10,30,50,.08);font-size:14px;line-height:1.35;word-break:break-word}.mine .bubble{background:#dff5e8;border-radius:15px 15px 4px 15px}.bubble .agent{display:block;color:#176fc2;font-weight:800;font-size:10px;margin-bottom:2px}.bubble-footer{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:3px;color:#7b8187;font-size:9px}.bubble .media-card{margin-bottom:5px;background:rgba(255,255,255,.55);border-radius:9px;padding:7px;display:flex;align-items:center;gap:7px}.media-card button{border:0;background:#1677ff;color:#fff;border-radius:8px;padding:6px 8px;font-size:10px;font-weight:800}.attachment-preview{background:#fff;padding:7px 9px;box-shadow:0 -3px 12px rgba(0,0,0,.06);display:flex;align-items:center;gap:8px}.attachment-preview .preview-icon{width:36px;height:36px;border-radius:10px;background:#eaf3ff;color:#1677ff;display:grid;place-items:center}.attachment-preview .preview-copy{flex:1;min-width:0}.attachment-preview b,.attachment-preview small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-preview small{color:#777}.attachment-preview button{border:0;background:transparent;font-size:20px}.recording-bar{background:#ffefed;padding:8px 10px;display:flex;align-items:center;gap:8px;color:#8d3029}.recording-bar i{width:9px;height:9px;border-radius:50%;background:red;animation:pulse 1s infinite}.recording-bar span{flex:1;font-size:12px;font-weight:700}.recording-bar button{border:0;background:transparent;color:#b3261e;font-weight:800}@keyframes pulse{50%{opacity:.35}}.chat-composer{display:flex;align-items:flex-end;gap:4px;padding:6px 5px calc(6px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -5px 18px rgba(0,0,0,.08)}.chat-composer textarea{flex:1;height:46px;max-height:112px;resize:none;border:1px solid #d9dde3;border-radius:23px;padding:12px 14px;outline:0;font-size:14px}.composer-btn,.send-btn{width:40px;height:40px;border:0;border-radius:50%;display:grid;place-items:center;flex:none}.composer-btn{background:transparent;color:#1677ff;font-size:20px}.send-btn{background:#1677ff;color:#fff;font-size:17px}.composer-btn.recording{color:red}.chat-composer button:disabled,.chat-composer textarea:disabled{opacity:.4}
.mobile-modal{position:fixed;inset:0;background:rgba(2,15,28,.52);z-index:100;display:flex;align-items:flex-end;justify-content:center}.mobile-modal-card{position:relative;background:#fff;border-radius:24px 24px 0 0;width:min(100%,620px);max-height:88dvh;overflow:auto;padding:22px 16px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(0,0,0,.22)}.modal-x{position:absolute;right:10px;top:8px;border:0;background:#eef1f4;width:34px;height:34px;border-radius:50%;font-size:22px}.sheet-title{margin:0 40px 4px 0;font-size:21px}.sheet-subtitle{margin:0 0 15px;color:#747b82;font-size:12px}.sheet-grid{display:grid;gap:9px}.sheet-action{border:1px solid #e0e5ea;background:#fff;border-radius:14px;padding:12px;text-align:left;display:flex;align-items:center;gap:10px}.sheet-action i{width:35px;height:35px;border-radius:11px;background:#eaf3ff;color:#1677ff;display:grid;place-items:center;font-style:normal}.sheet-action.danger i{background:#fff0ee;color:#b3261e}.sheet-action b{display:block}.sheet-action small{display:block;color:#7a8087;margin-top:2px}.modal-field{display:grid;gap:5px;margin:10px 0}.modal-field span{font-size:11px;font-weight:800;color:#5f6770}.modal-field input,.modal-field select,.modal-field textarea{width:100%;border:1px solid #d9dfe6;border-radius:13px;padding:11px;outline:0}.modal-field textarea{min-height:80px;resize:vertical}.tag-editor{display:flex;flex-wrap:wrap;gap:6px;padding:6px 0}.tag-chip{display:inline-flex;gap:4px;align-items:center;border-radius:999px;background:#edf3ff;color:#315f9c;padding:6px 9px;font-size:11px;font-weight:800}.tag-chip button{border:0;background:transparent;color:inherit;padding:0}.relation-toggle{display:grid;grid-template-columns:1fr 1fr;gap:6px}.relation-toggle button{padding:10px;border-radius:12px;border:1px solid #d8dfe6;background:#fff;font-weight:800}.relation-toggle button.active{background:#eaf6ef;color:#21764e;border-color:#bfe2cc}.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}.modal-actions button{min-height:44px;padding:0 14px}.profile-menu{position:fixed;right:10px;top:calc(58px + env(safe-area-inset-top));z-index:90;width:230px;background:#fff;border-radius:15px;padding:7px;box-shadow:0 16px 45px rgba(0,0,0,.22);border:1px solid #e8e1d9}.profile-menu button{width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:10px}.profile-menu button:hover{background:#f2f5f8}.profile-menu .who{padding:8px 10px;border-bottom:1px solid #eee;margin-bottom:4px}.profile-menu .who b,.profile-menu .who small{display:block}.profile-menu .who small{color:#777}.mobile-toast{position:fixed;left:50%;bottom:calc(82px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:#172534;color:#fff;padding:10px 14px;border-radius:12px;z-index:200;opacity:0;pointer-events:none;transition:.2s;max-width:88vw;text-align:center;font-size:12px;box-shadow:var(--shadow)}.mobile-toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:840px){.mobile-main{height:100dvh;padding-left:0}.bottom-nav{display:none}.mobile-section{max-width:420px;border-right:1px solid #e3ddd5}.chat-view{left:420px}.mobile-section.active{display:block}.mobile-main{display:flex}.mobile-main:has(#sectionContacts.active),.mobile-main:has(#sectionSettings.active){display:block}.mobile-main:has(#sectionContacts.active) .mobile-section.active,.mobile-main:has(#sectionSettings.active) .mobile-section.active{max-width:100%;border:0}.login-content{justify-content:center}.powered{position:absolute;bottom:24px}}

/* ===== Valeno Connect Mobile v3.5.1 • mídia estilo atendimento web ===== */
.bubble .message-text{margin-top:2px}
.bubble .mobile-wa-media{box-sizing:border-box}
.bubble .mobile-wa-audio{
  width:min(390px,78vw);
  min-width:270px;
  display:grid;
  grid-template-columns:46px 40px minmax(130px,1fr);
  align-items:center;
  gap:7px;
  margin:0 0 3px;
  padding:5px 1px 3px;
  background:transparent;
}
.bubble .mobile-wa-audio audio{display:none!important}
.bubble .mobile-audio-speed{
  min-width:44px;
  height:31px;
  padding:0 8px;
  border:0;
  border-radius:16px;
  background:rgba(74,99,74,.52);
  color:#fff;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.message-row:not(.mine) .mobile-audio-speed{
  background:rgba(88,105,116,.13);
  color:#263238;
}
.bubble .mobile-audio-play{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#617968;
  cursor:pointer;
}
.message-row:not(.mine) .mobile-audio-play{color:#71808a}
.bubble .mobile-audio-play svg{width:29px;height:29px;fill:currentColor}
.bubble .mobile-audio-track{min-width:0;display:grid;gap:2px;padding-top:2px}
.bubble .mobile-audio-range{
  width:100%;
  height:18px;
  margin:0;
  padding:0;
  accent-color:#849d7e;
  cursor:pointer;
}
.message-row:not(.mine) .mobile-audio-range{accent-color:#78909c}
.bubble .mobile-audio-times{
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#71808a;
  font-size:9px;
  line-height:1;
}
.bubble .mobile-media-loading{
  grid-column:1/-1;
  min-height:26px;
  display:grid;
  place-items:center;
  color:#71808a;
  font-size:10px;
}
.bubble .mobile-wa-image{
  width:min(420px,80vw);
  max-width:100%;
  min-height:150px;
  display:block;
  overflow:hidden;
  margin:-5px -6px 5px;
  padding:0;
  border:0;
  border-radius:10px;
  background:rgba(0,0,0,.07);
  cursor:zoom-in;
}
.bubble .mobile-wa-image img{
  width:100%;
  max-height:430px;
  display:block;
  object-fit:cover;
}
.bubble .mobile-wa-video{
  position:relative;
  width:min(420px,80vw);
  max-width:100%;
  overflow:hidden;
  margin:-5px -6px 5px;
  border-radius:10px;
  background:#111;
}
.bubble .mobile-wa-video video{width:100%;max-height:430px;display:block}
.bubble .mobile-wa-document{
  min-width:250px;
  max-width:390px;
  display:grid;
  grid-template-columns:38px 1fr;
  align-items:center;
  gap:9px;
  margin:0 0 3px;
  padding:9px;
  border:0;
  border-radius:9px;
  background:rgba(255,255,255,.22);
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.bubble .mobile-doc-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:rgba(255,255,255,.3);
  font-size:17px;
}
.bubble .mobile-doc-copy{min-width:0;display:grid;gap:2px}
.bubble .mobile-doc-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.bubble .mobile-doc-copy small{color:#71808a;font-size:9px}
.bubble .mobile-wa-media.error .mobile-media-loading{color:#cf5d5d}
.mobile-image-viewer{
  position:fixed;
  z-index:5000;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(5,12,20,.9);
  backdrop-filter:blur(6px);
}
.mobile-image-viewer.show{display:flex}
.mobile-image-viewer img{
  max-width:94vw;
  max-height:88vh;
  border-radius:12px;
  box-shadow:0 24px 70px rgba(0,0,0,.5);
}
.mobile-image-viewer-close{
  position:fixed;
  top:calc(14px + env(safe-area-inset-top));
  right:18px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  background:rgba(0,0,0,.36);
  color:#fff;
  font-size:28px;
}
@media(max-width:520px){
  .bubble .mobile-wa-audio{width:min(330px,80vw);min-width:245px;grid-template-columns:42px 36px minmax(110px,1fr);gap:5px}
  .bubble .mobile-audio-speed{min-width:40px;height:29px;font-size:10px}
  .bubble .mobile-audio-play{width:34px;height:34px}
  .bubble .mobile-audio-play svg{width:27px;height:27px}
  .bubble .mobile-wa-image,.bubble .mobile-wa-video{width:min(340px,80vw)}
}


/* ===== Valeno Connect v3.5.2 • mídia e compositor mobile ===== */
.bubble .mobile-wa-media.ready .mobile-media-loading,
.bubble .mobile-media-loading[hidden]{display:none!important}

/* O player segue o mesmo desenho do atendimento web, mas cabe no balão mobile. */
.bubble .mobile-wa-audio{
  width:clamp(218px,72vw,300px)!important;
  max-width:100%!important;
  min-width:0!important;
  grid-template-columns:42px 34px minmax(0,1fr)!important;
  gap:5px!important;
  overflow:hidden!important;
  padding:5px 0 3px!important;
}
.bubble .mobile-audio-speed{
  width:42px!important;
  min-width:42px!important;
  height:30px!important;
  padding:0 5px!important;
}
.bubble .mobile-audio-play{
  width:34px!important;
  height:34px!important;
}
.bubble .mobile-audio-play svg{width:27px!important;height:27px!important}
.bubble .mobile-audio-track{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  padding:2px 1px 0 0!important;
}
.bubble .mobile-audio-range{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:0!important;
}
.bubble .mobile-audio-times{width:100%!important;min-width:0!important}

/* A mensagem de carregamento desaparece assim que a imagem real está pronta. */
.bubble .mobile-wa-image.ready{min-height:0!important;background:transparent!important}
.bubble .mobile-wa-image.ready img{display:block!important}

/* Anexo, imagem e microfone visíveis no compositor. */
.chat-composer{
  gap:3px!important;
  align-items:center!important;
}
.chat-composer textarea{
  min-width:0!important;
  height:44px!important;
}
.composer-btn{
  width:36px!important;
  height:36px!important;
  color:#1677ff!important;
  flex:0 0 36px!important;
}
.composer-btn svg{
  width:21px!important;
  height:21px!important;
  display:block!important;
}
#mobileMicBtn.recording{color:#e53935!important;background:#ffefed!important}
.send-btn{width:40px!important;height:40px!important;flex:0 0 40px!important}
@media(max-width:380px){
  .chat-composer{padding-left:3px!important;padding-right:3px!important}
  .composer-btn{width:33px!important;height:33px!important;flex-basis:33px!important}
  .composer-btn svg{width:19px!important;height:19px!important}
  .bubble .mobile-wa-audio{width:clamp(205px,70vw,270px)!important}
}

/* ===== Valeno Connect Mobile v3.5.4 • logo circular, preview quadrada e status ===== */
.brand-avatar,
#tenantAvatar,
#contactsTenantAvatar,
#settingsTenantAvatar{
  width:44px;
  height:44px;
  border-radius:50%;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.24);
  box-shadow:0 5px 14px rgba(0,0,0,.12);
}
.brand-avatar img,
#tenantAvatar img,
#contactsTenantAvatar img,
#settingsTenantAvatar img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:4px;
  background:#fff;
}

.bubble .agent{margin-bottom:7px!important}
.bubble .agent + .mobile-wa-image,
.bubble .agent + .mobile-wa-video,
.bubble .agent + .mobile-wa-audio,
.bubble .agent + .mobile-wa-document{margin-top:4px!important}

/* Imagem como pré-visualização quadrada; toque para abrir inteira. */
.bubble .mobile-wa-image{
  width:168px!important;
  height:168px!important;
  min-height:168px!important;
  max-width:168px!important;
  margin:2px 0 6px!important;
  border-radius:14px!important;
  background:rgba(10,22,35,.08)!important;
  border:1px solid rgba(10,22,35,.06);
}
.bubble .mobile-wa-image img{
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  object-fit:cover!important;
}
.bubble .mobile-wa-image .mobile-media-loading{
  position:absolute;
  inset:0;
  padding:8px;
  text-align:center;
}
@media (max-width:370px){
  .bubble .mobile-wa-image{
    width:148px!important;
    height:148px!important;
    min-height:148px!important;
    max-width:148px!important;
  }
}

/* Tiques corretos: enviada, entregue e visualizada. */
.bubble-footer .msg-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  font-size:10px;
  font-weight:900;
  letter-spacing:-1px;
}
.bubble-footer .msg-status.sent{color:#7b8187}
.bubble-footer .msg-status.delivered{color:#7b8187}
.bubble-footer .msg-status.read{color:#1b8dff}
.bubble-footer .msg-status.failed{color:#d34343;font-size:11px;letter-spacing:0}


/* ===== v3.5.5 refinamento premium ===== */
.brand-avatar,
#tenantAvatar,
#contactsTenantAvatar,
#settingsTenantAvatar{
  width:48px!important;
  height:48px!important;
  border-radius:50%!important;
  background:linear-gradient(180deg,#ffffff 0%,#eef6ff 100%)!important;
  border:1px solid rgba(89,166,255,.32)!important;
  box-shadow:0 8px 18px rgba(7,26,45,.18), inset 0 0 0 2px rgba(255,255,255,.55)!important;
  overflow:hidden;
}
.brand-avatar img,
#tenantAvatar img,
#contactsTenantAvatar img,
#settingsTenantAvatar img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  padding:5px!important;
  background:transparent!important;
}

.bubble .mobile-wa-image{
  position:relative;
  overflow:hidden;
  border-radius:16px!important;
  border:1px solid rgba(64,122,255,.16)!important;
  box-shadow:0 10px 24px rgba(9,28,54,.10), inset 0 0 0 1px rgba(255,255,255,.45)!important;
  background:linear-gradient(180deg,#f8fbff 0%,#eef5ff 100%)!important;
}
.bubble .mobile-wa-image img{
  transition:transform .25s ease, filter .25s ease;
}
.bubble .mobile-wa-image:active img,
.bubble .mobile-wa-image:hover img{
  transform:scale(1.015);
  filter:saturate(1.03);
}
.bubble .mobile-wa-image::after{
  content:"Toque para ampliar";
  position:absolute;
  left:10px;
  bottom:10px;
  font-size:11px;
  font-weight:700;
  color:#fff;
  background:rgba(6,25,47,.58);
  backdrop-filter:blur(4px);
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  padding:5px 9px;
  box-shadow:0 6px 14px rgba(0,0,0,.14);
  pointer-events:none;
}

/* ===== v3.5.6 logo clara no login + novos ícones PNG ===== */
.powered-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:6px;
  margin-bottom:4px;
  color:rgba(255,255,255,.72);
  font-size:11px;
  letter-spacing:.2px;
  text-shadow:0 2px 8px rgba(0,0,0,.28);
}
.powered-logo{
  width:138px!important;
  height:auto;
  opacity:1!important;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.18));
}

.bottom-nav{
  box-shadow:0 -8px 22px rgba(4,24,45,.06);
}
.bottom-nav button{
  padding-top:4px;
  gap:4px;
  transition:transform .18s ease, color .18s ease, background .18s ease;
}
.bottom-nav button:active{transform:scale(.98)}
.bottom-nav button span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:transparent;
}
.bottom-nav button span img{
  width:26px;
  height:26px;
  object-fit:contain;
  filter:drop-shadow(0 4px 8px rgba(20,90,180,.10));
}
.bottom-nav button b{
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.1px;
}
.bottom-nav button.active span{
  background:linear-gradient(180deg,#edf5ff 0%,#e1efff 100%);
  box-shadow:inset 0 0 0 1px rgba(27,126,255,.10), 0 6px 14px rgba(34,118,255,.10);
  padding:0!important;
}
.bottom-nav button.active b{color:#1167ff}
.bottom-nav button:not(.active) span{
  opacity:.9;
}

/* avatar no topo um pouco mais limpo para logos circulares */
.brand-avatar img,
#tenantAvatar img,
#contactsTenantAvatar img,
#settingsTenantAvatar img{
  border-radius:50%;
  padding:3px!important;
}

/* ===== v3.5.8 correção final: composer sem barra + logo fallback ===== */
.chat-composer textarea,
#mobileMessageInput{
  -webkit-appearance:none!important;
  appearance:none!important;
  resize:none!important;
  overflow:hidden!important;
  scrollbar-width:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:inset 0 0 0 1px #d9dde3!important;
  background:#fff!important;
  border-radius:23px!important;
  min-width:0!important;
}
.chat-composer textarea::-webkit-scrollbar,
#mobileMessageInput::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}
.chat-composer textarea::-webkit-resizer,
#mobileMessageInput::-webkit-resizer,
.chat-composer textarea::-webkit-scrollbar-thumb,
#mobileMessageInput::-webkit-scrollbar-thumb{
  display:none!important;
  width:0!important;
  height:0!important;
  background:transparent!important;
}
#mobileMicBtn{margin-left:0!important}

/* ===== v3.6.2 • status também na lista de conversas ===== */
.card-preview{
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
}
.card-preview>span:last-child{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.list-msg-status{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  font-size:12px;
  line-height:1;
  font-weight:900;
  letter-spacing:-2px;
}
.list-msg-status.sent{color:#7b8187}
.list-msg-status.delivered{color:#7b8187}
.list-msg-status.read{color:#1b8dff}
.list-msg-status.failed{color:#d34343;letter-spacing:0}
