:root{--gold:#caa11c;--gold-dark:#aa7d00;--gold-soft:#f4ead0;--gold-pale:#fff8e8;--ink:#15171a;--muted:#6b7280;--line:#dedede;--bg:#f7f7f4;--panel:#fff;--soft:#faf8f2;--green:#17b26a;--red:#e5484d;--blue:#4169aa}*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:Arial,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink);display:flex;overflow:hidden;font-size:14px}button,input,textarea,select{font:inherit}button{cursor:pointer}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:#c5a234;border-radius:12px}::-webkit-scrollbar-track{background:#f2f2ef}.hidden{display:none!important}
.sidebar{width:248px;min-width:248px;height:100vh;background:#fff;border-right:1px solid #d9d9d9;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.brand{height:78px;display:flex;align-items:center;justify-content:space-between;padding:8px 12px 8px 14px;border-bottom:1px solid #eee;background:#fff;position:sticky;top:0;z-index:5}.brand-logo{width:170px;max-height:58px;object-fit:contain}.collapse-btn{border:0;background:transparent;color:#777;font-size:28px;line-height:1}.menu{padding:10px 8px;display:flex;flex-direction:column;gap:2px}.menu button{height:38px;border:0;background:transparent;display:grid;grid-template-columns:34px 1fr auto;align-items:center;text-align:left;padding:0 8px;border-radius:2px;color:#111}.menu button:hover{background:#f5f1e8}.menu button.active{background:#f8f0db;color:#9b7200;font-weight:700}.menu .mi{font-size:20px;color:#777;text-align:center}.menu button.active .mi{color:var(--gold-dark)}.menu b{background:var(--gold-dark);color:#fff;border-radius:10px;padding:2px 7px;font-size:12px}.admin-title{font-size:18px;font-weight:700;padding:12px 18px 6px;border-top:1px solid #e5e5e5}.sidebar footer{margin-top:auto;padding:12px 14px;text-align:right;color:#111;border-top:1px solid #eee;font-size:12px}
.main{flex:1;height:100vh;display:flex;flex-direction:column;min-width:0;overflow:hidden}.goldbar{height:48px;min-height:48px;background:linear-gradient(180deg,#d6af24,#bd8e00);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px 0 24px;box-shadow:0 2px 5px #0002;z-index:4}.welcome{font-weight:700}.welcome span{font-weight:600}.gold-icons{display:flex;gap:12px;align-items:center}.gold-icons button{border:0;background:transparent;color:#fff;font-size:18px;min-width:24px;height:30px}.workspace{flex:1;display:grid;grid-template-columns:540px minmax(520px,1fr) 330px;min-height:0;overflow:hidden}.inbox{background:#faf9f5;border-right:1px solid #d9d9d9;display:flex;flex-direction:column;min-width:0;overflow:hidden}.tabs-row{height:72px;background:#f5f3ee;display:grid;grid-template-columns:1fr 1fr 1fr;border-bottom:1px solid #ddd}.filter{border:0;background:transparent;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#666;font-weight:600}.filter.active{color:#fff;background:linear-gradient(180deg,#eee9dd,#f7f4ed)}.filter.active::after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--gold)}.filter b{position:absolute;right:22px;bottom:11px;background:var(--gold-dark);color:#fff;border-radius:50%;min-width:20px;height:20px;display:grid;place-items:center;font-size:12px}.tab-icon{font-size:20px;color:#777}.status-row{height:80px;display:flex;align-items:center;justify-content:space-between;padding:12px 10px 6px;background:#fff}.new-btn{background:#101828;color:#fff;border:0;border-radius:10px;padding:10px 18px;font-weight:800}.toggle-label{display:flex;align-items:center;gap:7px;font-size:16px}.toggle-label span{width:26px;height:13px;background:#d8bd4d;border-radius:8px;display:inline-block;position:relative}.toggle-label span::after{content:"";position:absolute;right:-2px;top:-3px;width:18px;height:18px;border-radius:50%;background:var(--gold)}.queue-btn{background:#fff;border:1px solid #cbb06b;border-radius:16px;padding:10px 22px;font-size:16px;color:#444}.under-status{height:34px;background:#fff;border-bottom:1px solid #ddd;position:relative;text-align:right;padding-right:90px;color:#666;font-weight:600}.under-status::after{content:"";position:absolute;left:0;bottom:0;width:50%;height:2px;background:var(--gold)}.under-status b{display:inline-grid;place-items:center;background:var(--gold-dark);color:#fff;border-radius:50%;min-width:20px;height:20px;font-size:12px;vertical-align:top}.search-row{padding:12px;background:#fff;border-bottom:1px solid #eee}.search-row input{width:100%;border:1px solid #ddd;border-radius:10px;background:#f8f8f8;padding:12px 14px;outline:none}.search-row input:focus{border-color:#caa11c;background:#fff}.ticket-list{flex:1;overflow:auto;background:#fff}.empty-state{padding:52px 20px;text-align:center;color:#557091}.empty-state::before{content:"Nada aqui!";display:block;color:#111;font-weight:700;font-size:16px;margin-bottom:18px}.ticket{display:grid;grid-template-columns:46px 1fr auto;gap:10px;padding:11px 12px;border-bottom:1px solid #efefef;align-items:center;min-height:74px;background:#fff}.ticket:hover{background:#fbf5e7}.ticket.active{background:#fff8e8;border-left:4px solid var(--gold);padding-left:8px}.avatar,.fallback{width:42px;height:42px;border-radius:50%;object-fit:cover}.fallback{display:grid;place-items:center;background:#d8d8d8;color:#fff;font-weight:700}.ticket-body{min-width:0}.ticket-body div{display:flex;justify-content:space-between;gap:8px}.ticket-body strong{font-size:14px}.ticket-body time{font-size:12px;color:#777}.ticket-body p{margin:5px 0;color:#333;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ticket-body small{font-size:12px;color:#777}.unread{background:#25d366;color:#fff;border-radius:50%;min-width:18px;height:18px;display:grid;place-items:center;font-size:11px}.chat-shell{height:100%;display:flex;flex-direction:column;min-width:0;background:#fff}.chat-header{height:58px;min-height:58px;background:#fff;border-bottom:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;padding:0 16px}.chat-header.empty{justify-content:center;align-items:flex-start;flex-direction:column;color:#333}.chat-header.empty span{font-size:13px;color:#6b7280;margin-top:3px}.chat-person{display:flex;align-items:center;gap:10px}.chat-person .avatar{width:42px;height:42px}.chat-person strong{display:block;font-size:15px}.chat-person span{display:block;color:#777;font-size:12px}.chat-person b{color:#1aa85a}.account-pill{display:inline-block;background:#f2f2f2;border:1px solid #ddd;border-radius:4px;color:#555;margin-left:8px;padding:3px 8px;font-size:12px}.chat-tools button{border:0;background:transparent;font-size:20px;margin-left:10px;color:#444}.messages{flex:1;min-height:0;overflow:auto;padding:24px;background:#fbf4ea;background-image:radial-gradient(#e6ddcf 1px,transparent 1px);background-size:18px 18px;position:relative}.messages.no-chat-logo{display:grid;place-items:center;background:#fff}.empty-logo{width:min(520px,55%);opacity:.95}.day{margin:0 auto 18px;background:#fff;border:1px solid #eee;border-radius:14px;padding:6px 12px;width:max-content;color:#666;font-size:12px}.msg-row{display:flex;gap:8px;margin:8px 0;max-width:75%;align-items:flex-end}.msg-row.me{margin-left:auto;justify-content:flex-end}.bubble{background:#fff;border-radius:9px;padding:10px 12px;box-shadow:0 1px 3px #0001;line-height:1.35}.msg-row.me .bubble{background:#f7dfaa}.mini-avatar{width:27px;height:27px;border-radius:50%;object-fit:cover}.time{display:block;text-align:right;color:#777;font-size:11px;margin-top:4px}.msg-img{max-width:250px;border-radius:8px;display:block}.msg-video{max-width:280px;border-radius:8px}.audio-card audio,.msg-audio{width:250px}.doc-link{display:flex;align-items:center;gap:8px;color:#111;text-decoration:none;border:1px solid #eee;border-radius:8px;padding:10px;background:#fff}.composer{height:54px;margin:0;background:#fff;border-top:1px solid #ddd;display:flex;align-items:center;gap:8px;padding:7px 12px}.composer textarea{flex:1;height:40px;border:0;background:#fff;resize:none;outline:none;padding:10px}.composer button{width:34px;height:34px;border-radius:50%;border:0;background:#fff;color:#b26f00;font-size:18px}.composer .send{background:linear-gradient(135deg,#dcb943,#bd8e00);color:#fff}.attach-menu{position:relative}.attach-pop{display:none;position:absolute;bottom:42px;left:0;width:190px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 12px 30px #0002;padding:6px;z-index:20}.attach-menu:hover .attach-pop{display:block}.attach-pop button{width:100%;border-radius:6px;text-align:left;color:#333;background:#fff;padding:9px;height:auto}.attach-pop button:hover{background:#fff4dc}.preview,.record{margin:0;background:#fff;border-top:1px solid #ddd;padding:8px 12px;display:flex;justify-content:space-between;align-items:center}.preview-thumb{width:68px;height:52px;object-fit:cover;border-radius:6px}#previewContent{display:flex;gap:10px;align-items:center}.record button,.preview button{border:1px solid #ddd;background:#fff;border-radius:8px;padding:6px 10px}.contact-panel{background:#fff;border-left:1px solid #ddd;overflow:auto;padding:16px;min-width:0}.contact-panel.hidden-panel{display:none}.workspace.contact-closed{grid-template-columns:540px minmax(520px,1fr) 0}.close-info{float:right;border:0;background:transparent;font-size:24px;color:#555}.contact-panel h3{margin:8px 0 18px}.contact-info{text-align:center}.big-avatar{width:86px;height:86px;border-radius:50%;object-fit:cover}.contact-info h2{font-size:18px;margin:10px 0 5px}.contact-info p{color:#555;margin:0 0 10px}.outline{width:100%;height:39px;border:1px solid #caa11c;background:#fff;color:#a07000;border-radius:7px;margin:5px 0;font-weight:700}.ticket-actions-inline{display:flex;gap:8px;margin:8px 0}.ticket-actions-inline button{flex:1;border:1px solid #ddd;background:#fff;border-radius:7px;padding:8px;color:#a07000}.info-card{text-align:left;border:1px solid #eee;border-radius:8px;padding:12px;margin-top:12px;background:#fff}.info-card h4{margin:0 0 10px}.info-card p{font-size:13px;line-height:1.35}.tag{display:inline-block;background:#fff1d0;color:#a07000;border-radius:6px;padding:6px 9px;margin:3px;font-size:12px}.info-card textarea{width:100%;min-height:68px;border:1px solid #ddd;border-radius:6px;padding:8px;resize:vertical}.settings-view{height:calc(100vh - 48px);overflow:auto;padding:20px;background:#f7f7f4}.settings-card{background:#fff;border:1px solid #ddd;border-radius:4px;padding:18px}.settings-card h2{margin:0 0 4px}.settings-card p{margin:0 0 18px;color:#666}.settings-grid{display:grid;grid-template-columns:minmax(330px,520px) minmax(320px,1fr);gap:18px}.settings-box{border:1px solid #ddd;border-radius:4px;background:#fff;padding:14px;max-height:calc(100vh - 155px);overflow:auto}.box-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.box-title span{font-weight:700;color:#555}.box-title button,.add-number,.tag-editor button{border:1px solid #caa11c;background:#fff;color:#a07000;border-radius:7px;padding:8px 12px;font-weight:700}.add-number{width:100%;margin-top:10px}.wa-account{border-bottom:1px solid #eee;padding:10px 0;position:relative}.wa-left{display:flex;align-items:center;gap:10px}.wa-dot{color:#17b26a}.wa-dot.desconectado{color:#e5484d}.wa-left strong{display:block}.wa-left small{font-size:12px;color:#666}.wa-badge{position:absolute;right:4px;top:14px;background:#eee;border-radius:10px;padding:3px 8px;font-size:12px}.wa-actions{display:flex;gap:5px;margin:8px 0 0 26px}.wa-actions button{border:1px solid #ddd;background:#fff;border-radius:5px;padding:4px 7px;font-size:12px}.tag-editor{display:flex;gap:8px;margin-top:10px}.tag-editor input{flex:1;border:1px solid #ddd;border-radius:7px;padding:9px}.tag-row{display:flex;justify-content:space-between;border:1px solid #eee;border-radius:6px;padding:9px;margin:6px 0}.tag-actions button{border:1px solid #ddd;background:#fff;border-radius:5px;padding:4px 7px;margin-left:5px}.modal{position:fixed;inset:0;background:#0005;display:grid;place-items:center;z-index:100}.modal-box{background:#fff;width:380px;max-width:92vw;border-radius:8px;padding:22px;box-shadow:0 20px 60px #0004}.modal-box h3{margin:0 0 8px}.modal-box p{color:#666}.modal-box input,.modal-box select{width:100%;border:1px solid #ddd;border-radius:6px;padding:10px;margin:5px 0 12px}.modal-box label{font-weight:700;font-size:12px;color:#555}.modal-actions{display:flex;justify-content:flex-end;gap:9px}.modal-actions button{border:1px solid #ddd;background:#fff;border-radius:6px;padding:9px 12px}.modal-actions button:last-child{background:#bd8e00;color:#fff;border-color:#bd8e00}.qr-modal{background:rgba(0,0,0,.6)}.qr-modal-box{text-align:center;position:relative}.qr-close{position:absolute;right:10px;top:8px;border:0;background:transparent;font-size:26px}.qr-modal-code{width:310px;height:310px;max-width:78vw;max-height:78vw;margin:12px auto;border:1px dashed #d8bd4d;border-radius:10px;display:grid;place-items:center;background:#fffdf6;overflow:hidden}.qr-modal-code img{width:290px;height:290px;object-fit:contain}.qr-help{font-size:12px;color:#755b00;background:#fff8e8;border:1px solid #f0dfbd;border-radius:8px;padding:8px}@media(max-width:1280px){.workspace{grid-template-columns:430px minmax(480px,1fr) 300px}.workspace.contact-closed{grid-template-columns:430px minmax(480px,1fr) 0}.sidebar{width:220px;min-width:220px}.brand-logo{width:150px}}@media(max-width:980px){.contact-panel{display:none}.workspace{grid-template-columns:390px 1fr}.workspace.contact-closed{grid-template-columns:390px 1fr}}@media(max-width:760px){.sidebar{display:none}.workspace{grid-template-columns:1fr}.inbox{display:none}.goldbar{font-size:12px}.gold-icons{display:none}}

/* ===== StarNails Premium Professional Restyle v1.3.2 ===== */
:root{
  --gold:#d4af37;
  --gold-dark:#a97705;
  --gold-soft:#f3dfad;
  --gold-pale:#fff8e8;
  --champagne:#fbf5e8;
  --ink:#15171f;
  --muted:#667085;
  --line:#eadfca;
  --bg:#f8f6f1;
  --panel:#ffffff;
  --soft:#fffaf0;
  --green:#12b76a;
  --red:#ef4444;
  --blue:#345996;
}
body{
  font-family:"Inter","Segoe UI",Arial,sans-serif;
  background:linear-gradient(135deg,#fff 0%,#faf7ef 48%,#f6efe0 100%);
  color:var(--ink);
  font-size:14px;
}
button,input,textarea,select{font-family:inherit}
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#d4af37,#a97705);border-radius:20px}
::-webkit-scrollbar-track{background:#f6f0e3}
.sidebar{
  width:252px;min-width:252px;
  background:rgba(255,255,255,.96);
  border-right:1px solid rgba(212,175,55,.28);
  box-shadow:8px 0 28px rgba(70,49,0,.06);
}
.brand{
  height:86px;
  padding:10px 14px;
  background:linear-gradient(180deg,#fff,#fffaf0);
  border-bottom:1px solid rgba(212,175,55,.28);
}
.brand-logo{width:176px;max-height:66px;filter:drop-shadow(0 6px 12px rgba(0,0,0,.08))}
.collapse-btn{color:#9b7a16;border-radius:12px;width:34px;height:34px;display:grid;place-items:center;transition:.18s;background:#fff8e8;border:1px solid #f0dfbd}
.collapse-btn:hover{background:var(--gold);color:#fff}
.menu{padding:12px 10px;gap:5px}
.menu button{
  height:42px;
  grid-template-columns:36px 1fr auto;
  padding:0 10px;
  border-radius:12px;
  color:#202531;
  transition:.18s ease;
  position:relative;
}
.menu button:hover{background:#fff5df;transform:translateX(2px)}
.menu button.active{
  background:linear-gradient(135deg,#fff7e5,#f2dfad);
  color:#8a6100;
  box-shadow:0 8px 22px rgba(169,119,5,.12), inset 0 0 0 1px rgba(212,175,55,.34);
}
.menu button.active:before{
  content:"";position:absolute;left:0;top:10px;bottom:10px;width:4px;border-radius:0 10px 10px 0;background:linear-gradient(180deg,#d4af37,#a97705)
}
.menu .mi{font-size:19px;color:#7d7f86;transition:.18s}.menu button.active .mi{color:#a97705}
.menu b{background:linear-gradient(135deg,#d4af37,#a97705);box-shadow:0 5px 12px rgba(169,119,5,.25);border-radius:99px;min-width:24px;text-align:center}
.admin-title{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#8b7440;font-weight:800;padding:16px 18px 6px;border-top:1px solid rgba(212,175,55,.20)}
.sidebar footer{color:#8b7440;text-align:left;padding:14px 18px;background:#fffaf0}
.goldbar{
  height:52px;min-height:52px;
  background:linear-gradient(90deg,#b98705 0%,#d4af37 45%,#b98705 100%);
  box-shadow:0 4px 18px rgba(85,60,0,.18);
  padding:0 20px 0 26px;
}
.welcome{font-size:14px;letter-spacing:.01em}.welcome span{opacity:.9;margin-left:8px;font-size:12px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);padding:4px 10px;border-radius:999px}
.gold-icons button{border-radius:10px;transition:.18s}.gold-icons button:hover{background:rgba(255,255,255,.18);transform:translateY(-1px)}
.workspace{grid-template-columns:500px minmax(560px,1fr) 350px;background:#f9f6ef;gap:0}.workspace.contact-closed{grid-template-columns:500px minmax(560px,1fr) 0}
.inbox{background:rgba(255,255,255,.82);border-right:1px solid rgba(212,175,55,.22)}
.tabs-row{height:74px;background:linear-gradient(180deg,#fffdf9,#f8f2e7);border-bottom:1px solid rgba(212,175,55,.25)}
.filter{color:#6b7280;font-size:12px;letter-spacing:.04em}.filter.active{background:transparent;color:#a97705}.filter.active::after{height:3px;background:linear-gradient(90deg,#d4af37,#a97705);border-radius:10px}
.filter b{background:linear-gradient(135deg,#d4af37,#a97705);box-shadow:0 5px 12px rgba(169,119,5,.22)}
.status-row{height:78px;background:#fff;padding:14px 16px;border-bottom:1px solid #f1e6d1}.new-btn{background:linear-gradient(135deg,#171a22,#2b2f3a);border-radius:12px;padding:11px 20px;box-shadow:0 9px 22px rgba(16,24,40,.14)}.new-btn:hover{transform:translateY(-1px)}
.queue-btn{border-color:#d4af37;border-radius:14px;color:#8a6100;background:#fffdf8;box-shadow:0 6px 18px rgba(212,175,55,.08)}
.toggle-label{font-weight:600;color:#30343b}.toggle-label span{background:#ead9a3}.toggle-label span::after{background:linear-gradient(135deg,#d4af37,#a97705)}
.under-status{height:36px;background:#fff;color:#8b7440;border-bottom:1px solid #eee0c8}.under-status::after{height:3px;border-radius:10px;background:linear-gradient(90deg,#d4af37,#a97705)}.under-status b{background:#a97705}
.search-row{background:#fff;padding:14px 16px}.search-row input{border-color:#eadfca;border-radius:14px;background:#fbfaf7;height:42px}.search-row input:focus{box-shadow:0 0 0 4px rgba(212,175,55,.12)}
.ticket-list{background:#fff;scroll-behavior:smooth}.ticket{min-height:78px;margin:8px 12px;border:1px solid #f0e4cf;border-radius:16px;box-shadow:0 8px 22px rgba(66,48,8,.04);border-bottom:1px solid #f0e4cf;transition:.18s}.ticket:hover{background:#fffaf0;transform:translateY(-1px);box-shadow:0 12px 28px rgba(66,48,8,.08)}.ticket.active{border-left:0;padding-left:12px;background:linear-gradient(135deg,#fffaf0,#fff);border-color:#d4af37;box-shadow:0 12px 30px rgba(169,119,5,.14)}
.avatar,.fallback{width:44px;height:44px;box-shadow:0 4px 12px rgba(0,0,0,.08);border:2px solid #fff}.fallback{background:linear-gradient(135deg,#d4af37,#a97705)}
.ticket-body strong{font-size:14px;color:#111827}.ticket-body p{color:#48505d}.ticket-body small{color:#8b7440}.unread{background:linear-gradient(135deg,#d4af37,#a97705);box-shadow:0 4px 10px rgba(169,119,5,.2)}
.chat-shell{background:#fff;border-right:1px solid rgba(212,175,55,.20)}
.chat-header{height:64px;min-height:64px;background:rgba(255,255,255,.96);border-bottom:1px solid rgba(212,175,55,.22);padding:0 18px;box-shadow:0 4px 14px rgba(0,0,0,.025);z-index:2}
.chat-header.empty{background:#fff}.chat-person strong{font-size:16px}.chat-person span{font-size:13px}.account-pill{border:1px solid #ecd59a;background:#fff7e5;color:#8a6100;border-radius:999px;padding:4px 10px;font-weight:700}.chat-tools button{border-radius:10px;width:34px;height:34px;margin-left:5px;transition:.18s}.chat-tools button:hover{background:#fff4dc;color:#a97705}
.messages{padding:26px;background:#fbf6ed;background-image:radial-gradient(rgba(212,175,55,.12) 1px, transparent 1px);background-size:18px 18px;scroll-behavior:smooth}.messages.no-chat-logo{background:#fff}.empty-logo{width:min(580px,58%);opacity:.92;filter:drop-shadow(0 16px 32px rgba(0,0,0,.08))}.day{border-color:#f0e4cf;box-shadow:0 5px 18px rgba(66,48,8,.04)}
.msg-row{margin:10px 0}.bubble{border-radius:16px 16px 16px 4px;padding:11px 13px;box-shadow:0 8px 22px rgba(66,48,8,.06);border:1px solid rgba(234,223,202,.72)}.msg-row.me .bubble{background:linear-gradient(135deg,#f7dfaa,#fff3d4);border-color:#efd790;border-radius:16px 16px 4px 16px}.time{color:#8b7440}.mini-avatar{box-shadow:0 4px 12px rgba(0,0,0,.10)}.msg-img,.msg-video{border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.12)}.doc-link{border-color:#f0e4cf;border-radius:14px;background:#fffdf8}
.composer{height:66px;background:#fff;border-top:1px solid rgba(212,175,55,.22);padding:10px 14px;gap:9px}.composer textarea{height:44px;background:#fbfaf7;border:1px solid #eadfca;border-radius:14px;padding:12px 14px}.composer textarea:focus{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12);background:#fff}.composer button{width:42px;height:42px;background:#fff;border:1px solid #eadfca;color:#9b7200;box-shadow:0 4px 12px rgba(66,48,8,.04);transition:.18s}.composer button:hover{background:#fff5df;transform:translateY(-1px)}.composer .send{background:linear-gradient(135deg,#d4af37,#a97705);box-shadow:0 10px 22px rgba(169,119,5,.25);font-size:20px}.attach-pop{border-color:#eadfca;border-radius:16px;box-shadow:0 18px 44px rgba(66,48,8,.16)}.attach-pop button{border:0;border-radius:12px;box-shadow:none}.preview,.record{background:#fffdf8;border-top:1px solid #eadfca}
.contact-panel{background:#fff;border-left:1px solid rgba(212,175,55,.22);padding:18px;box-shadow:-8px 0 28px rgba(70,49,0,.04)}.close-info{width:34px;height:34px;border-radius:10px;transition:.18s}.close-info:hover{background:#fff4dc;color:#a97705}.contact-panel h3{font-size:16px}.big-avatar{width:92px;height:92px;border:3px solid #fff;box-shadow:0 10px 24px rgba(0,0,0,.12)}.outline{height:42px;border-color:#d4af37;border-radius:12px;background:#fffdf8;color:#8a6100;transition:.18s}.outline:hover{background:#fff4dc;box-shadow:0 8px 20px rgba(212,175,55,.12)}.ticket-actions-inline button{border-radius:12px;border-color:#eadfca}.info-card{border-color:#eadfca;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(66,48,8,.04);padding:14px}.info-card h4{color:#111827}.tag{border-radius:999px;background:#fff1d0;border:1px solid #f0dfbd;font-weight:700}.info-card textarea{border-color:#eadfca;border-radius:12px}.settings-view{background:#f8f6f1}.settings-card,.settings-box{border-color:#eadfca;border-radius:18px;box-shadow:0 10px 30px rgba(66,48,8,.05)}.settings-card h2{font-size:22px}.box-title span{color:#8a6100}.box-title button,.add-number,.tag-editor button{border-radius:12px;background:linear-gradient(135deg,#fff,#fff7e5);border-color:#d4af37;color:#8a6100}.modal-box{border-radius:18px;border:1px solid #eadfca;box-shadow:0 24px 70px rgba(0,0,0,.28)}.modal-box input,.modal-box select{border-color:#eadfca;border-radius:12px}.modal-actions button{border-radius:12px}.modal-actions button:last-child{background:linear-gradient(135deg,#d4af37,#a97705);border-color:#a97705}.qr-modal-code{border-radius:18px;background:#fffaf0;border-color:#d4af37}
@media(max-width:1280px){.workspace{grid-template-columns:430px minmax(480px,1fr) 315px}.workspace.contact-closed{grid-template-columns:430px minmax(480px,1fr) 0}}

/* V1.3.3 - fluxo de atendimento e destaque de conexão */
.ticket-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.ticket-account-line{display:flex;align-items:center;gap:6px;margin-top:3px;min-width:0}.account-highlight{display:inline-flex;align-items:center;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff7df;border:1px solid #e5c15a;color:#8a6100;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;box-shadow:0 2px 8px rgba(169,119,5,.08)}.status-chip{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.02em}.status-chip.status-aguardando{background:#fff3cd;color:#946200;border:1px solid #efd37a}.status-chip.status-em_atendimento{background:#dcfce7;color:#16723b;border:1px solid #8fe0ad}.status-chip.status-finalizado{background:#eef2f7;color:#516070;border:1px solid #d5dbe5}.ticket.status-aguardando{box-shadow:inset 3px 0 0 #d4af37}.ticket.status-em_atendimento{box-shadow:inset 3px 0 0 #22c55e}.ticket.status-finalizado{opacity:.84}.chat-person .account-pill.strong{background:linear-gradient(135deg,#fff4d7,#f1d481);border-color:#d4af37;color:#6d4a00;box-shadow:0 4px 12px rgba(169,119,5,.12);font-size:12px;vertical-align:middle}.accept-btn{width:auto!important;border-radius:999px!important;padding:0 16px!important;background:linear-gradient(135deg,#d4af37,#a97705)!important;color:white!important;font-size:13px!important;font-weight:800!important}.accept-alert{width:max-content;max-width:82%;margin:10px auto 16px;background:#fffaf0;border:1px dashed #d4af37;color:#745100;border-radius:10px;padding:10px 14px;text-align:center;box-shadow:0 5px 18px rgba(169,119,5,.08)}.accept-alert strong{display:block;font-size:13px}.accept-alert span{display:block;font-size:12px;margin-top:3px;color:#8b7440}.toggle-label{border:0;background:transparent;cursor:pointer}.toggle-label:hover{color:#8a6100}.composer textarea:disabled{background:#f8f8f8;color:#888;cursor:not-allowed}.composer button:disabled{opacity:.45;cursor:not-allowed}

/* V1.4 - Escopo MVP Profissional */
.module-view{height:calc(100vh - 48px);overflow:auto;padding:22px;background:#f8f6f1}
.module-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.module-head h2{margin:0;font-size:24px}.module-head p{margin:4px 0 0;color:#6b7280}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;margin-bottom:16px}
.metric{background:#fff;border:1px solid #eadfca;border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(66,48,8,.05)}
.metric span{display:block;color:#6b7280;font-weight:700;font-size:12px;text-transform:uppercase}.metric strong{display:block;font-size:34px;margin-top:8px;color:#111827}
.module-grid.two{display:grid;grid-template-columns:420px 1fr;gap:16px}.module-card{background:#fff;border:1px solid #eadfca;border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(66,48,8,.05)}
.module-card h3{margin:0 0 12px}.module-card input,.module-card textarea{width:100%;border:1px solid #eadfca;border-radius:12px;padding:12px;margin:7px 0;background:#fff;outline:none}.module-card textarea{min-height:130px;resize:vertical}
.gold-action{border:0;border-radius:12px;background:linear-gradient(135deg,#d4af37,#a97705);color:#fff;padding:11px 14px;font-weight:800}.stack-list{display:flex;flex-direction:column;gap:8px;max-height:calc(100vh - 250px);overflow:auto}.stack-item{border:1px solid #eee1c2;border-radius:14px;padding:12px;background:#fffdf8;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.stack-item p{margin:4px 0 0;color:#555}.stack-item button{border:1px solid #eadfca;background:#fff;border-radius:10px;padding:7px 10px;color:#8a6100}.contacts-stack .stack-item{align-items:center}.quick-insert{white-space:nowrap}#quickReplySelect{max-width:128px;border:1px solid #eadfca;border-radius:12px;background:#fffdf8;color:#8a6100;padding:7px}.note-actions{display:flex;gap:8px;margin-top:8px}.note-actions button{border:1px solid #caa11c;background:#fffdf8;border-radius:10px;padding:8px 10px;color:#8a6100;font-weight:700}@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.module-grid.two{grid-template-columns:1fr}}

/* V1.4.1 - Sidebar Premium StarNails */
.sidebar{
  width:264px;
  min-width:264px;
  background:linear-gradient(180deg,#ffffff 0%,#fffdf8 54%,#fbf6ea 100%);
  border-right:1px solid rgba(212,175,55,.28);
  box-shadow:8px 0 30px rgba(66,48,8,.06);
  padding:10px 10px 12px;
  gap:8px;
}
.brand{
  height:92px;
  min-height:92px;
  margin:0 0 8px;
  padding:12px 10px;
  border:1px solid rgba(212,175,55,.22);
  border-radius:20px;
  background:linear-gradient(135deg,#fff 0%,#fff8e8 100%);
  box-shadow:0 12px 30px rgba(66,48,8,.07);
}
.brand-logo{
  width:178px;
  max-height:66px;
  object-fit:contain;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.08));
}
.collapse-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  background:#fff;
  border:1px solid #eadfca;
  color:#9b7200;
  font-size:26px;
  display:grid;
  place-items:center;
  transition:.18s ease;
}
.collapse-btn:hover{
  background:#fff3d4;
  transform:translateX(-1px);
}
.menu{
  padding:4px 0;
  gap:6px;
}
.menu button{
  height:44px;
  grid-template-columns:40px 1fr auto;
  padding:0 11px 0 7px;
  border-radius:15px;
  color:#343841;
  font-weight:700;
  letter-spacing:-.01em;
  position:relative;
  transition:.18s ease;
}
.menu button::before{
  content:"";
  position:absolute;
  left:5px;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:99px;
  background:transparent;
}
.menu button:hover{
  background:#fff6df;
  color:#111827;
  transform:translateX(2px);
  box-shadow:0 8px 18px rgba(66,48,8,.05);
}
.menu button.active{
  background:linear-gradient(135deg,#fff3d1 0%,#fffaf0 100%);
  color:#7d5700;
  box-shadow:0 10px 24px rgba(169,119,5,.12);
  border:1px solid rgba(212,175,55,.25);
}
.menu button.active::before{
  background:linear-gradient(180deg,#d4af37,#a97705);
}
.menu .mi{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#f7f4ed;
  color:#7b8190;
  font-size:16px;
  line-height:1;
  transition:.18s ease;
}
.menu button:hover .mi{
  background:#fff;
  color:#9b7200;
}
.menu button.active .mi{
  background:linear-gradient(135deg,#d4af37,#a97705);
  color:#fff;
  box-shadow:0 6px 14px rgba(169,119,5,.24);
}
.menu button span:nth-child(2){
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.menu b{
  min-width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:linear-gradient(135deg,#d4af37,#a97705);
  box-shadow:0 6px 12px rgba(169,119,5,.18);
  font-size:11px;
  padding:0 7px;
}
.admin-title{
  margin:8px 4px 2px;
  padding:13px 10px 7px;
  border-top:1px solid rgba(212,175,55,.18);
  color:#8b7440;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.11em;
}
.admin-menu{
  padding-bottom:12px;
}
.sidebar footer{
  margin-top:auto;
  padding:13px 10px;
  border:1px solid rgba(212,175,55,.22);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  color:#8a6100;
  text-align:center;
  box-shadow:0 8px 22px rgba(66,48,8,.04);
}
.sidebar footer strong::before{
  content:"CRM StarNails • ";
  color:#111827;
}
@media(max-width:1100px){
  .sidebar{width:232px;min-width:232px;padding:8px}.brand-logo{width:150px}.menu button{height:42px;grid-template-columns:36px 1fr auto;font-size:13px}.admin-title{font-size:10px}}


/* Ícones modernos do menu lateral */
.nav-ico{
  width:20px;
  height:20px;
  min-width:20px;
  stroke:currentColor;
  stroke-width:1.9;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.95;
  transition:transform .16s ease, color .16s ease, opacity .16s ease;
}
.menu button:hover .nav-ico,
.menu button.active .nav-ico{
  transform:translateY(-1px);
  opacity:1;
}
.menu button.active .nav-ico{
  color:#b8892e;
}
.menu .mi{display:none!important;}


/* V1.4.3 - Barra superior premium + remoção da faixa de fluxo */
.under-status{display:none!important}
.top-actions{display:flex;align-items:center;gap:10px;margin-left:auto;height:100%}
.top-icon,.volume-control,.user-chip{height:36px;border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.13);backdrop-filter:blur(10px);border-radius:999px;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.18);transition:.18s ease}
.top-icon{width:38px;display:grid;place-items:center;position:relative;padding:0;cursor:pointer}
.top-icon:hover,.volume-control:hover,.user-chip:hover{background:rgba(255,255,255,.22);transform:translateY(-1px)}
.top-icon svg,.volume-control svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.notification-btn span{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#e5484d;color:#fff;font-size:11px;font-weight:900;display:grid;place-items:center;border:2px solid #d4af37;box-shadow:0 4px 10px rgba(130,0,0,.22)}
.notification-btn span.empty{background:rgba(255,255,255,.28);color:#fff;border-color:rgba(255,255,255,.25)}
.volume-control{display:flex;align-items:center;gap:8px;padding:0 10px;min-width:132px}
.volume-control input[type=range]{width:76px;height:4px;accent-color:#fff;cursor:pointer}
.user-chip{display:flex;align-items:center;gap:9px;padding:0 12px 0 5px;min-width:178px}
.user-avatar{width:28px;height:28px;border-radius:50%;background:#fff;color:#9b7200;display:grid;place-items:center;font-weight:900;font-size:12px;box-shadow:0 6px 14px rgba(73,44,0,.18)}
.user-meta{display:flex;flex-direction:column;line-height:1.05;min-width:0}.user-meta strong{font-size:12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}.user-meta small{font-size:10px;color:#fff3c4;margin-top:3px}
@media(max-width:980px){.volume-control{min-width:42px;padding:0 10px}.volume-control input{display:none}.user-chip{min-width:auto;padding-right:8px}.user-meta{display:none}}
@media(max-width:760px){.top-actions{display:none}}

/* V1.4.4 - Composer estilo WhatsApp moderno */
.ui-ico{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block}.modern-composer{height:68px;background:#fffdf8;border-top:1px solid rgba(212,175,55,.24);padding:10px 14px;gap:9px;box-shadow:0 -6px 24px rgba(80,55,8,.04)}.modern-composer .chat-icon-btn{width:42px;height:42px;min-width:42px;border-radius:50%;border:1px solid #eadfca;background:#fff;color:#4b5563;display:grid;place-items:center;box-shadow:0 4px 12px rgba(66,48,8,.04);transition:all .18s ease}.modern-composer .chat-icon-btn:hover{background:#fff5df;color:#9b7200;border-color:#d4af37;transform:translateY(-1px)}.message-input-wrap{flex:1;height:44px;display:flex;align-items:center;background:#fff;border:1px solid #eadfca;border-radius:24px;padding:0 2px 0 0;transition:.18s}.message-input-wrap:focus-within{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12);background:#fff}.modern-composer textarea{height:40px;border:0!important;background:transparent!important;border-radius:22px;box-shadow:none!important;padding:11px 14px;font-size:14px;line-height:18px}.modern-composer textarea::placeholder{color:#7a7a7a}.modern-composer textarea:disabled{background:transparent!important}.modern-attach{position:relative}.modern-attach-pop{width:230px;bottom:52px;left:auto;right:-8px;border:1px solid #eadfca;border-radius:18px;background:#fff;box-shadow:0 20px 60px rgba(36,25,7,.18);padding:8px;overflow:hidden}.modern-attach:hover .modern-attach-pop{display:block}.modern-attach-pop button{width:100%;height:42px;border:0!important;border-radius:12px;background:#fff!important;box-shadow:none!important;color:#1f2937!important;display:flex;align-items:center;gap:12px;text-align:left;padding:8px 10px;font-size:14px;transition:.15s}.modern-attach-pop button:hover{background:#f8f3e8!important;transform:none}.attach-ico{width:28px;height:28px;min-width:28px;border-radius:9px;display:grid;place-items:center;color:#fff}.attach-ico .ui-ico{width:17px;height:17px}.attach-ico.doc{background:#635bff}.attach-ico.image{background:#0ea5e9}.attach-ico.camera{background:#f43f5e}.attach-ico.audio{background:#f97316}.attach-ico.contact{background:#0ea5a4}.attach-ico.poll{background:#f59e0b}.attach-ico.quick{background:#d4af37}.attach-divider{height:1px;background:#eee5d4;margin:6px 8px}.quick-select{height:42px;max-width:124px;border:1px solid #eadfca;border-radius:21px;background:#fff;color:#8a6100;padding:0 12px;font-weight:600;outline:none}.quick-select:focus{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12)}.modern-send{width:46px!important;height:46px!important;min-width:46px!important;border-radius:50%!important;background:linear-gradient(135deg,#d4af37,#a97705)!important;color:white!important;border:0!important;display:grid!important;place-items:center!important;box-shadow:0 12px 24px rgba(169,119,5,.28)!important;transition:.18s!important}.modern-send:hover{transform:translateY(-1px) scale(1.02)!important;box-shadow:0 16px 30px rgba(169,119,5,.34)!important}.modern-send .send-ico{width:21px;height:21px;stroke-width:2.2}.record span{display:flex;align-items:center;gap:8px}.record .ui-ico{color:#a97705}

/* V1.4.5 - ajustes visuais solicitados */
.new-btn{
  background:linear-gradient(135deg,#d4af37,#a97705)!important;
  color:#fff!important;
  border:1px solid #b88200!important;
  box-shadow:0 10px 22px rgba(169,119,5,.24)!important;
}
.new-btn:hover{background:linear-gradient(135deg,#e3bf4f,#b88200)!important;}
.chat-person strong{display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:1.2}.chat-person .account-pill.strong{margin-left:0;font-size:11px;padding:3px 9px}.contact-line{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;color:#5f6673!important}.contact-tag{display:inline-flex;align-items:center;background:#fff4da;border:1px solid #e6c96b;color:#7a5500;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:800;line-height:18px}.chat-tools{display:flex;align-items:center;gap:6px}.chat-tools .chat-tool-btn{width:36px!important;height:36px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#fff!important;border:1px solid #eadfca!important;color:#4b5563!important;box-shadow:0 4px 12px rgba(66,48,8,.04)!important}.chat-tools .chat-tool-btn:hover{background:#fff5df!important;color:#9b7200!important;border-color:#d4af37!important;transform:translateY(-1px)}.chat-tools .ui-ico{width:18px;height:18px}.bubble.search-hit{outline:3px solid rgba(212,175,55,.45);box-shadow:0 0 0 6px rgba(212,175,55,.12)}.tag-picker{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.tag-check{display:inline-flex;align-items:center;gap:5px;cursor:pointer}.tag-check input{accent-color:#d4af37}.tag-check span{border:1px solid #eadfca;background:#fffaf0;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700;color:#7a5500}.mini-gold{border:1px solid #caa11c;background:#fff8e6;color:#8a6100;border-radius:8px;padding:7px 10px;font-weight:800}.modern-attach-pop{z-index:20}.modern-attach-pop button{cursor:pointer}.modern-composer .chat-icon-btn svg{stroke-width:2.15}.attach-menu:hover .attach-pop,.attach-menu.open .attach-pop{display:block}.contact-info p b{word-break:break-word}

/* V1.4.6 - Ajustes de UX: menu, timer SLA e painel lateral recolhível */
.admin-menu button[data-view="config"]{
  margin-top:8px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  min-height:42px!important;
  overflow:visible!important;
  white-space:nowrap!important;
}
.admin-menu button[data-view="config"] span:last-child{
  display:inline-block!important;
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
.sidebar{overflow-y:auto!important;overflow-x:hidden!important;}

.response-timer{
  display:inline-flex!important;
  align-items:center;
  gap:4px;
  width:max-content;
  border-radius:999px;
  background:#fff8e6;
  border:1px solid #f1d992;
  color:#8a6100;
  font-size:11px;
  font-weight:800;
  padding:3px 8px;
  line-height:1;
  margin-left:4px;
  box-shadow:0 3px 10px rgba(169,119,5,.08);
}
.response-timer.overdue{
  background:#fff0f0;
  border-color:#ffb7b7;
  color:#c1121f;
  animation:timerPulse 1.25s infinite;
}
@keyframes timerPulse{0%,100%{box-shadow:0 0 0 0 rgba(193,18,31,.18)}50%{box-shadow:0 0 0 5px rgba(193,18,31,.05)}}
.ticket.timer-overdue{
  border-color:#f0a7a7!important;
  background:linear-gradient(135deg,#fff5f5,#fff)!important;
  box-shadow:inset 4px 0 0 #dc2626,0 12px 30px rgba(220,38,38,.10)!important;
}
.ticket-account-line{flex-wrap:wrap;}
.header-timer{display:flex!important;margin:5px 0 0 0!important;}
.notification-btn #notificationBadge.danger,
.notification-btn span.danger{
  background:#dc2626!important;
  color:#fff!important;
}
#notificationBadge.danger{background:#dc2626!important;color:#fff!important;}
.metric-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;}

/* Painel direito recolhível, sem sair totalmente do layout */
.workspace.contact-collapsed{grid-template-columns:540px minmax(520px,1fr) 54px!important;}
.contact-panel.collapsed{
  padding:8px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  background:#fffdf8!important;
}
.contact-panel.collapsed h3,
.contact-panel.collapsed #contactInfo{display:none!important;}
.contact-panel.collapsed .close-info{
  float:none!important;
  width:38px!important;
  height:38px!important;
  border:1px solid #eadfca!important;
  background:#fff!important;
  color:#a97705!important;
  box-shadow:0 8px 20px rgba(66,48,8,.06)!important;
}
.close-info{
  display:grid!important;
  place-items:center!important;
  font-weight:900!important;
}
@media(max-width:1280px){.workspace.contact-collapsed{grid-template-columns:430px minmax(480px,1fr) 54px!important;}}

/* V1.4.7 - Timer somente no card + notificações detalhadas */
.ticket-top{align-items:center!important;}
.ticket-top .ticket-timer{margin-left:6px!important;margin-right:auto!important;}
.header-timer{display:none!important;}
.accept-alert,.accept-btn{display:none!important;}
.ticket.timer-overdue{
  animation:lateCardBlink 1.6s infinite ease-in-out!important;
  border-left:4px solid #dc2626!important;
}
@keyframes lateCardBlink{
  0%,100%{background:#fff!important;box-shadow:inset 4px 0 0 #dc2626,0 6px 18px rgba(220,38,38,.06)!important;}
  50%{background:#fff1f1!important;box-shadow:inset 4px 0 0 #dc2626,0 10px 28px rgba(220,38,38,.14)!important;}
}
.notification-panel{
  position:fixed;
  top:58px;
  right:92px;
  width:340px;
  max-height:430px;
  overflow:auto;
  background:#fff;
  border:1px solid rgba(185,139,0,.22);
  border-radius:16px;
  box-shadow:0 22px 60px rgba(27,22,8,.18);
  z-index:9999;
  padding:10px;
}
.notification-panel.hidden{display:none!important;}
.notification-head{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 12px;border-bottom:1px solid #f0e5c8;margin-bottom:6px;}
.notification-head strong{font-size:14px;color:#1f2937;}
.notification-head button{border:0;background:#fff8e6;color:#8a6100;border-radius:10px;width:28px;height:28px;font-size:20px;line-height:1;}
.notification-item{padding:10px;border-radius:12px;margin:6px 0;background:#fffaf0;border:1px solid #f1dfad;cursor:pointer;transition:.18s ease;}
.notification-item:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(185,139,0,.12);}
.notification-item b{display:block;font-size:13px;color:#1f2937;margin-bottom:4px;}
.notification-item span{display:block;font-size:12px;color:#5f6368;line-height:1.35;}
.notification-item.danger{background:#fff3f3;border-color:#ffc9c9;}
.notification-item.danger b{color:#b91c1c;}
.notification-empty{padding:24px 12px;text-align:center;color:#777;font-size:13px;}


/* V1.4.8 - ajustes conexão, contador e etiquetas discretas */
.selected-tags{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 10px;min-height:28px;align-items:center}
.removable-tag{cursor:pointer;transition:.15s}
.removable-tag b{font-size:13px;margin-left:4px;color:#9b7200}
.removable-tag:hover{background:#ffe9b0;border-color:#d4af37;transform:translateY(-1px)}
.muted-small{font-size:12px;color:#8a8f98}
.add-tag-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.tag-select{height:34px;border:1px solid #eadfca;border-radius:10px;background:#fff;padding:0 9px;color:#5f4b19;outline:none}
.tag-select:focus{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12)}
.admin-menu button[data-view="config"] .nav-ico{display:block!important;color:inherit!important}
.admin-menu button[data-view="config"]{grid-template-columns:40px 1fr auto!important}

/* Ajuste V1.6.7 - origem de conversas: contato, grupo e canal */
.origin-chip{
  display:inline-flex;
  align-items:center;
  height:18px;
  padding:0 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  line-height:1;
  margin-left:6px;
  border:1px solid rgba(199,146,23,.28);
  background:rgba(199,146,23,.10);
  color:#8a650b;
  white-space:nowrap;
}
.origin-group{background:rgba(79,70,229,.08);border-color:rgba(79,70,229,.22);color:#4338ca;}
.origin-channel{background:rgba(14,165,233,.08);border-color:rgba(14,165,233,.22);color:#0369a1;}
.origin-contact{background:rgba(199,146,23,.10);border-color:rgba(199,146,23,.28);color:#8a650b;}
.message-sender{
  font-size:11px;
  font-weight:700;
  color:#8a650b;
  margin-bottom:4px;
}
.ticket-account-line .origin-chip{margin-left:4px;}
.chat-header .origin-chip{vertical-align:middle;}

/* V1.6.8 - status moderno + aba fixa para grupos/canais */
.status-tabs-modern{
  height:76px!important;
  grid-template-columns:repeat(4,1fr)!important;
  gap:8px;
  padding:10px 12px 0;
  background:linear-gradient(180deg,#fbfaf6,#f4f0e8)!important;
  border-bottom:1px solid #e7d8b8!important;
}
.status-tabs-modern .filter{
  border:1px solid transparent!important;
  border-radius:14px 14px 0 0!important;
  color:#6f6a61!important;
  gap:5px!important;
  font-size:11px!important;
  transition:.18s ease;
}
.status-tabs-modern .filter:hover{
  background:#fff9ea!important;
  border-color:#ead28a!important;
  transform:translateY(-1px);
}
.status-tabs-modern .filter.active{
  color:#8a6100!important;
  background:#fff!important;
  border-color:#e3c468!important;
  box-shadow:0 -2px 14px rgba(169,119,5,.08)!important;
}
.status-tabs-modern .filter.active::after{
  height:4px!important;
  left:14px!important;
  right:14px!important;
  bottom:-1px!important;
  border-radius:99px 99px 0 0!important;
  background:linear-gradient(90deg,#d4af37,#a97705)!important;
}
.status-tabs-modern .filter b{
  right:10px!important;
  top:9px!important;
  bottom:auto!important;
  min-width:19px!important;
  height:19px!important;
  font-size:11px!important;
  box-shadow:0 3px 8px rgba(169,119,5,.18);
}
.status-tabs-modern .tab-icon{
  font-size:19px!important;
  color:#a97705!important;
  line-height:1;
}
.ticket-group-channel{
  border-color:#d6c093!important;
  box-shadow:inset 3px 0 0 #9b7a2c!important;
}
.status-chip.status-grupos_canais{
  background:#f3ead5;
  color:#6d4a00;
  border:1px solid #d8bf7a;
}
.origin-chip.origin-group,
.origin-chip.origin-channel{
  background:#f5ead0;
  color:#765000;
  border-color:#d8bd73;
}
.group-fixed-note{
  margin:10px 0 12px;
  padding:10px 12px;
  border:1px solid #ecd99d;
  background:#fff8e5;
  border-radius:10px;
  color:#775500;
  font-size:12px;
  line-height:1.35;
}

/* V1.6.9 - correção clique card */
.ticket{cursor:pointer;}
.ticket *{pointer-events:auto;}

.chat-image{max-width:260px;max-height:260px;border-radius:14px;display:block;object-fit:cover}
.chat-video{max-width:300px;max-height:260px;border-radius:14px;display:block}
.chat-audio{width:260px;max-width:100%}
.chat-sticker{max-width:150px;max-height:150px;border-radius:12px;display:block}
.chat-file,.media-unavailable{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:rgba(196,151,62,.10);border:1px solid rgba(196,151,62,.22);color:#5f471a;text-decoration:none;font-weight:700}

/* V1.7.1 - Correção de rolagens e painel do contato */
html, body, .app {
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}
.main {
  height: 100vh;
  overflow: hidden;
}
.workspace {
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  min-height: 0;
  overflow: hidden;
}
.inbox,
.chat-shell,
.contact-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.inbox {
  display: flex;
  flex-direction: column;
}
.ticket-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding-bottom: 14px;
}
.chat-shell {
  display: flex;
  flex-direction: column;
}
.chat-header {
  flex: 0 0 auto;
}
.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
}
.composer,
.preview,
.record {
  flex: 0 0 auto;
}
.contact-panel {
  overflow-y: auto !important;
  overflow-x: hidden;
}
.contact-panel.collapsed {
  overflow: hidden !important;
}

/* V1.7.2 - envio imediato e painel de contato */
.msg-row.sending .bubble{ opacity:.72; }
.msg-row.sending .time{ color:#b8860b; font-style:italic; }
.contact-panel:not(.collapsed){ display:flex; flex-direction:column; }
#contactDetails{ min-height:0; overflow-y:auto; }

/* V1.7.4 - status premium: abas de atendimento mais modernas */
.status-tabs-modern{
  height:88px!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  padding:10px 12px 0!important;
  background:linear-gradient(180deg,#fffdf8 0%,#f7f0df 100%)!important;
  border-bottom:1px solid rgba(202,161,28,.28)!important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.75)!important;
}
.status-tabs-modern .filter{
  position:relative!important;
  overflow:visible!important;
  border:1px solid rgba(202,161,28,.18)!important;
  border-bottom:0!important;
  border-radius:18px 18px 0 0!important;
  background:rgba(255,255,255,.56)!important;
  color:#6b6251!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.035em!important;
  text-transform:uppercase!important;
  transition:background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease!important;
}
.status-tabs-modern .filter:hover{
  background:#fff9e9!important;
  border-color:rgba(202,161,28,.42)!important;
  color:#7f5a00!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(169,119,5,.08)!important;
}
.status-tabs-modern .filter.active{
  background:linear-gradient(180deg,#ffffff 0%,#fff8e6 100%)!important;
  border-color:rgba(202,161,28,.64)!important;
  color:#7a5600!important;
  box-shadow:0 -2px 18px rgba(169,119,5,.12)!important;
}
.status-tabs-modern .filter.active::after{
  content:""!important;
  position:absolute!important;
  left:14px!important;
  right:14px!important;
  bottom:-1px!important;
  height:4px!important;
  border-radius:999px 999px 0 0!important;
  background:linear-gradient(90deg,#b88705,#e7c95d,#a97705)!important;
}
.status-tabs-modern .filter b{
  position:absolute!important;
  right:9px!important;
  top:8px!important;
  bottom:auto!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#d5ad24,#a97705)!important;
  color:#fff!important;
  border:2px solid #fff7e7!important;
  border-radius:999px!important;
  font-size:10px!important;
  font-weight:900!important;
  box-shadow:0 5px 12px rgba(169,119,5,.22)!important;
}
.status-tabs-modern .tab-icon{
  width:31px!important;
  height:31px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:12px!important;
  color:#9b7006!important;
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(202,161,28,.22)!important;
  box-shadow:0 4px 10px rgba(80,58,10,.06)!important;
  line-height:0!important;
}
.status-tabs-modern .filter.active .tab-icon{
  background:linear-gradient(135deg,#d6ae25,#a97705)!important;
  border-color:rgba(169,119,5,.28)!important;
  color:#fff!important;
  box-shadow:0 8px 16px rgba(169,119,5,.20)!important;
}
.status-tabs-modern .tab-icon svg{
  width:18px!important;
  height:18px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.status-tabs-modern .filter span:not(.tab-icon){
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:1180px){
  .status-tabs-modern{gap:6px!important;padding-left:8px!important;padding-right:8px!important;}
  .status-tabs-modern .filter{font-size:9px!important;}
  .status-tabs-modern .tab-icon{width:28px!important;height:28px!important;}
}


/* V1.7.5 - status premium sem espaço e alerta de atraso */
.status-tabs-modern{
  gap:0!important;
  padding:10px 12px 0!important;
}
.status-tabs-modern .filter{
  border-radius:16px 16px 0 0!important;
  margin-left:-1px!important;
}
.status-tabs-modern .filter:first-child{
  margin-left:0!important;
}
.status-tabs-modern .filter.has-overdue{
  color:#a61b1b!important;
  border-color:rgba(229,72,77,.55)!important;
  background:linear-gradient(180deg,#fff 0%,#fff1f1 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(229,72,77,.10), 0 8px 18px rgba(229,72,77,.08)!important;
}
.status-tabs-modern .filter.has-overdue::before{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  top:6px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,#e5484d,#ffb3b3,#e5484d);
  opacity:.9;
}
.status-tabs-modern .filter.has-overdue .tab-icon{
  color:#fff!important;
  background:linear-gradient(135deg,#e5484d,#ba1b1d)!important;
  border-color:rgba(229,72,77,.45)!important;
  box-shadow:0 8px 16px rgba(229,72,77,.20)!important;
}
.status-tabs-modern .filter.has-overdue b{
  background:linear-gradient(135deg,#ef4444,#b91c1c)!important;
  border-color:#fff0f0!important;
  animation:statusPulseRed 1.15s ease-in-out infinite;
}
.status-tabs-modern .filter.has-overdue.active::after{
  background:linear-gradient(90deg,#b91c1c,#ff9a9a,#b91c1c)!important;
}
@keyframes statusPulseRed{
  0%,100%{transform:scale(1);box-shadow:0 5px 12px rgba(229,72,77,.20)}
  50%{transform:scale(1.10);box-shadow:0 5px 16px rgba(229,72,77,.36)}
}
@media(max-width:1180px){
  .status-tabs-modern{gap:0!important;}
}


/* V1.7.6 - Barra de status redesenhada e alerta apenas no Aguardando */
.status-tabs-modern{
  height:82px!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  padding:10px 12px 0!important;
  background:linear-gradient(180deg,#fffdf7 0%,#f7f1e4 100%)!important;
  border-bottom:1px solid rgba(202,161,28,.30)!important;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.85)!important;
}
.status-tabs-modern .filter{
  position:relative!important;
  margin:0!important;
  height:100%!important;
  border:1px solid rgba(202,161,28,.20)!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:0!important;
  background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,250,238,.56))!important;
  color:#716854!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:.035em!important;
  text-transform:uppercase!important;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease!important;
  overflow:visible!important;
}
.status-tabs-modern .filter:first-child{
  border-radius:18px 0 0 0!important;
}
.status-tabs-modern .filter:last-child{
  border-right:1px solid rgba(202,161,28,.20)!important;
  border-radius:0 18px 0 0!important;
}
.status-tabs-modern .filter:hover{
  background:linear-gradient(180deg,#fff,#fff6df)!important;
  color:#805a00!important;
  transform:none!important;
  box-shadow:inset 0 0 0 1px rgba(202,161,28,.08)!important;
}
.status-tabs-modern .filter.active{
  background:linear-gradient(180deg,#ffffff 0%,#fff5dc 100%)!important;
  color:#7c5700!important;
  border-color:rgba(202,161,28,.46)!important;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.95),0 -4px 18px rgba(169,119,5,.10)!important;
}
.status-tabs-modern .filter.active::after{
  content:""!important;
  position:absolute!important;
  left:18px!important;
  right:18px!important;
  bottom:0!important;
  height:4px!important;
  border-radius:999px 999px 0 0!important;
  background:linear-gradient(90deg,#b88705,#e7c95d,#a97705)!important;
}
.status-tabs-modern .tab-icon{
  width:30px!important;
  height:30px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:999px!important;
  color:#9a7007!important;
  background:#fff!important;
  border:1px solid rgba(202,161,28,.26)!important;
  box-shadow:0 5px 12px rgba(78,56,10,.06)!important;
  line-height:0!important;
}
.status-tabs-modern .filter.active .tab-icon{
  color:#fff!important;
  background:linear-gradient(135deg,#d1a61d,#a97705)!important;
  border-color:rgba(169,119,5,.30)!important;
  box-shadow:0 8px 16px rgba(169,119,5,.20)!important;
}
.status-tabs-modern .tab-icon svg{
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.status-tabs-modern .filter b{
  position:absolute!important;
  right:12px!important;
  top:9px!important;
  bottom:auto!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 6px!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#d2a820,#a97705)!important;
  color:#fff!important;
  border:2px solid #fff7e7!important;
  border-radius:999px!important;
  font-size:10px!important;
  font-weight:900!important;
  box-shadow:0 5px 12px rgba(169,119,5,.22)!important;
}
.status-tabs-modern .filter span:not(.tab-icon){
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
/* alerta visual apenas quando a aba Aguardando tem cliente esperando além do limite */
.status-tabs-modern .filter.has-overdue{
  color:#9f1d1d!important;
  background:linear-gradient(180deg,#fff 0%,#fff4f4 100%)!important;
  border-color:rgba(229,72,77,.45)!important;
  box-shadow:inset 0 0 0 1px rgba(229,72,77,.08)!important;
}
.status-tabs-modern .filter.has-overdue::before{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  top:7px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,#e5484d,#ffb0b0,#e5484d);
  opacity:.85;
}
.status-tabs-modern .filter.has-overdue .tab-icon{
  color:#fff!important;
  background:linear-gradient(135deg,#e5484d,#b91c1c)!important;
  border-color:rgba(229,72,77,.35)!important;
  box-shadow:0 8px 16px rgba(229,72,77,.18)!important;
}
.status-tabs-modern .filter.has-overdue b{
  background:linear-gradient(135deg,#ef4444,#b91c1c)!important;
  border-color:#fff0f0!important;
  animation:statusPulseRed 1.2s ease-in-out infinite;
}
.status-tabs-modern .filter.has-overdue.active::after{
  background:linear-gradient(90deg,#b91c1c,#ff9a9a,#b91c1c)!important;
}
.status-tabs-modern .filter[data-filter="em_atendimento"].has-overdue,
.status-tabs-modern .filter[data-filter="finalizado"].has-overdue,
.status-tabs-modern .filter[data-filter="grupos_canais"].has-overdue{
  color:#716854!important;
  background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,250,238,.56))!important;
  border-color:rgba(202,161,28,.20)!important;
  box-shadow:none!important;
}
.status-tabs-modern .filter[data-filter="em_atendimento"].has-overdue::before,
.status-tabs-modern .filter[data-filter="finalizado"].has-overdue::before,
.status-tabs-modern .filter[data-filter="grupos_canais"].has-overdue::before{display:none!important;}
@media(max-width:1180px){
  .status-tabs-modern{padding-left:8px!important;padding-right:8px!important;}
  .status-tabs-modern .filter{font-size:9px!important;}
  .status-tabs-modern .tab-icon{width:27px!important;height:27px!important;}
  .status-tabs-modern .filter b{right:7px!important;}
}

/* ===== PATCH V1.7.7 - Filtros compactos e rolagem fixa ===== */
.inbox{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}
.status-tabs-modern,
.tabs-row{
  flex:0 0 auto!important;
  min-height:60px!important;
  height:60px!important;
}
.status-row{
  flex:0 0 52px!important;
  height:52px!important;
  min-height:52px!important;
  padding:7px 14px!important;
  gap:10px!important;
  align-items:center!important;
  border-bottom:1px solid rgba(212,175,55,.16)!important;
  background:linear-gradient(180deg,#fff,#fffaf0)!important;
}
.new-btn{
  min-width:74px!important;
  height:34px!important;
  padding:0 15px!important;
  border-radius:12px!important;
  font-size:13px!important;
  letter-spacing:.01em!important;
  box-shadow:0 7px 16px rgba(169,119,5,.16)!important;
}
.toggle-label{
  height:32px!important;
  min-width:auto!important;
  padding:0 4px!important;
  gap:8px!important;
  font-size:13px!important;
  font-weight:700!important;
  color:#4b5563!important;
  white-space:nowrap!important;
}
.toggle-label span{
  width:28px!important;
  height:14px!important;
  border-radius:999px!important;
  background:#ead9a3!important;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.08)!important;
}
.toggle-label span::after{
  width:18px!important;
  height:18px!important;
  top:-2px!important;
  right:-2px!important;
  box-shadow:0 3px 8px rgba(169,119,5,.22)!important;
}
.queue-btn{
  height:34px!important;
  padding:0 14px!important;
  border-radius:12px!important;
  font-size:13px!important;
  font-weight:700!important;
  box-shadow:0 6px 14px rgba(169,119,5,.08)!important;
}
.search-row{
  flex:0 0 auto!important;
  padding:10px 14px!important;
}
.search-row input{
  height:38px!important;
  padding:0 13px!important;
  border-radius:12px!important;
  font-size:13px!important;
}
.ticket-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
/* impede a lista rolando de diminuir as barras superiores */
.inbox > .status-tabs-modern,
.inbox > .tabs-row,
.inbox > .status-row,
.inbox > .search-row{
  flex-shrink:0!important;
}
@media(max-width:1280px){
  .status-row{height:50px!important;min-height:50px!important;padding:7px 10px!important;}
  .new-btn{min-width:66px!important;padding:0 12px!important;font-size:12px!important;}
  .queue-btn{padding:0 11px!important;font-size:12px!important;}
  .toggle-label{font-size:12px!important;}
}

/* ===== PATCH V1.7.8 - Restaura altura da barra de status ===== */
/* Mantém NOVO/Todos/Filas compacto, mas devolve a altura confortável dos status */
.status-tabs-modern,
.tabs-row{
  flex:0 0 82px!important;
  height:82px!important;
  min-height:82px!important;
  padding-top:10px!important;
}
.status-tabs-modern .filter{
  height:100%!important;
  min-height:72px!important;
  gap:5px!important;
}
.status-tabs-modern .tab-icon{
  width:30px!important;
  height:30px!important;
}
.status-tabs-modern .filter b{
  top:9px!important;
}
@media(max-width:1280px){
  .status-tabs-modern,
  .tabs-row{
    flex:0 0 78px!important;
    height:78px!important;
    min-height:78px!important;
  }
  .status-tabs-modern .filter{
    min-height:68px!important;
  }
}


/* ===== PATCH V1.8.1 - Grupos/Canais primeiro + finalizados sem contador ===== */
.status-tabs-modern .filter[data-filter="finalizado"] b{display:none!important;}
.status-tabs-modern .filter[data-filter="grupos_canais"]{order:-10;}
.status-chip.status-grupos_canais,.group-fixed-note{display:none!important;}
.ticket-account-line{flex-wrap:wrap;row-gap:4px;}
.ticket-group-channel .account-highlight{background:#fff7df;border-color:#e5c15a;color:#8a6100;}


/* V1.8.2 - Grupos sem contador + mensagens fixadas */
#countGroups{display:none!important;}
.pinned-message-bar{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  gap:10px;
  margin:-10px auto 16px;
  max-width:780px;
  padding:10px 12px;
  background:linear-gradient(135deg,#fffaf0,#ffffff);
  border:1px solid rgba(212,175,55,.38);
  border-left:4px solid #d4af37;
  border-radius:14px;
  box-shadow:0 10px 26px rgba(66,48,8,.10);
}
.pinned-message-bar .pin-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fff3d1;
  border:1px solid #ecd59a;
}
.pinned-message-bar .pin-text{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;}
.pinned-message-bar .pin-text strong{font-size:12px;color:#8a6100;text-transform:uppercase;letter-spacing:.04em;}
.pinned-message-bar .pin-text span{font-size:13px;color:#1f2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pinned-message-bar button{
  width:30px;
  height:30px;
  border:0;
  border-radius:10px;
  background:#fff4dc;
  color:#8a6100;
  font-size:20px;
  cursor:pointer;
}
.pinned-message-bar button:hover{background:#f7dfaa;}
.bubble{position:relative;}
.pin-msg-btn{
  position:absolute;
  top:6px;
  right:6px;
  width:26px;
  height:26px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:#8a6100;
  box-shadow:0 5px 14px rgba(66,48,8,.10);
  opacity:0;
  transform:translateY(-2px);
  cursor:pointer;
  transition:.16s;
}
.bubble:hover .pin-msg-btn,.msg-row.is-pinned .pin-msg-btn{opacity:1;transform:translateY(0);}
.msg-row.is-pinned .bubble{outline:2px solid rgba(212,175,55,.30);}


/* V1.8.4 - Fixar conversa/card na lista lateral */
.ticket{position:relative;}
.ticket.ticket-pinned{
  background:linear-gradient(135deg,#fffaf0,#ffffff)!important;
  border-color:rgba(212,175,55,.55)!important;
  box-shadow:0 12px 28px rgba(169,119,5,.12)!important;
}
.pin-indicator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:5px;
  font-size:12px;
  color:#9a6a00;
  vertical-align:middle;
}
.pin-ticket-btn{
  position:absolute;
  right:8px;
  top:8px;
  width:26px;
  height:26px;
  border:1px solid rgba(212,175,55,.22);
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:#8a6100;
  box-shadow:0 6px 16px rgba(66,48,8,.08);
  cursor:pointer;
  font-size:13px;
  opacity:.18;
  transform:translateY(-1px);
  transition:.16s ease;
  z-index:2;
}
.ticket:hover .pin-ticket-btn,.pin-ticket-btn.active{
  opacity:1;
  transform:translateY(0);
}
.pin-ticket-btn:hover{
  background:#fff3d1;
  border-color:#d4af37;
}
.pin-ticket-btn.active{
  background:linear-gradient(135deg,#fff4d7,#f1d481);
  border-color:#d4af37;
  color:#6d4a00;
}
.ticket .unread{margin-right:26px;}

/* ===== PATCH V1.8.5 - Badges sempre agrupados à esquerda no card ===== */
.ticket-body{
  min-width:0!important;
  width:100%!important;
}
.ticket-account-line{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  flex-wrap:wrap!important;
  row-gap:4px!important;
  width:100%!important;
  margin-top:4px!important;
  padding-right:34px!important; /* preserva espaço do pin/unread sem jogar badge para direita */
}
.ticket-account-line .account-highlight,
.ticket-account-line .origin-chip,
.ticket-account-line .status-chip{
  margin:0!important;
  flex:0 0 auto!important;
  position:static!important;
  align-self:center!important;
}
.ticket-account-line .account-highlight{
  order:1!important;
}
.ticket-account-line .origin-chip{
  order:2!important;
}
.ticket-account-line .status-chip{
  order:3!important;
}
.ticket-top time{
  margin-left:auto!important;
  flex:0 0 auto!important;
}
.ticket .unread{
  position:absolute!important;
  right:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  margin:0!important;
}
.pin-ticket-btn{
  z-index:2!important;
}

/* Encaminhar mensagens */
.bubble{ position:relative; }
.message-actions{
  position:absolute;
  top:6px;
  right:8px;
  display:flex;
  gap:4px;
  opacity:0;
  transform:translateY(-2px);
  transition:.18s ease;
}
.bubble:hover .message-actions{ opacity:1; transform:translateY(0); }
.pin-msg-btn,.forward-msg-btn{
  border:0;
  width:26px;
  height:26px;
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:#8a6a1f;
  box-shadow:0 4px 14px rgba(0,0,0,.10);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
}
.pin-msg-btn:hover,.forward-msg-btn:hover{ background:#fff3ce; color:#5f450f; }
.forward-card{ max-width:520px; width:min(520px,92vw); }
.forward-preview{
  background:#fff8e4;
  border:1px solid rgba(205,159,54,.22);
  border-left:4px solid #c89b2b;
  color:#40351b;
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  line-height:1.35;
  margin:12px 0;
  max-height:92px;
  overflow:auto;
}
.forward-search{
  width:100%;
  border:1px solid #eadfca;
  border-radius:14px;
  padding:11px 13px;
  outline:none;
  background:#fff;
  margin-bottom:10px;
}
.forward-search:focus{ border-color:#c89b2b; box-shadow:0 0 0 3px rgba(200,155,43,.12); }
.forward-list{ max-height:360px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
.forward-destination{
  width:100%;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  border-radius:14px;
  padding:9px 10px;
  display:flex;
  gap:10px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  transition:.15s ease;
}
.forward-destination:hover{ background:#fff8e4; border-color:rgba(200,155,43,.28); transform:translateY(-1px); }
.forward-destination span{ min-width:0; }
.forward-destination strong{ display:block; font-size:13px; color:#241b0f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.forward-destination small{ display:block; font-size:11px; color:#7f735f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.empty-state.small{ padding:14px; font-size:13px; }

/* ===== PATCH V1.8.7 - UI Premium encaminhar + chip minimalista ===== */
.sim-icon{
  width:13px;
  height:13px;
  min-width:13px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  display:inline-block;
}
.account-highlight{
  gap:4px!important;
  height:21px!important;
  min-height:21px!important;
  padding:0 8px!important;
  font-size:11px!important;
  line-height:1!important;
}
.wa-dot .sim-icon{
  width:16px;
  height:16px;
  color:inherit;
}
.ticket-account-line .account-highlight,
.ticket-account-line .origin-chip,
.ticket-account-line .status-chip{
  height:21px!important;
  min-height:21px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:11px!important;
  line-height:1!important;
  padding:0 8px!important;
  border-radius:999px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
.ticket-account-line .status-chip{
  min-width:auto!important;
}
.ticket-account-line{
  gap:5px!important;
  align-items:center!important;
}
.bubble{
  overflow:visible!important;
  padding-right:44px!important;
}
.message-actions{
  position:absolute!important;
  top:-16px!important;
  right:8px!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  padding:4px!important;
  border:1px solid rgba(210,174,75,.22)!important;
  background:rgba(255,255,255,.94)!important;
  border-radius:999px!important;
  box-shadow:0 10px 24px rgba(32,24,10,.12)!important;
  opacity:0!important;
  transform:translateY(4px) scale(.98)!important;
  transition:.16s ease!important;
  z-index:10!important;
  pointer-events:none!important;
}
.bubble:hover .message-actions,
.msg-row:hover .message-actions{
  opacity:1!important;
  transform:translateY(0) scale(1)!important;
  pointer-events:auto!important;
}
.pin-msg-btn,.forward-msg-btn{
  width:28px!important;
  height:28px!important;
  border:0!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#9a720d!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
  transition:.14s ease!important;
  margin:0!important;
  padding:0!important;
}
.pin-msg-btn svg,.forward-msg-btn svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.pin-msg-btn:hover,.forward-msg-btn:hover{
  background:linear-gradient(135deg,#fff7df,#f4d879)!important;
  color:#5f450f!important;
  transform:translateY(-1px)!important;
}
.forward-card.premium-forward{
  width:min(560px,94vw)!important;
  max-width:560px!important;
  border:1px solid rgba(198,151,33,.28)!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,#fffdf8 0%,#ffffff 45%,#fffaf0 100%)!important;
  box-shadow:0 28px 80px rgba(30,22,6,.24)!important;
  padding:0!important;
  overflow:hidden!important;
}
.forward-head{
  padding:18px 20px!important;
  border-bottom:1px solid rgba(198,151,33,.16)!important;
  background:linear-gradient(135deg,#fffaf0,#ffffff)!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
.forward-title-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#d2a51c,#a87500);
  color:#fff;
  font-size:22px;
  box-shadow:0 12px 22px rgba(174,124,10,.22);
}
.forward-head strong{
  font-size:18px!important;
  color:#1d1609!important;
}
.forward-head span{
  display:block;
  margin-top:2px;
  color:#7f735f!important;
  font-size:12px!important;
}
.forward-close{
  margin-left:auto!important;
  width:36px!important;
  height:36px!important;
  border-radius:999px!important;
  border:1px solid rgba(198,151,33,.18)!important;
  background:#fff!important;
  color:#5f450f!important;
  font-size:20px!important;
}
.forward-preview-wrap{
  padding:16px 20px 6px!important;
}
.forward-preview-wrap small{
  display:block;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#9a720d;
  margin-bottom:6px;
}
.forward-preview{
  margin:0!important;
  border-radius:16px!important;
  background:#fff8e4!important;
  border:1px solid rgba(205,159,54,.24)!important;
  border-left:4px solid #c89b2b!important;
  padding:12px 14px!important;
  color:#3d3117!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
}
.forward-search-wrap{
  margin:12px 20px 10px!important;
  position:relative!important;
}
.forward-search-wrap svg{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  fill:none;
  stroke:#9a720d;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.78;
}
.forward-search{
  margin:0!important;
  width:100%!important;
  height:44px!important;
  border-radius:14px!important;
  border:1px solid #eadfca!important;
  padding:0 14px 0 42px!important;
  background:#fff!important;
  outline:none!important;
  font-size:13px!important;
}
.forward-search:focus{
  border-color:#c89b2b!important;
  box-shadow:0 0 0 4px rgba(200,155,43,.12)!important;
}
.forward-list.premium-forward-list{
  padding:0 20px 14px!important;
  max-height:360px!important;
  overflow:auto!important;
  gap:8px!important;
}
.forward-destination{
  border-radius:16px!important;
  padding:11px 12px!important;
  border:1px solid rgba(42,31,8,.07)!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(32,24,10,.045)!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  position:relative!important;
}
.forward-destination:hover{
  background:#fff8e4!important;
  border-color:rgba(200,155,43,.35)!important;
  transform:translateY(-1px)!important;
}
.forward-radio{
  margin-left:auto;
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid #d8c69a;
  background:#fff;
  flex:0 0 auto;
}
.forward-destination:hover .forward-radio{
  border-color:#c89b2b;
  box-shadow:0 0 0 4px rgba(200,155,43,.12);
}
.forward-foot{
  padding:12px 20px 18px!important;
  border-top:1px solid rgba(198,151,33,.14)!important;
  background:#fffaf0!important;
  color:#80672f!important;
  font-size:12px!important;
  text-align:center!important;
}

/* ===== PATCH V1.8.8 - Ícones fixar/encaminhar alinhados lado a lado ===== */
.bubble{
  position:relative!important;
  overflow:visible!important;
  padding-right:44px!important;
}
.message-actions{
  position:absolute!important;
  top:-17px!important;
  right:10px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  width:auto!important;
  min-width:auto!important;
  height:38px!important;
  padding:4px 6px!important;
  border:1px solid rgba(210,174,75,.24)!important;
  background:rgba(255,255,255,.96)!important;
  border-radius:999px!important;
  box-shadow:0 10px 24px rgba(32,24,10,.13)!important;
  opacity:0!important;
  transform:translateY(4px) scale(.98)!important;
  transition:.16s ease!important;
  z-index:20!important;
  pointer-events:none!important;
}
.bubble:hover .message-actions,
.msg-row:hover .message-actions,
.msg-row.is-pinned .message-actions{
  opacity:1!important;
  transform:translateY(0) scale(1)!important;
  pointer-events:auto!important;
}
.message-actions .pin-msg-btn,
.message-actions .forward-msg-btn,
.pin-msg-btn,
.forward-msg-btn{
  position:relative!important;
  top:auto!important;
  right:auto!important;
  left:auto!important;
  bottom:auto!important;
  inset:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#9a720d!important;
  box-shadow:none!important;
  opacity:1!important;
  transform:none!important;
  cursor:pointer!important;
  transition:.14s ease!important;
}
.message-actions .pin-msg-btn svg,
.message-actions .forward-msg-btn svg,
.pin-msg-btn svg,
.forward-msg-btn svg{
  width:16px!important;
  height:16px!important;
  display:block!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.message-actions .pin-msg-btn:hover,
.message-actions .forward-msg-btn:hover,
.pin-msg-btn:hover,
.forward-msg-btn:hover{
  background:linear-gradient(135deg,#fff7df,#f4d879)!important;
  color:#5f450f!important;
  transform:translateY(-1px)!important;
}


/* PATCH V1.8.9 - Nova conversa e busca premium */
.new-conversation-modal{align-items:center;justify-content:center;}
.new-conversation-card{
  width:min(560px, calc(100vw - 34px));
  max-height:86vh;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border:1px solid rgba(196,145,24,.32);
  border-radius:22px;
  background:linear-gradient(180deg,#fffdf8 0%,#ffffff 100%);
  box-shadow:0 24px 70px rgba(82,58,10,.22);
}
.new-conversation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(196,145,24,.18);padding-bottom:12px;}
.new-conversation-head strong{display:block;font-size:20px;color:#1d1a16;}
.new-conversation-head span{display:block;font-size:13px;color:#8a6b23;margin-top:3px;}
.icon-only{border:0;background:#fff7e6;color:#9b6b00;border-radius:12px;width:34px;height:34px;font-size:20px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(196,145,24,.2);}
.new-conversation-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.new-conversation-card label,.full-label{font-size:12px;font-weight:800;color:#8a6b23;text-transform:uppercase;letter-spacing:.04em;}
.new-conversation-card input,.new-conversation-card select{
  width:100%;margin-top:6px;height:42px;border:1px solid rgba(196,145,24,.25);border-radius:14px;background:#fff;color:#2a2418;padding:0 12px;outline:none;
}
.new-conversation-card input:focus,.new-conversation-card select:focus{border-color:#c99612;box-shadow:0 0 0 4px rgba(201,150,18,.10);}
.new-conversation-search{height:44px;border:1px solid rgba(196,145,24,.24);border-radius:16px;background:#fff;display:flex;align-items:center;gap:10px;padding:0 12px;}
.new-conversation-search svg{width:18px;height:18px;stroke:#b88700;fill:none;stroke-width:2;}
.new-conversation-search input{border:0;box-shadow:none;margin:0;padding:0;height:auto;}
.new-conversation-search input:focus{box-shadow:none;}
.new-conversation-list{overflow:auto;min-height:120px;max-height:280px;padding-right:4px;display:flex;flex-direction:column;gap:8px;}
.new-contact-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:1px solid rgba(196,145,24,.13);background:#fff;border-radius:16px;padding:10px;cursor:pointer;transition:.16s ease;}
.new-contact-row:hover{border-color:rgba(196,145,24,.45);background:#fffaf0;transform:translateY(-1px);}
.new-contact-row span{display:flex;flex-direction:column;gap:2px;min-width:0;}
.new-contact-row strong{font-size:14px;color:#171717;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.new-contact-row small{font-size:12px;color:#7a6a4f;}
.new-conversation-actions{border-top:1px solid rgba(196,145,24,.16);padding-top:12px;margin-top:0;}
.new-conversation-actions .gold-action{background:linear-gradient(180deg,#d5ac2f,#b8860b);color:white;border:0;border-radius:14px;padding:11px 18px;font-weight:900;box-shadow:0 10px 25px rgba(184,134,11,.22);}
.empty-state.small{font-size:13px;padding:18px;text-align:center;border:1px dashed rgba(196,145,24,.26);border-radius:16px;background:#fffaf1;color:#8a6b23;}
@media(max-width:720px){.new-conversation-grid{grid-template-columns:1fr}.new-conversation-card{max-height:92vh}}

/* PATCH V1.8.10 - mídia válida sem nova aba + ignorar placeholders inválidos */
.media-viewer-trigger{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  display:inline-block;
  cursor:pointer;
  text-align:left;
  font:inherit;
  color:inherit;
}
.media-image-trigger,.media-video-trigger{position:relative;border-radius:14px;overflow:hidden;box-shadow:0 8px 18px rgba(66,46,10,.08)}
.media-video-trigger .chat-video{pointer-events:none;display:block}
.media-play{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:42px;height:42px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.92);color:#a67900;font-weight:900;
  box-shadow:0 8px 24px rgba(0,0,0,.18)
}
button.chat-file.media-viewer-trigger{
  border:1px solid rgba(196,151,62,.22);
  background:rgba(196,151,62,.10);
  color:#5f471a;
}
.media-viewer-modal{align-items:center;justify-content:center;background:rgba(24,18,8,.45);backdrop-filter:blur(3px)}
.media-viewer-card{
  width:min(920px,92vw);
  height:min(760px,88vh);
  background:#fffdf8;
  border:1px solid rgba(197,153,44,.35);
  border-radius:22px;
  box-shadow:0 28px 80px rgba(35,25,8,.28);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.media-viewer-head{
  height:58px;min-height:58px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 18px 0 22px;
  border-bottom:1px solid rgba(197,153,44,.22);
  background:linear-gradient(180deg,#fffaf0,#fffdf8);
}
.media-viewer-head strong{font-size:15px;color:#21180b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:65vw}
.media-viewer-head>div{display:flex;gap:8px;align-items:center}
.media-download{
  display:inline-flex;align-items:center;justify-content:center;
  height:34px;padding:0 14px;border-radius:999px;
  border:1px solid rgba(197,153,44,.42);
  color:#8d6806;text-decoration:none;font-weight:800;font-size:12px;
  background:#fff8e6;
}
.media-viewer-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#fffaf2;overflow:auto}
.media-viewer-body img{max-width:100%;max-height:100%;object-fit:contain;border-radius:14px;box-shadow:0 12px 30px rgba(40,28,8,.16)}
.media-viewer-body video{max-width:100%;max-height:100%;border-radius:14px;background:#111;box-shadow:0 12px 30px rgba(40,28,8,.16)}
.media-viewer-body audio{width:min(620px,90%)}
.media-viewer-body iframe{width:100%;height:100%;border:0;border-radius:14px;background:#fff;box-shadow:0 12px 30px rgba(40,28,8,.10)}
.media-doc-preview{display:flex;flex-direction:column;align-items:center;gap:10px;color:#654c12;text-align:center;padding:30px}
.media-doc-preview div{width:72px;height:72px;border-radius:22px;display:flex;align-items:center;justify-content:center;background:#fff4d8;border:1px solid rgba(197,153,44,.35);font-size:32px}
.media-doc-preview strong{font-size:16px;color:#241b0d}
.media-doc-preview span{font-size:13px;color:#7d6c4d}

/* ===== PATCH V1.8.11 - Visualizador de mídia com zoom/galeria + remove barra vermelha status ===== */
/* remove a barrinha vermelha superior da aba Aguardando quando houver atraso */
.status-tabs-modern .filter.has-overdue::before{display:none!important;}

.media-viewer-modal{
  align-items:center!important;
  justify-content:center!important;
  background:rgba(8,8,8,.64)!important;
  backdrop-filter:blur(6px)!important;
  z-index:9999!important;
}
.media-viewer-card.premium-media-viewer{
  width:min(880px,92vw)!important;
  max-width:92vw!important;
  max-height:90vh!important;
  display:grid!important;
  grid-template-rows:auto minmax(260px,1fr) auto!important;
  position:relative!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid rgba(212,175,55,.28)!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,#111,#070707)!important;
  box-shadow:0 32px 90px rgba(0,0,0,.48)!important;
  color:#fff!important;
}
.premium-media-viewer .media-viewer-head{
  min-height:58px!important;
  padding:12px 16px!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  gap:12px!important;
  align-items:center!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02))!important;
}
.media-viewer-counter{
  font-weight:900!important;
  color:#fff!important;
  background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:999px!important;
  padding:6px 10px!important;
  font-size:12px!important;
}
.premium-media-viewer #mediaViewerTitle{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:14px!important;
  color:#fff!important;
}
.media-viewer-tools{display:flex!important;align-items:center!important;gap:8px!important;}
.media-tool,.media-close{
  width:34px!important;
  height:34px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  font-weight:900!important;
  box-shadow:none!important;
}
.media-tool:hover,.media-close:hover{background:rgba(212,175,55,.26)!important;border-color:rgba(212,175,55,.55)!important;}
.media-zoom-label{min-width:48px;text-align:center;font-size:12px;font-weight:900;color:#fff;opacity:.9;}
.premium-media-viewer .media-download{
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  padding:0 13px!important;
  border:1px solid rgba(212,175,55,.45)!important;
  background:rgba(212,175,55,.14)!important;
  color:#f7df91!important;
  text-decoration:none!important;
  font-weight:900!important;
  font-size:12px!important;
}
.premium-media-viewer .media-viewer-body{
  min-height:0!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  overflow:auto!important;
  padding:18px 70px!important;
  background:#0a0a0a!important;
}
.media-stage{
  width:100%;
  height:100%;
  min-height:360px;
  display:grid;
  place-items:center;
  overflow:auto;
}
.zoomable-media{
  max-width:100%;
  max-height:64vh;
  object-fit:contain;
  border-radius:12px;
  transform-origin:center center;
  transition:transform .12s ease;
  box-shadow:0 18px 50px rgba(0,0,0,.30);
}
.media-stage video.zoomable-media{background:#000;}
.premium-media-viewer iframe{
  width:100%!important;
  height:62vh!important;
  border:0!important;
  border-radius:12px!important;
  background:#fff!important;
}
.media-nav{
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:48px!important;
  height:48px!important;
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  font-size:38px!important;
  line-height:1!important;
  z-index:4!important;
  box-shadow:0 10px 30px rgba(0,0,0,.28)!important;
}
.media-nav:hover{background:rgba(212,175,55,.26)!important;border-color:rgba(212,175,55,.55)!important;}
.media-prev{left:14px!important;}
.media-next{right:14px!important;}
.media-thumbs{
  min-height:96px!important;
  display:flex!important;
  gap:12px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:12px 18px 16px!important;
  overflow-x:auto!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
  background:linear-gradient(180deg,#0b0b0b,#111)!important;
}
.media-thumb{
  position:relative!important;
  width:76px!important;
  height:66px!important;
  flex:0 0 auto!important;
  border:2px solid transparent!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.08)!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  color:#fff!important;
}
.media-thumb img,.media-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
.media-thumb span{position:absolute;inset:auto auto 6px 6px;background:rgba(0,0,0,.58);border-radius:999px;padding:2px 6px;font-size:11px;}
.media-thumb b{font-size:24px;}
.media-thumb.active{border-color:#d4af37!important;box-shadow:0 0 0 3px rgba(212,175,55,.20)!important;}
.media-doc-preview{color:#fff!important;text-align:center!important;}
@media(max-width:900px){
  .premium-media-viewer .media-viewer-body{padding:14px 54px!important;}
  .media-viewer-tools{gap:5px!important;}
  .media-download{display:none!important;}
  .media-thumb{width:62px!important;height:54px!important;}
}


/* V1.8.12 - Galeria de mídia premium branco/dourado */
.status-tabs-modern .filter.has-overdue::before{display:none!important;}
.media-viewer-modal{
  align-items:center!important;
  justify-content:center!important;
  background:rgba(248,244,236,.72)!important;
  backdrop-filter:blur(7px)!important;
}
.media-viewer-card.premium-media-viewer{
  width:min(980px,92vw)!important;
  height:min(720px,88vh)!important;
  background:#fffdf8!important;
  border:1px solid rgba(202,161,28,.32)!important;
  border-radius:24px!important;
  overflow:hidden!important;
  box-shadow:0 28px 80px rgba(64,45,8,.22)!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
}
.premium-media-viewer .media-viewer-head{
  height:62px!important;
  padding:0 18px!important;
  background:linear-gradient(180deg,#fff,#fffaf0)!important;
  border-bottom:1px solid rgba(202,161,28,.18)!important;
  color:#271f0c!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
}
.premium-media-viewer .media-viewer-counter{
  min-width:58px!important;
  height:30px!important;
  border-radius:999px!important;
  background:#fff3cf!important;
  border:1px solid rgba(202,161,28,.30)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#8a6100!important;
  font-size:12px!important;
  font-weight:900!important;
}
.premium-media-viewer .media-viewer-head strong{
  flex:1!important;
  color:#1f1a0f!important;
  font-size:15px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.premium-media-viewer .media-viewer-tools{display:flex!important;align-items:center!important;gap:8px!important;}
.premium-media-viewer .media-tool,
.premium-media-viewer .media-close{
  width:34px!important;
  height:34px!important;
  border:1px solid rgba(202,161,28,.28)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#9a6d00!important;
  display:grid!important;
  place-items:center!important;
  font-weight:900!important;
  box-shadow:0 8px 18px rgba(64,45,8,.08)!important;
}
.premium-media-viewer .media-tool:hover,
.premium-media-viewer .media-close:hover{background:#fff5d8!important;border-color:#caa11c!important;}
.premium-media-viewer .media-zoom-label{min-width:48px;text-align:center;font-size:12px;font-weight:900;color:#8a6100!important;}
.premium-media-viewer .media-download{
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  padding:0 13px!important;
  border:1px solid rgba(202,161,28,.35)!important;
  background:linear-gradient(135deg,#d5ad29,#b98600)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-weight:900!important;
  font-size:12px!important;
}
.premium-media-viewer .media-viewer-body{
  min-height:0!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  overflow:auto!important;
  padding:18px 70px!important;
  background:#fffaf0!important;
}
.premium-media-viewer .media-stage{
  width:100%;
  height:100%;
  min-height:360px;
  display:grid;
  place-items:center;
  overflow:auto;
}
.premium-media-viewer .zoomable-media{
  max-width:100%;
  max-height:62vh;
  object-fit:contain;
  border-radius:14px;
  transform-origin:center center;
  transition:transform .12s ease;
  box-shadow:0 16px 42px rgba(59,41,9,.18);
  background:#fff;
}
.premium-media-viewer video.zoomable-media{background:#111;}
.premium-media-viewer iframe{
  width:100%!important;
  height:60vh!important;
  border:1px solid rgba(202,161,28,.22)!important;
  border-radius:14px!important;
  background:#fff!important;
}
.premium-media-viewer .media-nav{
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:48px!important;
  height:48px!important;
  border-radius:999px!important;
  border:1px solid rgba(202,161,28,.28)!important;
  background:#fff!important;
  color:#a07000!important;
  display:grid!important;
  place-items:center!important;
  font-size:38px!important;
  line-height:1!important;
  z-index:4!important;
  box-shadow:0 12px 30px rgba(60,43,10,.14)!important;
}
.premium-media-viewer .media-nav:hover{background:#fff4d6!important;border-color:#caa11c!important;}
.premium-media-viewer .media-prev{left:14px!important;}
.premium-media-viewer .media-next{right:14px!important;}
.premium-media-viewer .media-thumbs{
  min-height:96px!important;
  display:flex!important;
  gap:12px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:12px 18px 16px!important;
  overflow-x:auto!important;
  border-top:1px solid rgba(202,161,28,.16)!important;
  background:#fffdf8!important;
}
.premium-media-viewer .media-thumb{
  position:relative!important;
  width:76px!important;
  height:66px!important;
  flex:0 0 auto!important;
  border:2px solid transparent!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:#fff6df!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  color:#8a6100!important;
  box-shadow:0 8px 18px rgba(64,45,8,.08)!important;
}
.premium-media-viewer .media-thumb img,
.premium-media-viewer .media-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
.premium-media-viewer .media-thumb span{position:absolute;inset:auto auto 6px 6px;background:rgba(0,0,0,.58);color:#fff;border-radius:999px;padding:2px 6px;font-size:11px;}
.premium-media-viewer .media-thumb b{font-size:24px;}
.premium-media-viewer .media-thumb.active{border-color:#caa11c!important;box-shadow:0 0 0 3px rgba(202,161,28,.18)!important;}
.premium-media-viewer .media-doc-preview{color:#5e470d!important;text-align:center!important;}
@media(max-width:900px){
  .premium-media-viewer .media-viewer-body{padding:14px 54px!important;}
  .premium-media-viewer .media-viewer-tools{gap:5px!important;}
  .premium-media-viewer .media-download{display:none!important;}
  .premium-media-viewer .media-thumb{width:62px!important;height:54px!important;}
}


/* ===== PATCH V1.8.13 - Viewer grande com rolagem interna real ===== */
.media-viewer-modal{
  align-items:center!important;
  justify-content:center!important;
  padding:12px!important;
  overflow:hidden!important;
}
.media-viewer-card.premium-media-viewer{
  width:calc(100vw - 32px)!important;
  height:calc(100vh - 32px)!important;
  max-width:none!important;
  max-height:none!important;
  border-radius:22px!important;
}
.premium-media-viewer .media-viewer-head{
  height:60px!important;
  min-height:60px!important;
  flex:0 0 60px!important;
}
.premium-media-viewer .media-viewer-body{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  display:block!important;
  padding:16px 74px!important;
  overflow:hidden!important;
  background:#fffaf0!important;
}
.premium-media-viewer .media-stage{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#fffaf0,#fff7e8)!important;
}
.premium-media-viewer .zoomable-media{
  max-width:100%!important;
  max-height:100%!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  transform:none!important;
  transform-origin:center center!important;
  flex:0 0 auto!important;
}
.premium-media-viewer iframe{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}
.premium-media-viewer .media-thumbs{
  min-height:88px!important;
  flex:0 0 88px!important;
  padding:10px 18px!important;
}
.premium-media-viewer .media-thumb{
  width:72px!important;
  height:58px!important;
}
.premium-media-viewer .media-nav{
  z-index:8!important;
}
@media(max-width:900px){
  .media-viewer-card.premium-media-viewer{width:calc(100vw - 16px)!important;height:calc(100vh - 16px)!important;border-radius:16px!important;}
  .premium-media-viewer .media-viewer-body{padding:12px 56px!important;}
  .premium-media-viewer .media-viewer-head{height:56px!important;min-height:56px!important;flex-basis:56px!important;padding:0 10px!important;}
}


/* ===== PATCH V1.8.15 - Zoom por scroll do mouse no viewer ===== */
.media-viewer-modal:not(.hidden){
  overflow:hidden!important;
}
.premium-media-viewer .media-viewer-body,
.premium-media-viewer .media-stage{
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable both-edges;
}
.premium-media-viewer .media-stage{
  cursor:zoom-in;
}
.premium-media-viewer .zoomable-media.is-zoomed{
  cursor:grab;
}
.premium-media-viewer .media-stage:active .zoomable-media.is-zoomed{
  cursor:grabbing;
}


/* ===== PATCH V1.8.18 - Correção final do zoom com scroll do mouse ===== */
.premium-media-viewer .media-viewer-body{
  overflow:hidden!important;
}
.premium-media-viewer .media-stage{
  overflow:auto!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  padding:32px!important;
  position:relative!important;
  overscroll-behavior:contain!important;
}
.premium-media-viewer .zoomable-media{
  max-width:none!important;
  max-height:none!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  transform-origin:center center!important;
  flex:0 0 auto!important;
  margin:auto!important;
  cursor:zoom-in!important;
  will-change:transform!important;
}
.premium-media-viewer .zoomable-media.is-zoomed{
  cursor:grab!important;
}
.premium-media-viewer video.zoomable-media{
  min-width:320px!important;
}

/* ===== PATCH V1.8.19 - Zoom real por scroll e botões ===== */
body.media-viewer-open{
  overflow:hidden!important;
}
.media-viewer-modal:not(.hidden){
  overflow:hidden!important;
}
.premium-media-viewer .media-viewer-body{
  overflow:hidden!important;
  min-height:0!important;
}
.premium-media-viewer .media-stage{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  display:block!important;
  padding:0!important;
  overscroll-behavior:contain!important;
  background:linear-gradient(180deg,#fffaf0,#fff7e8)!important;
  cursor:zoom-in!important;
}
.premium-media-viewer .media-zoom-canvas{
  min-width:100%!important;
  min-height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:36px!important;
  box-sizing:border-box!important;
}
.premium-media-viewer .zoomable-media{
  flex:0 0 auto!important;
  max-width:none!important;
  max-height:none!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  transform:none!important;
  transform-origin:center center!important;
  will-change:width,height!important;
  margin:0!important;
  cursor:zoom-in!important;
  user-select:none!important;
}
.premium-media-viewer .zoomable-media.is-zoomed{
  cursor:grab!important;
}
.premium-media-viewer .media-stage:active .zoomable-media.is-zoomed{
  cursor:grabbing!important;
}


/* ===== PATCH V1.8.20 - Viewer: scroll mais largo, sem botões +/- e arrastar com mãozinha ===== */
.premium-media-viewer .media-stage{
  scrollbar-width:auto!important;
  cursor:grab!important;
}
.premium-media-viewer .media-stage::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
}
.premium-media-viewer .media-stage::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#d4af37,#a97705)!important;
  border-radius:999px!important;
  border:3px solid #fff7e8!important;
}
.premium-media-viewer .media-stage::-webkit-scrollbar-track{
  background:#fff1d2!important;
  border-radius:999px!important;
}
.premium-media-viewer .zoomable-media{
  cursor:zoom-in!important;
}
.premium-media-viewer .zoomable-media.is-zoomed{
  cursor:grab!important;
}
.premium-media-viewer .media-stage.is-panning,
.premium-media-viewer .media-stage.is-panning .zoomable-media{
  cursor:grabbing!important;
}
.premium-media-viewer #mediaZoomIn,
.premium-media-viewer #mediaZoomOut{
  display:none!important;
}
.premium-media-viewer .media-zoom-label{
  min-width:54px!important;
  background:#fff8e8!important;
  color:#8a6100!important;
  border:1px solid rgba(202,161,28,.28)!important;
  border-radius:999px!important;
  padding:7px 10px!important;
}


/* Botão temporário de debug: limpar cards */
.clear-cards-btn{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  width:auto!important;
  min-width:auto!important;
  height:34px!important;
  padding:0 11px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.16)!important;
  border:1px solid rgba(255,255,255,.32)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  transition:.18s ease!important;
}
.clear-cards-btn svg{
  width:16px!important;
  height:16px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.clear-cards-btn:hover{
  background:rgba(255,255,255,.26)!important;
  transform:translateY(-1px);
}
.clear-cards-btn span{
  display:inline-block!important;
  white-space:nowrap!important;
}
@media(max-width:980px){.clear-cards-btn span{display:none!important}.clear-cards-btn{width:34px!important;padding:0!important;justify-content:center!important}}

/* ===== PATCH V1.8.24 - Lista de conversas unificada, sem bordas entre cards ===== */
.ticket-list{
  background:#fff!important;
  padding:4px 8px 12px!important;
}
.ticket{
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
  min-height:78px!important;
  padding:12px 12px!important;
  position:relative!important;
  transition:background .16s ease, box-shadow .16s ease, transform .16s ease!important;
}
.ticket + .ticket{
  margin-top:0!important;
}
.ticket:hover{
  background:#fffaf0!important;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.10)!important;
}
.ticket.active{
  background:linear-gradient(90deg,#fff7df 0%,#fff 72%)!important;
  border:0!important;
  border-left:4px solid #d4af37!important;
  padding-left:8px!important;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.16)!important;
}
.ticket.ticket-pinned{
  background:linear-gradient(90deg,#fff7df 0%,#fff 76%)!important;
  box-shadow:inset 4px 0 0 #d4af37!important;
}
.ticket.timer-overdue{
  background:linear-gradient(90deg,#fff1f1 0%,#fff 76%)!important;
  border:0!important;
  border-left:4px solid #dc2626!important;
  padding-left:8px!important;
  box-shadow:inset 0 0 0 1px rgba(220,38,38,.14)!important;
}
.ticket.timer-overdue.active{
  background:linear-gradient(90deg,#ffecec 0%,#fff 76%)!important;
  border-left-color:#dc2626!important;
}
@keyframes lateCardBlink{
  0%,100%{background:linear-gradient(90deg,#fff1f1 0%,#fff 76%)!important;box-shadow:inset 0 0 0 1px rgba(220,38,38,.12)!important;}
  50%{background:linear-gradient(90deg,#ffe2e2 0%,#fff 76%)!important;box-shadow:inset 0 0 0 1px rgba(220,38,38,.24)!important;}
}
.ticket:first-child{
  border-top-left-radius:16px!important;
  border-top-right-radius:16px!important;
}
.ticket:last-child{
  border-bottom-left-radius:16px!important;
  border-bottom-right-radius:16px!important;
}
.ticket:not(:last-child)::after{
  content:"";
  position:absolute;
  left:70px;
  right:12px;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg,rgba(212,175,55,.10),rgba(212,175,55,.03));
  pointer-events:none;
}
.ticket.active::after,
.ticket.timer-overdue::after{
  display:none!important;
}

/* Reações de emoji nas mensagens - CRM StarNails */
.message-actions{
  gap: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}
.message-actions .react-msg-btn,
.react-msg-btn{
  width: 28px;
  height: 28px;
  border: 1px solid rgba(192,147,55,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #7d5d18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(60,43,10,.10);
  transition: .18s ease;
}
.message-actions .react-msg-btn svg,
.react-msg-btn svg{
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.message-actions .react-msg-btn:hover,
.react-msg-btn:hover{
  background: #fff4d6;
  color: #5f450f;
  transform: translateY(-1px);
}
.msg-reaction-badge{
  position: absolute;
  bottom: -13px;
  left: 14px;
  min-width: 28px;
  height: 23px;
  padding: 0 7px;
  border: 1px solid rgba(192,147,55,.28);
  border-radius: 999px;
  background: #fffdf8;
  box-shadow: 0 7px 16px rgba(68,49,9,.12);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}
.msg-row.me .msg-reaction-badge{ left: auto; right: 14px; }
.bubble:has(.msg-reaction-badge){ margin-bottom: 12px; }
.reaction-picker{
  position: fixed;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(191,148,49,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 50px rgba(60,44,12,.18);
  backdrop-filter: blur(12px);
}
.reaction-picker button{
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: .16s ease;
}
.reaction-picker button:hover{
  background: #fff2c9;
  transform: translateY(-2px) scale(1.08);
}
.reaction-picker .reaction-clear{
  color: #8a6a18;
  font-size: 18px;
  background: #fff7df;
  border: 1px solid rgba(191,148,49,.24);
}

/* Patch V1.8.29 - encaminhamento de mídias */
.forward-preview .forward-media-preview{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
}
.forward-preview .forward-media-preview img{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(201,164,92,.35);
  background:#fff;
}
.forward-preview .forward-media-preview span{
  font-weight:700;
  color:#5f4a20;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.forward-file-icon{
  width:54px;
  height:54px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#fff7e6,#f2deb2);
  border:1px solid rgba(201,164,92,.35);
  color:#9a6b18;
  font-size:22px;
  flex:0 0 auto;
}


/* PATCH V1.8.30 - mídias estilo WhatsApp: balão compacto e miniatura maior */
.msg-row:has(.media-viewer-trigger),
.msg-row:has(.chat-audio){
  max-width:min(82%, 430px);
}
.msg-row:has(.media-viewer-trigger) .bubble,
.msg-row:has(.chat-audio) .bubble{
  padding:4px 4px 19px!important;
  border-radius:15px!important;
  overflow:visible!important;
  box-shadow:0 4px 12px rgba(65,42,6,.10)!important;
  border:1px solid rgba(225,199,142,.58)!important;
  line-height:1.25!important;
  min-width:120px;
  max-width:100%;
}
.msg-row.me:has(.media-viewer-trigger) .bubble,
.msg-row.me:has(.chat-audio) .bubble{
  background:#f7dfaa!important;
  border-color:rgba(209,169,72,.72)!important;
}
.media-viewer-trigger.media-image-trigger,
.media-viewer-trigger.media-video-trigger{
  display:block!important;
  width:100%!important;
  max-width:360px!important;
  padding:0!important;
  margin:0!important;
  border-radius:13px!important;
  overflow:hidden!important;
  box-shadow:none!important;
  background:#f7f0e4!important;
}
.chat-image,
.chat-video{
  width:100%!important;
  max-width:360px!important;
  max-height:430px!important;
  min-width:220px!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:13px!important;
  box-shadow:none!important;
  background:#f7f0e4!important;
}
.chat-sticker{
  width:auto!important;
  max-width:190px!important;
  max-height:190px!important;
  border-radius:13px!important;
  display:block!important;
  padding:4px!important;
  background:transparent!important;
}
.media-caption{
  margin:6px 5px 0!important;
  padding:0 2px!important;
  font-size:14px!important;
  color:#1f2937!important;
  line-height:1.35!important;
  white-space:pre-wrap!important;
  word-break:break-word!important;
}
.msg-row:has(.media-viewer-trigger) .time,
.msg-row:has(.chat-audio) .time{
  position:absolute!important;
  right:9px!important;
  bottom:4px!important;
  margin:0!important;
  padding:1px 5px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.68)!important;
  color:#7b6a4b!important;
  font-size:10.5px!important;
  line-height:1.35!important;
}
.msg-row.me:has(.media-viewer-trigger) .time,
.msg-row.me:has(.chat-audio) .time{
  background:rgba(255,246,220,.76)!important;
}
.msg-row:has(.media-viewer-trigger) .message-sender{
  margin:4px 6px 6px!important;
  color:#9a0063!important;
  font-size:12px!important;
  font-weight:800!important;
}
.msg-row:has(.media-viewer-trigger) .message-actions,
.msg-row:has(.chat-audio) .message-actions{
  top:-18px!important;
  right:6px!important;
}
.chat-file.media-viewer-trigger{
  width:300px!important;
  max-width:100%!important;
  min-height:56px!important;
  justify-content:flex-start!important;
  border-radius:13px!important;
  padding:12px!important;
  margin:0!important;
  background:#fff8e8!important;
  border:1px solid rgba(203,166,83,.42)!important;
  color:#4b3510!important;
  box-shadow:none!important;
}
.chat-file.media-viewer-trigger span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.media-audio-wrap{
  width:310px;
  max-width:100%;
  padding:6px 8px 2px;
}
.chat-audio{
  width:100%!important;
  max-width:100%!important;
  display:block!important;
}
@media(max-width:760px){
  .msg-row:has(.media-viewer-trigger),.msg-row:has(.chat-audio){max-width:92%;}
  .chat-image,.chat-video,.media-viewer-trigger.media-image-trigger,.media-viewer-trigger.media-video-trigger{max-width:300px!important;min-width:180px!important;max-height:360px!important;}
  .chat-file.media-viewer-trigger,.media-audio-wrap{width:260px!important;}
}


/* PATCH V1.8.35 - contador visível em Grupos/Canais */
.status-tabs-modern .filter[data-filter="grupos_canais"] #countGroups,
.filter[data-filter="grupos_canais"] #countGroups{
  display:grid!important;
  place-items:center!important;
  opacity:1!important;
  visibility:visible!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 5px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#d4af37,#a97705)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  position:absolute!important;
  top:12px!important;
  right:14px!important;
  box-shadow:0 6px 14px rgba(169,119,5,.22)!important;
  z-index:3!important;
}

/* ===== PATCH V1.8.38 - Padroniza contador de Grupos/Canais ===== */
.status-tabs-modern .filter #countGroups,
.status-tabs-modern .filter .group-counter,
.status-tabs-modern .filter b#countGroups{
  position:absolute!important;
  top:12px!important;
  right:14px!important;
  min-width:18px!important;
  height:18px!important;
  padding:0 5px!important;
  border-radius:999px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:800!important;
  font-family:inherit!important;
  letter-spacing:0!important;
  box-sizing:border-box!important;
}

/* PATCH V1.8.42 - Itens fixados fixos no topo do chat */
.pinned-messages-panel{
  flex:0 0 auto;
  background:linear-gradient(135deg,#fffaf0,#ffffff);
  border-bottom:1px solid rgba(212,175,55,.32);
  box-shadow:0 8px 22px rgba(66,48,8,.08);
  padding:8px 14px 10px;
  z-index:5;
}
.pinned-messages-panel.hidden{display:none!important;}
.pinned-panel-title{
  display:flex;
  align-items:center;
  gap:7px;
  max-width:860px;
  margin:0 auto 6px;
  color:#8a6100;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.pinned-panel-list{
  max-width:860px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:116px;
  overflow:auto;
  padding-right:4px;
}
.pinned-messages-panel .pinned-message-bar{
  position:relative!important;
  top:auto!important;
  z-index:auto!important;
  width:100%;
  max-width:none;
  margin:0!important;
  cursor:pointer;
  text-align:left;
  border:1px solid rgba(212,175,55,.35);
  border-left:4px solid #d4af37;
  border-radius:12px;
  padding:8px 10px;
  background:#fffdf8;
  box-shadow:none;
}
.pinned-messages-panel .pinned-message-bar:hover{background:#fff8e8;}
.pinned-messages-panel .pin-icon{
  width:30px;
  height:30px;
  border-radius:10px;
}
.pinned-messages-panel .pin-text strong{
  font-size:13px;
  color:#5f4300;
  text-transform:none;
  letter-spacing:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pinned-messages-panel .pin-text span{font-size:12px;color:#6b7280;}
.pinned-messages-panel .unpin-message-btn{
  flex:0 0 28px;
  width:28px;
  height:28px;
}

/* PATCH V1.8.43 - Ícones padronizados de mídia/fixar */
.modern-paperclip-icon,
.modern-pin-icon{
  width:16px;
  height:16px;
  display:inline-block;
  vertical-align:middle;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}
.chat-file{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
}
.pin-ticket-btn .modern-pin-icon,
.pin-indicator .modern-pin-icon,
.pinned-panel-title .modern-pin-icon,
.pin-icon .modern-pin-icon{
  width:15px;
  height:15px;
}
.pin-ticket-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.pin-indicator{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* Patch V1_8_47 - checks no padrão visual do WhatsApp */
.time{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  gap:5px!important;
  line-height:1!important;
}
.msg-status{
  display:inline-flex;
  align-items:flex-end;
  justify-content:center;
  vertical-align:baseline;
  margin-left:0;
  min-width:14px;
  height:13px;
  line-height:1;
  color:#9da0a3;
  flex:0 0 auto;
}
.msg-status .msg-check{
  width:13px;
  height:13px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2.15;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.msg-checks-double{
  display:inline-flex;
  align-items:flex-end;
  gap:0;
  width:18px;
  height:13px;
  overflow:visible;
}
.msg-checks-double .msg-check + .msg-check{
  margin-left:-7px;
}
.msg-status.sent{ color:#9da0a3; min-width:13px; }
.msg-status.delivered{ color:#9da0a3; }
.msg-status.read{ color:#34b7f1; }
.msg-status.pending{
  width:auto;
  min-width:0;
  height:auto;
  font-style:italic;
  font-size:11px;
  color:#b8860b;
  align-items:center;
}

/* V1.8.61 - Presença discreta no topo do chat */
.presence-status{
  display:inline;
  margin-left:0;
  padding:0;
  border:0;
  background:transparent;
  border-radius:0;
  font-size:12px;
  font-weight:700;
  line-height:1.25;
  white-space:nowrap;
}
.presence-status::before{content:none}
.presence-status.presence-online{color:#169447;background:transparent;border:0}
.presence-status.presence-typing{color:#0f8f62;background:transparent;border:0;animation:typingPulse 1.2s ease-in-out infinite}
.presence-status.presence-recording{color:#b77900;background:transparent;border:0;animation:typingPulse 1.2s ease-in-out infinite}
.presence-status.presence-lastseen{color:#6b7280;background:transparent;border:0;font-weight:650}
@keyframes typingPulse{0%,100%{opacity:.72}50%{opacity:1}}

/* PATCH V1_8_68 - estabiliza menu de anexos no hover */
.modern-attach{
  position:relative;
}
.modern-attach::before{
  content:"";
  position:absolute;
  left:-10px;
  right:-14px;
  bottom:38px;
  height:22px;
  z-index:19;
}
.modern-attach .modern-attach-pop,
.attach-menu .attach-pop{
  display:block;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(6px);
  transition:opacity .16s ease, transform .16s ease, visibility 0s linear .18s;
}
.modern-attach:hover .modern-attach-pop,
.modern-attach:focus-within .modern-attach-pop,
.modern-attach.open .modern-attach-pop,
.attach-menu:hover .attach-pop,
.attach-menu:focus-within .attach-pop,
.attach-menu.open .attach-pop{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
  transition-delay:0s;
}
.modern-attach-pop:hover{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}


.chat-tools .chat-finish-btn{width:auto!important;min-width:0!important;height:36px!important;border-radius:999px!important;padding:0 13px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;border:1px solid #d4af37!important;background:#fff8e6!important;color:#8a6100!important;font-size:12px!important;font-weight:900!important;white-space:nowrap!important;box-shadow:0 4px 12px rgba(66,48,8,.04)!important}
.chat-tools .chat-finish-btn:hover{background:#fff1cf!important;color:#765000!important;border-color:#bd8e00!important;transform:translateY(-1px)}

/* Patch V1_8_77 - etiquetas discretas com criação manual e cor */
.tag-card .selected-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px}
.colored-tag{--tag-color:#d4af37;background:color-mix(in srgb,var(--tag-color) 14%,#fff 86%)!important;border-color:color-mix(in srgb,var(--tag-color) 62%,#fff 38%)!important;color:#4d3900!important}
.colored-tag::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--tag-color);box-shadow:0 0 0 2px rgba(255,255,255,.8);margin-right:2px}
.tag-add-subtle{border:0;background:transparent;color:#9b7200;font-size:12px;font-weight:800;padding:5px 2px;cursor:pointer;text-decoration:none;opacity:.82}
.tag-add-subtle:hover{opacity:1;text-decoration:underline}
.new-tag-panel{margin-top:8px;border:1px solid #f0e3c8;background:#fffdf8;border-radius:12px;padding:9px;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
.new-tag-input{height:34px;border:1px solid #eadfca;border-radius:10px;background:#fff;padding:0 10px;color:#2f2f2f;outline:none;font-size:13px;min-width:0}
.new-tag-input:focus{border-color:#d4af37;box-shadow:0 0 0 3px rgba(212,175,55,.12)}
.tag-color-field{height:34px;border:1px solid #eadfca;border-radius:10px;background:#fff;padding:0 7px;display:flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:#8a6100}
.tag-color-field input[type="color"]{width:28px;height:24px;padding:0;border:0;background:transparent;cursor:pointer}
.new-tag-actions{grid-column:1/-1;display:flex;gap:7px;justify-content:flex-end;align-items:center}
.tag-cancel-btn{border:1px solid #eadfca;background:#fff;color:#7a6a4a;border-radius:8px;padding:7px 10px;font-weight:800;font-size:12px;cursor:pointer}
.tag-cancel-btn:hover{border-color:#d4af37;color:#8a6100;background:#fffaf0}
@supports not (color: color-mix(in srgb,#000,#fff)){
  .colored-tag{background:#fff4da!important;border-color:#e6c96b!important}
}

/* PATCH V1_8_81 - Etiquetas globais premium */
.global-tags-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.global-tag-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #f0e3c8;background:#fffdf8;border-radius:14px;padding:10px 12px}.global-tag-row>div:first-child{display:flex;align-items:center;gap:9px;min-width:0}.tag-color-dot{width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 3px #fff,0 0 0 4px rgba(212,175,55,.25);flex:0 0 auto}.tag-row-actions{display:flex;align-items:center;gap:6px}.tag-row-actions button{border:1px solid #eadfca;background:#fff;border-radius:9px;color:#7a5500;font-weight:800;font-size:12px;padding:6px 9px;cursor:pointer}.tag-row-actions button:hover{border-color:#d4af37;background:#fff7e5}.global-tag-form label{display:block;font-size:12px;font-weight:800;color:#6b5a2c;margin:10px 0 7px}.global-tag-form input:not([type="hidden"]){width:100%;height:40px;border:1px solid #eadfca;border-radius:12px;background:#fff;padding:0 12px;outline:none}.global-tag-form input:focus{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12)}.tag-color-choices{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 14px}.tag-color-choice{width:30px;height:30px;border-radius:50%;border:2px solid #fff;background:var(--tag-color);box-shadow:0 0 0 1px #eadfca,0 6px 14px rgba(0,0,0,.10);cursor:pointer;transition:.16s}.tag-color-choice:hover,.tag-color-choice.active{transform:translateY(-1px);box-shadow:0 0 0 3px rgba(212,175,55,.28),0 8px 16px rgba(0,0,0,.14)}.global-tag-preview{display:flex;align-items:center;gap:8px;margin:10px 0 16px;color:#6b7280;font-size:12px}.tag-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.tag-card-title h4{margin:0}.tag-card-title button{border:0;background:transparent;color:#9b7200;font-size:12px;font-weight:800;cursor:pointer;padding:3px 0}.tag-card-title button:hover{text-decoration:underline}.tag-choice-wrap{border-top:1px dashed #eadfca;margin-top:10px;padding-top:10px}.tag-choice-title{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#8a7a5c;font-weight:900;margin-bottom:7px}.tag-choices{display:flex;flex-wrap:wrap;gap:7px}.tag-choice{display:inline-flex;align-items:center;gap:6px;border:1px solid color-mix(in srgb,var(--tag-color) 52%,#fff 48%);background:color-mix(in srgb,var(--tag-color) 10%,#fff 90%);color:#4d3900;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:900;cursor:pointer;transition:.14s}.tag-choice span{width:7px;height:7px;border-radius:50%;background:var(--tag-color);box-shadow:0 0 0 2px rgba(255,255,255,.86)}.tag-choice:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(66,48,8,.08)}.tag-choice.selected{background:color-mix(in srgb,var(--tag-color) 18%,#fff 82%);border-color:var(--tag-color)}.contact-tag.colored-tag{--tag-color:#d4af37;background:color-mix(in srgb,var(--tag-color) 13%,#fff 87%)!important;border-color:color-mix(in srgb,var(--tag-color) 58%,#fff 42%)!important;color:#4d3900!important}.contact-tag.colored-tag::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--tag-color);box-shadow:0 0 0 2px rgba(255,255,255,.8);margin-right:4px}.removable-tag b{font-size:13px;margin-left:4px;color:#9b7200}.removable-tag{cursor:pointer}.removable-tag:hover{transform:translateY(-1px);box-shadow:0 5px 12px rgba(66,48,8,.08)}

/* PATCH V1_8_82 - Etiquetas globais no padrão visual anterior */
.tags-screen-stable{
  align-items:start;
  grid-template-columns: 390px minmax(520px,1fr) !important;
  gap:18px !important;
}
.tags-screen-stable .global-tag-form{
  display:block !important;
  background:#fffdf8;
  border:1px solid #eadfca;
  border-radius:16px;
  box-shadow:0 12px 30px rgba(66,48,8,.06);
}
.tags-screen-stable .global-tag-form.hidden{display:block!important;}
.tags-screen-stable .global-tag-form h3,
.tags-screen-stable .global-tags-panel h3{
  margin:0 0 12px;
  font-size:17px;
  font-weight:900;
  color:#151515;
}
.tags-screen-stable .global-tag-form label{
  margin:12px 0 7px;
  color:#5a4312;
  font-size:12px;
  font-weight:900;
}
.tags-screen-stable .global-tag-form input:not([type="hidden"]){
  height:42px;
  border:1px solid #e1bc45;
  border-radius:12px;
  background:#fff;
  font-weight:700;
}
.tags-screen-stable .tag-color-choices{
  gap:10px;
  margin:12px 0 18px;
}
.tags-screen-stable .tag-color-choice{
  width:31px;
  height:31px;
  border-radius:999px;
  border:2px solid #fff;
  background:var(--tag-color);
  color:#fff;
  font-weight:900;
  font-size:16px;
  line-height:1;
  display:inline-grid;
  place-items:center;
  box-shadow:0 0 0 1px #eadfca,0 7px 14px rgba(0,0,0,.12);
}
.tags-screen-stable .tag-color-choice.active{
  box-shadow:0 0 0 3px rgba(212,175,55,.38),0 7px 14px rgba(0,0,0,.16);
}
.tag-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:10px;
}
.tag-form-actions button{
  height:38px;
  border-radius:12px;
  padding:0 16px;
  font-weight:900;
  cursor:pointer;
}
#cancelGlobalTag{
  background:#fff;
  border:1px solid #eadfca;
  color:#6d5a32;
}
#saveGlobalTag{
  background:linear-gradient(135deg,#b88700,#d4af37);
  border:1px solid #c69816;
  color:#fff;
  box-shadow:0 8px 16px rgba(184,135,0,.18);
}
.global-tags-panel{
  background:#fffdf8;
  border:1px solid #eadfca;
  border-radius:16px;
  box-shadow:0 12px 30px rgba(66,48,8,.06);
}
.global-tags-panel .muted-small{
  display:block;
  margin:-4px 0 14px;
  color:#8a7a5c;
}
.global-tags-panel .global-tags-list{
  margin-top:8px;
  gap:10px;
}
.global-tags-panel .global-tag-row{
  min-height:48px;
  border:1px solid #f0e3c8;
  background:#fffaf0;
  border-radius:14px;
  padding:9px 12px;
}
.global-tags-panel .global-tag-row>div:first-child{
  gap:10px;
}
.global-tags-panel .global-tag-row small{
  color:#8a7a5c;
  font-size:11px;
  font-weight:900;
}
.global-tags-panel .tag-row-actions button{
  width:32px;
  height:32px;
  padding:0;
  border-radius:10px;
  display:inline-grid;
  place-items:center;
}
.tag-choice-wrap{
  border-top:1px dashed #eadfca;
  margin-top:10px;
  padding-top:10px;
}
.tag-choices{display:flex;flex-wrap:wrap;gap:7px;}
.tag-choice{border-radius:999px;}
@media (max-width:1100px){
  .tags-screen-stable{grid-template-columns:1fr!important;}
}

/* PATCH V1_8_83 - Etiquetas: seleção recolhida no contato e atualização imediata */
.tag-card .tag-add-row{margin-top:10px;display:flex;align-items:center;justify-content:flex-start;}
.tag-card .tag-add-btn{border:1px solid #d4af37;background:#fffdf8;color:#9b7200;border-radius:10px;padding:7px 12px;font-size:12px;font-weight:900;cursor:pointer;transition:.16s;box-shadow:none;}
.tag-card .tag-add-btn:hover{background:#fff7e5;transform:translateY(-1px);box-shadow:0 6px 14px rgba(135,95,0,.08);}
.contact-tag-picker{position:relative;margin-top:10px;border:1px solid #eadfca;background:#fffefb;border-radius:14px;padding:11px;box-shadow:0 12px 28px rgba(66,48,8,.10);}
.contact-tag-picker.hidden{display:none!important;}
.tag-picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px;color:#1f2937;}
.tag-picker-head strong{font-size:13px;}
.tag-picker-head button{width:24px;height:24px;border:0;border-radius:50%;background:#fff7e5;color:#8a6500;font-size:18px;line-height:22px;cursor:pointer;}
.contact-tag-picker .tag-choices{display:flex;flex-wrap:wrap;gap:7px;}
.contact-tag-picker .tag-choice{display:inline-flex;align-items:center;gap:6px;border:1px solid color-mix(in srgb,var(--tag-color) 52%,#fff 48%);background:color-mix(in srgb,var(--tag-color) 10%,#fff 90%);color:#4d3900;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900;cursor:pointer;transition:.14s;}
.contact-tag-picker .tag-choice.selected{box-shadow:inset 0 0 0 1px var(--tag-color);background:color-mix(in srgb,var(--tag-color) 18%,#fff 82%);}
.contact-tag-picker .tag-choice span{width:7px;height:7px;border-radius:50%;background:var(--tag-color);box-shadow:0 0 0 2px rgba(255,255,255,.86);}
.tag-manage-link{margin-top:10px;border:0;background:transparent;color:#9b7200;font-size:12px;font-weight:900;cursor:pointer;padding:4px 0;}
.tag-manage-link:hover{text-decoration:underline;}


/* Patch V1_8_85 - visual premium da opção de timer em etiquetas */
.tag-timer-option{
  display:flex;
  align-items:center;
  gap:11px;
  width:100%;
  margin:12px 0 16px;
  padding:11px 12px;
  border:1px solid #eadfca;
  border-radius:14px;
  background:linear-gradient(180deg,#fffefb 0%,#fff9ee 100%);
  box-shadow:0 8px 18px rgba(86,61,13,.06);
  cursor:pointer;
  user-select:none;
}
.tag-timer-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.tag-timer-toggle{
  position:relative;
  flex:0 0 auto;
  width:42px;
  height:24px;
  border-radius:999px;
  background:#e7dfcf;
  box-shadow:inset 0 0 0 1px rgba(112,88,34,.13);
  transition:.18s ease;
}
.tag-timer-toggle::after{
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 7px rgba(78,56,8,.22);
  transition:.18s ease;
}
.tag-timer-option input:checked + .tag-timer-toggle{
  background:linear-gradient(135deg,#d4af37,#f1d987);
  box-shadow:inset 0 0 0 1px rgba(124,89,0,.18),0 0 0 3px rgba(212,175,55,.12);
}
.tag-timer-option input:checked + .tag-timer-toggle::after{
  transform:translateX(18px);
}
.tag-timer-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.tag-timer-copy strong{
  font-size:12.5px;
  line-height:1.15;
  color:#3a2b0b;
  font-weight:900;
}
.tag-timer-copy small{
  font-size:11px;
  line-height:1.2;
  color:#8a7a55;
  font-weight:700;
}
.global-tag-row small{
  display:block;
  margin-top:4px;
  color:#8a7a55;
  font-size:11px;
}

/* Patch V1_8_86 - alinha toggle do timer à direita sem sobrepor o texto */
.tag-timer-option{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:12px 14px!important;
}
.tag-timer-copy{
  order:1!important;
  flex:1 1 auto!important;
  min-width:0!important;
  padding-right:10px!important;
}
.tag-timer-toggle{
  order:2!important;
  margin-left:auto!important;
  flex:0 0 42px!important;
  position:relative!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;
}
.tag-timer-option input{
  position:absolute!important;
  opacity:0!important;
  width:1px!important;
  height:1px!important;
  pointer-events:none!important;
}

/* Patch V1_8_87 - Formatação estilo WhatsApp nas mensagens */
.wa-formatted-text strong{font-weight:800;}
.wa-formatted-text em{font-style:italic;}
.wa-formatted-text s{text-decoration:line-through;}
.wa-code{
  display:inline-block;
  padding:1px 5px;
  border-radius:6px;
  background:rgba(0,0,0,.06);
  border:1px solid rgba(0,0,0,.06);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size:.92em;
  color:#2f2a1f;
}
.wa-code-block{
  display:block;
  margin:4px 0;
  padding:7px 8px;
  white-space:pre-wrap;
}

/* Patch V1_8_88 - Resposta visual estilo WhatsApp */
.reply-preview{
  background:#fffdf8;
  border-top:1px solid rgba(212,175,55,.22);
  padding:8px 14px 0 64px;
}
.reply-preview.hidden{display:none!important;}
.reply-preview-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-left:4px solid #d4af37;
  background:#fff8e8;
  border-radius:12px;
  padding:9px 10px 9px 12px;
  box-shadow:0 6px 18px rgba(66,48,8,.06);
}
.reply-preview-line b{display:block;color:#7a5500;font-size:12px;margin-bottom:2px;}
.reply-preview-line span{display:block;color:#4b5563;font-size:12px;max-width:52vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.reply-preview-line button{
  width:28px;height:28px;border-radius:50%;border:1px solid #eadfca;background:#fff;color:#7a5500;font-size:18px;line-height:1;cursor:pointer;
}
.quoted-message-block{
  width:100%;
  border:0;
  border-left:4px solid #d4af37;
  background:rgba(255,250,240,.92);
  border-radius:10px;
  padding:7px 9px;
  margin:0 0 7px;
  display:block;
  text-align:left;
  cursor:pointer;
  color:#374151;
  box-shadow:inset 0 0 0 1px rgba(234,223,202,.65);
}
.msg-row.me .quoted-message-block{background:rgba(255,255,255,.52);}
.quoted-message-block strong{display:block;color:#7a5500;font-size:12px;font-weight:900;margin-bottom:2px;}
.quoted-message-block span{display:block;color:#4b5563;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px;}
.quoted-message-block.has-media span{font-weight:700;color:#5f6673;}
.message-actions .reply-msg-btn{width:30px;height:30px;border-radius:50%;border:1px solid rgba(212,175,55,.35);background:#fff;color:#7a5500;display:grid;place-items:center;cursor:pointer;}
.message-actions .reply-msg-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.message-actions .reply-msg-btn:hover{background:#fff5df;border-color:#d4af37;transform:translateY(-1px);}

/* PATCH V1.8.89 - áudio estilo WhatsApp */
.wa-audio-player{
  width:315px;
  max-width:100%;
  min-height:56px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px 7px;
  border-radius:15px;
  background:rgba(255,255,255,.42);
  color:#4a3a17;
}
.msg-row.me .wa-audio-player{background:rgba(255,246,220,.42)}
.wa-audio-play{
  width:38px!important;
  height:38px!important;
  min-width:38px;
  border:0!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  background:linear-gradient(135deg,#d4af37,#a97705)!important;
  color:#fff!important;
  font-size:13px!important;
  line-height:1!important;
  box-shadow:0 5px 14px rgba(119,84,0,.20)!important;
  padding:0!important;
}
.wa-audio-player.playing .wa-audio-play{font-size:12px!important}
.wa-audio-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.wa-audio-track{height:7px;border-radius:999px;background:rgba(109,91,42,.22);overflow:hidden;cursor:pointer;position:relative}.wa-audio-progress{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#b88908,#d4af37);transition:width .08s linear}.wa-audio-info{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#7b6a4b;font-weight:700;line-height:1}.wa-audio-speed{width:auto!important;height:26px!important;min-width:34px!important;border:1px solid rgba(180,142,32,.38)!important;border-radius:999px!important;background:#fffaf0!important;color:#7a5500!important;font-size:11px!important;font-weight:900!important;padding:0 8px!important}.chat-audio.native-hidden{display:none!important}.msg-row:has(.wa-audio-player){max-width:min(82%, 430px)}.msg-row:has(.wa-audio-player) .bubble{padding:4px 4px 20px!important;border-radius:15px!important;min-width:250px}.msg-row:has(.wa-audio-player) .time{position:absolute!important;right:9px!important;bottom:4px!important;margin:0!important;padding:1px 5px!important;border-radius:999px!important;background:rgba(255,255,255,.68)!important;color:#7b6a4b!important;font-size:10.5px!important;line-height:1.35!important}.msg-row.me:has(.wa-audio-player) .time{background:rgba(255,246,220,.76)!important}.msg-row:has(.wa-audio-player) .message-actions{top:-18px!important;right:6px!important}@media(max-width:760px){.wa-audio-player{width:265px}.msg-row:has(.wa-audio-player){max-width:92%}}


/* PATCH V1_8_90 - gravação de áudio estilo WhatsApp */
.record{align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(212,175,55,.28)!important;background:linear-gradient(180deg,#fffaf0,#fff6e1)!important;box-shadow:0 10px 28px rgba(122,85,0,.08);}
.record b{font-variant-numeric:tabular-nums;color:#8a6100;background:#fff;border:1px solid #eadfca;border-radius:999px;padding:6px 10px;min-width:58px;text-align:center;}
.record-actions{display:flex;align-items:center;gap:8px;margin-left:auto;}
.record-actions button{height:34px;border-radius:999px;border:1px solid #eadfca;background:#fff;color:#6b4b00;font-weight:800;padding:0 12px;cursor:pointer;}
.record-actions #stopRecordBtn{background:linear-gradient(135deg,#d4af37,#a97705);border-color:#c79516;color:#fff;box-shadow:0 8px 18px rgba(169,119,5,.18);}
.record-actions #cancelRecordBtn:hover{background:#fff3d7;}
.record-actions #stopRecordBtn:hover{filter:brightness(1.02);transform:translateY(-1px);}
#recordBtn:disabled{opacity:.55;cursor:not-allowed;transform:none!important;}
.voice-preview{display:flex;align-items:center;gap:12px;width:100%;}
.voice-preview-icon{width:42px;height:42px;min-width:42px;border-radius:50%;border:0;background:linear-gradient(135deg,#d4af37,#a97705);color:#fff;display:grid;place-items:center;font-size:18px;box-shadow:0 8px 18px rgba(169,119,5,.18);}
.voice-preview-main{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1;}
.voice-preview-main strong{font-size:13px;color:#34250b;}
.voice-preview-main span{font-size:12px;color:#7c6b4d;}
.voice-preview-main audio{width:100%;height:34px;}
.preview:has(.voice-preview){border-color:rgba(212,175,55,.32);background:linear-gradient(180deg,#fffdf8,#fff8e9);}


/* Menu contextual premium das mensagens */
.message-context-menu{
  position:fixed;
  z-index:9999;
  min-width:190px;
  padding:7px;
  border-radius:18px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(212,175,55,.28);
  box-shadow:0 18px 45px rgba(30,22,5,.18), 0 3px 10px rgba(212,175,55,.12);
  backdrop-filter:blur(12px);
  animation:contextMenuIn .12s ease-out;
}
.message-context-menu button{
  width:100%;
  border:0;
  background:transparent;
  color:#3d3218;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border-radius:13px;
  font-weight:750;
  font-size:13px;
  text-align:left;
  cursor:pointer;
}
.message-context-menu button:hover{
  background:linear-gradient(135deg, rgba(255,246,216,.95), rgba(255,255,255,.98));
  color:#7a5500;
}
.message-context-menu svg{
  width:16px;
  height:16px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}
@keyframes contextMenuIn{
  from{ opacity:0; transform:translateY(4px) scale(.98); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}

/* Pesquisa real dentro da conversa */
.chat-search-panel{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-bottom:1px solid rgba(181,132,35,.16);
  background:linear-gradient(180deg,#fffdf8,#fff8e8);
  position:relative;
  z-index:8;
}
.chat-search-panel.hidden{display:none!important;}
.chat-search-box{
  flex:1;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  background:#fff;
  border:1px solid rgba(181,132,35,.22);
  border-radius:999px;
  padding:8px 12px;
  box-shadow:0 6px 18px rgba(99,72,18,.06);
}
.chat-search-box svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:#b58423;
  stroke-width:2;
  flex:0 0 auto;
}
.chat-search-box input{
  border:0;
  outline:0;
  background:transparent;
  width:100%;
  font-size:13px;
  color:#36270b;
}
.chat-search-count{
  min-width:42px;
  text-align:center;
  font-size:12px;
  color:#7d661c;
  font-weight:800;
}
.chat-search-nav,.chat-search-close{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(181,132,35,.22);
  background:#fff;
  color:#8a6818;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  box-shadow:0 6px 16px rgba(99,72,18,.06);
}
.chat-search-nav:hover,.chat-search-close:hover{background:#fff4d7;color:#3b2a07;}
mark.chat-search-highlight{
  background:#ffe28a;
  color:inherit;
  border-radius:4px;
  padding:0 2px;
}
.msg-row.chat-search-match .bubble{box-shadow:0 0 0 1px rgba(181,132,35,.18),0 8px 20px rgba(181,132,35,.08);}
.msg-row.chat-search-current .bubble{box-shadow:0 0 0 2px rgba(181,132,35,.55),0 12px 28px rgba(181,132,35,.16);}


/* PATCH V1_8_93 - Drag and drop de mídias no chat */
.chat-shell{position:relative;}
.chat-shell.chat-drop-active::before{
  content:'Solte o arquivo aqui para anexar';
  position:absolute;
  inset:72px 16px 96px 16px;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px dashed rgba(184,137,43,.9);
  border-radius:22px;
  background:rgba(255,250,239,.88);
  color:#7a5312;
  font-weight:800;
  font-size:15px;
  letter-spacing:.01em;
  box-shadow:0 18px 45px rgba(102,73,18,.18);
  pointer-events:none;
  backdrop-filter:blur(4px);
}
.chat-shell.chat-drop-active::after{
  content:'';
  position:absolute;
  inset:0;
  z-index:49;
  background:rgba(255,255,255,.28);
  pointer-events:none;
}
.preview .preview-thumb{
  max-width:96px;
  max-height:72px;
  border-radius:12px;
  object-fit:cover;
  margin-right:10px;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}


/* Patch V1_8_94 - previews ricos de documentos e links */
.wa-link-preview{
  display:flex;
  gap:10px;
  align-items:center;
  margin:7px 0 4px;
  padding:9px 10px;
  border-radius:12px;
  background:rgba(0,0,0,.045);
  border:1px solid rgba(0,0,0,.07);
  color:inherit;
  text-decoration:none;
  max-width:360px;
}
.msg-row.me .wa-link-preview{ background:rgba(255,255,255,.32); border-color:rgba(255,255,255,.36); }
.wa-link-preview:hover{ transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.08); }
.wa-link-thumb{
  width:42px;height:42px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#f6d98b,#b88622);
  color:#111;font-size:19px;flex:0 0 auto;
}
.wa-link-body{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.wa-link-body strong{ font-size:13px; line-height:1.2; color:#111; }
.wa-link-body span{ font-size:12px; opacity:.72; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:260px; }
.wa-doc-card{
  width:min(360px, 100%);
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:0;
  border-radius:14px;
  background:rgba(0,0,0,.045);
  cursor:pointer;
  text-align:left;
  color:inherit;
}
.msg-row.me .wa-doc-card{ background:rgba(255,255,255,.33); }
.wa-doc-card:hover{ filter:brightness(.98); box-shadow:0 8px 18px rgba(0,0,0,.09); }
.wa-doc-icon{
  width:46px;height:52px;border-radius:10px;
  background:linear-gradient(180deg,#fff,#f0f0f0);
  border:1px solid rgba(0,0,0,.12);
  display:flex;align-items:flex-end;justify-content:center;
  padding-bottom:7px;position:relative;flex:0 0 auto;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.wa-doc-icon:before{
  content:"";position:absolute;right:0;top:0;width:15px;height:15px;
  background:linear-gradient(135deg,#e9e9e9 0 49%,#d4d4d4 50% 100%);
  border-bottom-left-radius:5px;border-top-right-radius:10px;
}
.wa-doc-icon span{
  font-size:10px;font-weight:900;letter-spacing:.5px;color:#111;
  background:linear-gradient(135deg,#f6d98b,#c89a32);
  border-radius:7px;padding:3px 5px;max-width:35px;overflow:hidden;
}
.wa-doc-info{ min-width:0; flex:1; display:flex; flex-direction:column; gap:3px; }
.wa-doc-info strong{ font-size:13px; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wa-doc-info span{ font-size:12px; opacity:.68; }
.wa-doc-open{
  width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  text-decoration:none;color:#111;background:rgba(255,255,255,.78);border:1px solid rgba(0,0,0,.08);font-weight:900;
}
.media-caption{ margin-top:6px; font-size:13px; line-height:1.35; }

/* PATCH V1.8.95 - vídeo inline estilo WhatsApp */
.wa-video-player{
  position:relative;
  display:block!important;
  width:100%!important;
  max-width:360px!important;
  min-width:220px!important;
  border-radius:13px!important;
  overflow:hidden!important;
  background:#17130b!important;
  box-shadow:none!important;
  cursor:default!important;
}
.wa-video-player .wa-inline-video{
  width:100%!important;
  max-width:360px!important;
  max-height:430px!important;
  min-width:220px!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:13px!important;
  background:#17130b!important;
}
.wa-video-play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.46);
  background:rgba(255,255,255,.92);
  color:#a67900;
  display:grid;
  place-items:center;
  font-size:18px;
  font-weight:900;
  box-shadow:0 10px 28px rgba(0,0,0,.22);
  cursor:pointer;
  z-index:3;
}
.wa-video-player.playing .wa-video-play{
  opacity:0;
  transform:translate(-50%,-50%) scale(.92);
  pointer-events:none;
}
.wa-video-player:hover .wa-video-play,
.wa-video-player:focus-within .wa-video-play{
  opacity:1;
  transform:translate(-50%,-50%) scale(1);
  pointer-events:auto;
}
.wa-video-expand{
  position:absolute;
  right:8px;
  top:8px;
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(20,15,8,.58);
  color:#fff7df;
  display:grid;
  place-items:center;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  opacity:0;
  transition:.15s ease;
  z-index:4;
}
.wa-video-player:hover .wa-video-expand,
.wa-video-player:focus-within .wa-video-expand{opacity:1;}
.wa-video-controls{
  position:absolute;
  left:8px;
  right:8px;
  bottom:8px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  border-radius:999px;
  background:linear-gradient(180deg,rgba(26,18,6,.52),rgba(26,18,6,.72));
  color:#fff7df;
  backdrop-filter:blur(5px);
  opacity:.96;
  z-index:2;
}
.wa-video-track{
  flex:1;
  height:4px;
  border-radius:999px;
  background:rgba(255,255,255,.32);
  overflow:hidden;
  cursor:pointer;
}
.wa-video-progress{
  height:100%;
  width:0%;
  border-radius:999px;
  background:#d4a629;
}
.wa-video-time{
  font-size:11px;
  font-weight:800;
  min-width:66px;
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.msg-row:has(.wa-video-player) .bubble{
  padding:4px 4px 19px!important;
}
@media(max-width:720px){
  .wa-video-player,.wa-video-player .wa-inline-video{max-width:300px!important;min-width:180px!important;}
  .wa-video-time{min-width:54px;font-size:10px;}
}

/* V1_8_96 - Mensagens favoritas estilo WhatsApp */
.favorite-filter-btn{
  font-size:18px;
  line-height:1;
  color:#8b795d;
}
.favorite-filter-btn.active{
  color:#111;
  background:linear-gradient(135deg,#f6d979,#c99a2e);
  border-color:rgba(196,146,38,.55);
  box-shadow:0 8px 18px rgba(180,130,30,.18);
}
.msg-row.is-favorite .bubble{
  box-shadow:0 8px 22px rgba(196,146,38,.13);
}
.msg-favorite-badge{
  position:absolute;
  top:6px;
  right:8px;
  width:18px;
  height:18px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
  color:#1b1306;
  background:linear-gradient(135deg,#f7dc82,#c99627);
  box-shadow:0 3px 10px rgba(180,130,30,.25);
  pointer-events:none;
}
.msg-row.is-favorite .bubble{
  padding-top:22px;
}
.empty-favorites{
  margin:24px auto;
  max-width:360px;
  padding:16px 18px;
  border-radius:18px;
  text-align:center;
  color:#8d7b5d;
  background:rgba(255,255,255,.72);
  border:1px dashed rgba(197,151,55,.35);
  box-shadow:0 8px 24px rgba(32,24,10,.06);
}
.message-context-menu [data-action="favorite"]{
  color:#6c5520;
}

/* PATCH V1.8.98 - Fixados estilo WhatsApp oficial */
.pinned-messages-panel{
  flex:0 0 auto!important;
  padding:7px 12px!important;
  background:#fffdf7!important;
  border-bottom:1px solid rgba(212,175,55,.28)!important;
  box-shadow:0 6px 18px rgba(82,58,6,.06)!important;
  z-index:8!important;
}
.pinned-messages-panel.hidden{display:none!important;}
.pinned-whatsapp-bar{
  max-width:860px;
  margin:0 auto;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  border-radius:13px;
  padding:7px 9px;
  background:linear-gradient(135deg,#fffaf0,#fffefb);
  border:1px solid rgba(212,175,55,.28);
  border-left:4px solid #c99a05;
  transition:background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.pinned-whatsapp-bar:hover{
  background:#fff5dc;
  box-shadow:0 8px 20px rgba(126,89,8,.10);
}
.pinned-whatsapp-icon{
  flex:0 0 30px;
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color:#9a7207;
  background:linear-gradient(135deg,#fff6d5,#fff);
  border:1px solid rgba(212,175,55,.35);
}
.pinned-whatsapp-content{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.pinned-whatsapp-top{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.pinned-whatsapp-top strong{
  font-size:12px;
  color:#8a6100;
  font-weight:800;
}
.pinned-whatsapp-top span{
  font-size:11px;
  color:#9b7a1a;
  border:1px solid rgba(212,175,55,.35);
  background:#fff8df;
  padding:1px 7px;
  border-radius:999px;
  white-space:nowrap;
}
.pinned-whatsapp-preview{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  color:#1f2937;
}
.pinned-whatsapp-preview b{
  flex:0 1 auto;
  max-width:240px;
  font-size:13px;
  font-weight:800;
  color:#3b2b03;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pinned-whatsapp-preview em{
  flex:1;
  min-width:0;
  font-style:normal;
  font-size:12px;
  color:#6b7280;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pinned-whatsapp-toggle{
  flex:0 0 30px;
  width:30px;
  height:30px;
  border-radius:10px;
  border:1px solid rgba(212,175,55,.30);
  background:#fff;
  color:#8a6100;
  font-weight:900;
  cursor:pointer;
}
.pinned-whatsapp-toggle:hover{background:#fff2c8;}
.pinned-messages-panel .pinned-panel-title{display:none!important;}
.pinned-messages-panel .pinned-panel-list{
  max-width:860px!important;
  margin:7px auto 0!important;
  display:none!important;
  flex-direction:column!important;
  gap:6px!important;
  max-height:156px!important;
  overflow:auto!important;
  padding:2px 4px 2px 0!important;
}
.pinned-messages-panel.expanded .pinned-panel-list,
.pinned-messages-panel .pinned-panel-list.show{
  display:flex!important;
}
.pinned-messages-panel .pinned-message-bar{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  border:1px solid rgba(212,175,55,.25)!important;
  border-left:3px solid #d4af37!important;
  border-radius:11px!important;
  background:#fff!important;
  padding:7px 9px!important;
  box-shadow:none!important;
}
.pinned-messages-panel .pinned-message-bar:hover{background:#fff8e8!important;}
.pinned-messages-panel .pin-icon{
  flex:0 0 26px!important;
  width:26px!important;
  height:26px!important;
  border-radius:9px!important;
}
.pinned-messages-panel .pin-text strong{
  font-size:12px!important;
  color:#5f4300!important;
  text-transform:none!important;
  letter-spacing:0!important;
}
.pinned-messages-panel .pin-text span{
  font-size:12px!important;
  color:#6b7280!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pinned-messages-panel .unpin-message-btn{
  flex:0 0 26px!important;
  width:26px!important;
  height:26px!important;
  border-radius:9px!important;
}

/* PATCH V1.8.99 - Desfixar quando houver apenas uma mensagem fixada */
.pinned-whatsapp-unpin{
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:10px!important;
  border:1px solid rgba(212,175,55,.30)!important;
  background:#fff!important;
  color:#8a6100!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:900!important;
  cursor:pointer!important;
  transition:background .16s ease, color .16s ease, transform .16s ease!important;
}
.pinned-whatsapp-unpin:hover{
  background:#fff2c8!important;
  color:#6f4d00!important;
  transform:translateY(-1px)!important;
}


/* Patch V1_8_100 - mensagem editada estilo WhatsApp */
.edited-label{
  display:inline-block;
  margin-right:5px;
  color:rgba(60,60,60,.55);
  font-size:10.5px;
  font-style:italic;
  vertical-align:baseline;
}
.message-context-menu [data-action="edit"] span{
  font-weight:600;
}


/* Patch V1_8_101 - mensagem apagada local */
.bubble.bubble-deleted{
  opacity:.88;
}
.deleted-message{
  display:flex;
  align-items:center;
  gap:7px;
  color:#8f8170;
  font-style:italic;
  font-size:13px;
  line-height:1.35;
  padding:2px 2px 1px;
}
.deleted-message:before{
  content:'⊘';
  width:16px;
  height:16px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  color:#9b8b78;
}
.message-context-menu button[data-action="delete"]{
  color:#8a3d2a;
}
.message-context-menu button[data-action="delete"]:hover{
  background:#fff1ed;
}


/* Modal interno premium - editar/apagar mensagem */
.crm-modal-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(17,17,17,.28);
  backdrop-filter:blur(4px);
  opacity:0;
  transition:opacity .14s ease;
}
.crm-modal-overlay.show{ opacity:1; }
.crm-modal-card{
  width:min(440px, 94vw);
  background:#fff;
  border:1px solid rgba(204,159,64,.22);
  border-radius:20px;
  box-shadow:0 24px 70px rgba(0,0,0,.22);
  padding:18px;
  transform:translateY(8px) scale(.98);
  transition:transform .14s ease;
}
.crm-modal-overlay.show .crm-modal-card{ transform:translateY(0) scale(1); }
.crm-modal-title{
  font-weight:800;
  font-size:16px;
  color:#262018;
  margin-bottom:8px;
}
.crm-modal-message{
  font-size:13px;
  line-height:1.45;
  color:#6b6258;
  margin-bottom:14px;
}
.crm-modal-textarea{
  width:100%;
  min-height:96px;
  resize:vertical;
  border:1px solid rgba(204,159,64,.34);
  border-radius:14px;
  padding:12px 13px;
  font:inherit;
  font-size:14px;
  color:#2d261d;
  outline:none;
  background:#fffdf8;
  box-sizing:border-box;
}
.crm-modal-textarea:focus{
  border-color:#c99f40;
  box-shadow:0 0 0 3px rgba(201,159,64,.16);
}
.crm-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}
.crm-modal-btn{
  border:0;
  border-radius:999px;
  padding:9px 16px;
  font-weight:800;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.crm-modal-btn:hover{ transform:translateY(-1px); }
.crm-modal-btn.secondary{
  background:#f4f1ea;
  color:#6f665d;
}
.crm-modal-btn.primary{
  background:linear-gradient(135deg,#d7ad4b,#b8851e);
  color:#15110b;
  box-shadow:0 8px 18px rgba(184,133,30,.22);
}

/* Patch V1_8_105 - modal interno apagar/editar estilo WhatsApp */
.crm-delete-options{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:16px;
}
.crm-modal-btn.danger{
  background:linear-gradient(135deg,#b91c1c,#ef4444);
  color:#fff;
  border-color:rgba(185,28,28,.25);
}
.crm-modal-btn.ghost{
  background:#fff;
  color:#6b7280;
  border:1px solid rgba(148,163,184,.35);
}
.crm-modal-btn.danger:hover,
.crm-modal-btn.ghost:hover{ transform:translateY(-1px); }


/* Patch V1_8_106 - Enquetes estilo WhatsApp */
.wa-poll-card{min-width:240px;max-width:360px;background:rgba(255,255,255,.66);border:1px solid rgba(212,175,55,.24);border-radius:14px;padding:10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}
.msg-row.me .wa-poll-card{background:rgba(255,248,224,.78)}
.wa-poll-title{display:flex;align-items:flex-start;gap:8px;margin-bottom:9px;color:#1f2937}.wa-poll-title strong{font-size:14px;line-height:1.25}.wa-poll-options{display:flex;flex-direction:column;gap:7px}.wa-poll-option{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #efe5ce;border-radius:12px;padding:8px 10px;font-size:13px;color:#2f2f2f}.wa-poll-radio{color:#a97705;font-weight:900;width:18px;text-align:center}.wa-poll-foot{margin-top:9px;font-size:11px;color:#8a7444;text-align:right}.poll-modal-card{width:min(520px,calc(100vw - 28px));max-width:520px}.poll-field{display:block;margin:12px 0}.poll-field span,.poll-options-head span{display:block;font-size:12px;font-weight:800;color:#7a5500;margin-bottom:6px}.poll-input{width:100%;border:1px solid #eadfca;border-radius:12px;background:#fff;padding:11px 12px;outline:none;font:inherit;color:#111827}.poll-input:focus{border-color:#d4af37;box-shadow:0 0 0 4px rgba(212,175,55,.12)}.poll-options-head{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.poll-options-head button{border:1px solid #d4af37;border-radius:999px;background:#fff8e6;color:#8a6100;font-weight:800;padding:6px 10px}.poll-options-list{display:flex;flex-direction:column;gap:8px}.poll-option-row{display:grid;grid-template-columns:1fr 34px;gap:7px;align-items:center}.poll-option-row button{height:34px;width:34px;border:1px solid #eadfca;border-radius:50%;background:#fff;color:#9b1c1c;font-size:18px;line-height:1}.poll-option-row button:disabled{opacity:.35;cursor:not-allowed}.poll-toggle{display:flex;align-items:center;gap:10px;margin:14px 0 4px;color:#3f4652;font-weight:700}.poll-toggle input{width:18px;height:18px;accent-color:#d4af37}

/* PATCH V1_8_107 - resultados de enquetes estilo WhatsApp */
.wa-poll-option{position:relative;overflow:hidden;align-items:center;display:grid;grid-template-columns:18px 1fr auto;gap:8px}
.wa-poll-option-main{display:flex;flex-direction:column;gap:5px;min-width:0}
.wa-poll-option-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wa-poll-votes{font-size:12px;font-weight:900;color:#8a6100;min-width:20px;text-align:right}
.wa-poll-bar{height:4px;background:#f2ead8;border-radius:999px;overflow:hidden;display:block}
.wa-poll-bar i{display:block;height:100%;background:linear-gradient(90deg,#d4af37,#f1d37a);border-radius:999px;transition:width .25s ease}
.wa-poll-option.has-votes{border-color:rgba(212,175,55,.45);background:#fffaf0}


/* PATCH V1_8_108 - Figurinhas salvas estilo WhatsApp */
.sticker-message-wrap{display:inline-flex;flex-direction:column;align-items:center;gap:6px;max-width:180px;position:relative}.sticker-view-btn{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important}.chat-sticker{max-width:156px;max-height:156px;object-fit:contain;border-radius:0;background:transparent;filter:drop-shadow(0 4px 8px rgba(0,0,0,.10))}.save-sticker-btn{border:1px solid rgba(212,175,55,.34);background:rgba(255,250,240,.92);color:#8a6100;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:800;cursor:pointer;box-shadow:0 6px 18px rgba(122,85,0,.08);transition:.16s}.save-sticker-btn:hover{background:#fff4d8;border-color:#d4af37;transform:translateY(-1px)}.save-sticker-btn:disabled{opacity:.65;cursor:wait;transform:none}.sticker-saved-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#fff7df;border:1px solid #eadfca;color:#8a6100;font-size:11px;font-weight:800;padding:4px 10px}.sticker-btn{color:#8a6100!important}.sticker-panel{position:fixed;z-index:9999;width:318px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #eadfca;border-radius:20px;box-shadow:0 24px 70px rgba(36,25,7,.24);overflow:hidden}.sticker-panel.hidden{display:none}.sticker-panel-head{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #f0e5cf;background:linear-gradient(180deg,#fffaf0,#fff)}.sticker-panel-head strong{font-size:14px;color:#2b2b2b}.sticker-panel-head button{border:0;background:transparent;font-size:24px;line-height:1;color:#8a6100;cursor:pointer;width:32px;height:32px;border-radius:50%}.sticker-panel-head button:hover{background:#fff2d2}.saved-stickers-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px;max-height:260px;overflow:auto;background:#fffdf8}.saved-sticker-item{position:relative;height:64px;border:1px solid #f0e5cf;background:#fff;border-radius:14px;display:grid;place-items:center;cursor:pointer;transition:.15s}.saved-sticker-item:hover{background:#fff4dc;border-color:#d4af37;transform:translateY(-1px)}.saved-sticker-item img{max-width:54px;max-height:54px;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(0,0,0,.10))}.saved-sticker-item button{position:absolute;right:-5px;top:-6px;width:20px;height:20px;border-radius:50%;border:1px solid #eadfca;background:#fff;color:#7a5500;font-weight:900;line-height:18px;cursor:pointer;display:none}.saved-sticker-item:hover button{display:block}.sticker-panel-foot{padding:8px 12px 12px;color:#7b6f58;font-size:11px;background:#fff}.empty-stickers{grid-column:1/-1;text-align:center;color:#7b6f58;padding:28px 8px;font-size:13px}.msg-row .bubble:has(.sticker-message-wrap){background:transparent!important;box-shadow:none!important;border-color:transparent!important;padding:4px 2px}.msg-row.me .bubble:has(.sticker-message-wrap){background:transparent!important}

/* PATCH V1_8_109 - Figurinhas menores + salvar ao clicar */
.sticker-message-wrap{max-width:150px!important;gap:4px!important}
.chat-sticker{max-width:126px!important;max-height:126px!important}
.sticker-view-btn{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;cursor:pointer;border-radius:14px!important}
.sticker-view-btn:hover .chat-sticker{transform:scale(1.025);filter:drop-shadow(0 5px 10px rgba(0,0,0,.14))}
.sticker-action-menu{position:fixed;z-index:10050;width:190px;background:#fff;border:1px solid #eadfca;border-radius:16px;box-shadow:0 18px 50px rgba(34,24,8,.22);padding:6px;animation:stickerMenuIn .12s ease-out;overflow:hidden}
.sticker-action-menu button,.sticker-action-status{width:100%;border:0;background:transparent;text-align:left;border-radius:12px;padding:10px 11px;font-size:13px;font-weight:800;color:#3b2b10;display:flex;align-items:center;gap:8px}
.sticker-action-menu button{cursor:pointer}.sticker-action-menu button:hover{background:#fff4dc;color:#7a5500}.sticker-action-status{color:#8a6100;background:#fff8e8;justify-content:center}.sticker-saved-badge{font-size:10px!important;padding:3px 8px!important}
@keyframes stickerMenuIn{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}


/* PATCH V1_8_110 - Figurinhas menores e salvar pelo clique */
.sticker-message-wrap{max-width:118px!important;gap:3px!important}
.chat-sticker{max-width:104px!important;max-height:104px!important;width:auto!important;height:auto!important;object-fit:contain!important;border-radius:0!important;padding:0!important;background:transparent!important}
.msg-row .bubble:has(.sticker-message-wrap){padding:2px 2px!important;background:transparent!important;box-shadow:none!important;border-color:transparent!important}
.sticker-view-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;max-width:112px!important;max-height:112px!important;border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;cursor:pointer!important}
.sticker-action-menu{width:205px!important;z-index:12000!important}
.sticker-action-save::before{content:'💾';font-size:13px}.sticker-action-save{gap:8px!important}
.sticker-action-open{opacity:.88}


/* PATCH V1_8_111 - GIFs estilo WhatsApp */
.wa-gif-message{position:relative!important;display:inline-block!important;border:0!important;background:transparent!important;padding:0!important;overflow:hidden!important;border-radius:14px!important;box-shadow:0 8px 18px rgba(66,46,10,.08)!important;cursor:pointer!important}
.wa-gif-message .wa-gif-image{display:block!important;object-fit:cover!important}
.wa-gif-badge{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.68);color:#fff;border-radius:7px;padding:3px 7px;font-size:10px;font-weight:900;letter-spacing:.7px;line-height:1;box-shadow:0 4px 12px rgba(0,0,0,.18);pointer-events:none}
.msg-row.me .wa-gif-badge{background:rgba(73,54,10,.72)}
.preview-gif-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}
.preview-gif-wrap b{position:absolute;left:6px;bottom:6px;background:rgba(0,0,0,.68);color:#fff;border-radius:6px;padding:2px 6px;font-size:10px;font-weight:900;letter-spacing:.6px}

.attach-ico.gif{font-weight:800;font-size:11px;letter-spacing:.3px;color:#111;background:linear-gradient(135deg,#f7d56b,#c9961e);border-radius:10px;min-width:34px;height:28px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(201,150,30,.22)}
.wa-gif-message{position:relative;overflow:hidden}
.wa-gif-badge{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.72);color:#fff;font-size:11px;font-weight:800;border-radius:7px;padding:3px 6px;letter-spacing:.3px}
.preview-gif-wrap{position:relative;display:inline-flex}.preview-gif-wrap b{position:absolute;left:6px;bottom:6px;background:#111;color:#fff;border-radius:6px;padding:2px 5px;font-size:10px}

/* PATCH V1_8_113 - GIFs no seletor inferior + render GIF correto */
.wa-gif-message{max-width:260px!important;border-radius:14px!important;overflow:hidden!important;background:#fff8e8!important;border:1px solid rgba(212,175,55,.25)!important;box-shadow:0 8px 20px rgba(66,46,10,.08)!important}
.wa-gif-message .chat-gif,.wa-gif-message .wa-gif-video,.wa-gif-message .wa-gif-image{display:block!important;width:240px!important;max-width:min(240px,58vw)!important;height:auto!important;max-height:240px!important;object-fit:cover!important;background:#f7f0df!important}
.wa-gif-message .wa-gif-video{aspect-ratio:16/9;min-height:120px}
.wa-gif-badge{position:absolute!important;left:8px!important;bottom:8px!important;background:rgba(0,0,0,.72)!important;color:#fff!important;font-size:10px!important;font-weight:900!important;border-radius:7px!important;padding:3px 7px!important;letter-spacing:.5px!important;line-height:1!important;pointer-events:none!important}

.composer-picker-panel{position:fixed;z-index:10020;width:370px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #eadfca;border-radius:20px;box-shadow:0 24px 70px rgba(36,25,7,.26);overflow:hidden}
.composer-picker-panel.hidden{display:none!important}.composer-picker-head{display:flex;align-items:center;gap:4px;padding:8px;background:linear-gradient(180deg,#fffaf0,#fff);border-bottom:1px solid #f0e5cf}.composer-picker-head [data-picker-tab]{flex:1;border:0;background:transparent;color:#66512b;border-radius:14px;padding:10px 8px;font-weight:800;font-size:12px;cursor:pointer}.composer-picker-head [data-picker-tab].active{background:#c29100;color:#fff;box-shadow:0 8px 18px rgba(194,145,0,.24)}.composer-picker-close{width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:#8a6100;font-size:22px;line-height:1;cursor:pointer}.composer-picker-close:hover{background:#fff2d2}.composer-picker-body{background:#fffdf8;min-height:220px;max-height:320px;overflow:auto}.emoji-picker-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:6px;padding:12px}.emoji-picker-item{height:36px;border:1px solid #f0e5cf;background:#fff;border-radius:12px;font-size:20px;cursor:pointer;box-shadow:0 4px 12px rgba(90,63,12,.04)}.emoji-picker-item:hover{background:#fff4dc;border-color:#d4af37;transform:translateY(-1px)}.gif-picker-grid{display:grid;grid-template-columns:1fr;gap:10px;padding:12px}.gif-upload-card{min-height:116px;border:1px dashed rgba(194,145,0,.45);background:linear-gradient(135deg,#fff8e8,#fff);border-radius:18px;display:grid;place-items:center;gap:3px;color:#8a6100;cursor:pointer;box-shadow:0 10px 24px rgba(90,63,12,.06)}.gif-upload-card strong{display:grid;place-items:center;width:58px;height:42px;border-radius:14px;background:#1d1d1d;color:#fff;font-size:18px;letter-spacing:.5px}.gif-upload-card span{font-weight:800;font-size:13px}.gif-upload-card:hover{border-color:#c29100;background:#fff4dc;transform:translateY(-1px)}.gif-picker-hint{font-size:12px;color:#7b6f58;line-height:1.35;padding:0 4px 8px}.composer-picker-panel .saved-stickers-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px;max-height:260px;overflow:auto;background:#fffdf8}.composer-picker-panel .saved-stickers-grid.hidden,.emoji-picker-grid.hidden,.gif-picker-grid.hidden{display:none!important}

/* WhatsApp-style advanced reactions */
.wa-reaction-badge,
.msg-reaction-badge.wa-reaction-badge{
  display:inline-flex;
  align-items:center;
  gap:2px;
  min-height:20px;
  padding:2px 7px 2px 5px;
  border-radius:999px;
  border:1px solid rgba(212,175,55,.32);
  background:rgba(255,255,255,.92);
  box-shadow:0 5px 14px rgba(0,0,0,.10);
  font-size:13px;
  line-height:1;
  cursor:pointer;
  position:absolute;
  left:12px;
  bottom:-11px;
  z-index:4;
}
.msg-row.me .wa-reaction-badge{ left:auto; right:12px; }
.wa-reaction-badge b{
  font-size:11px;
  color:#5b4a16;
  margin-left:2px;
  font-weight:800;
}
.reaction-picker{
  display:flex;
  align-items:center;
  gap:5px;
  padding:6px;
  border-radius:999px;
  border:1px solid rgba(212,175,55,.26);
  background:rgba(255,255,255,.97);
  box-shadow:0 14px 38px rgba(0,0,0,.18);
}
.reaction-picker button:not(.reaction-clear){
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:0;
  background:transparent;
  font-size:19px;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease;
}
.reaction-picker button:not(.reaction-clear):hover,
.reaction-picker button:not(.reaction-clear).active{
  background:rgba(212,175,55,.16);
  transform:translateY(-2px) scale(1.08);
}
.reaction-picker .reaction-clear{
  width:26px;
  height:26px;
  border-radius:50%;
  border:0;
  background:rgba(0,0,0,.06);
  color:#6b5a22;
  cursor:pointer;
}
.bubble:has(.wa-reaction-badge){ margin-bottom:12px; }


/* Galeria de mídia estilo WhatsApp */
.media-library-view{padding:22px;overflow:auto;background:#f7f1e6;}
.media-library-card{background:rgba(255,255,255,.96);border:1px solid rgba(185,139,48,.24);border-radius:24px;box-shadow:0 18px 45px rgba(87,63,20,.10);padding:20px;min-height:calc(100vh - 44px);}
.media-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px;}
.media-library-head h2{margin:0;color:#3b2a0f;font-size:24px;}
.media-library-head p{margin:5px 0 0;color:#8a7650;font-size:13px;}
.media-library-search{display:flex;align-items:center;gap:10px;min-width:310px;background:#fff;border:1px solid rgba(185,139,48,.24);border-radius:999px;padding:10px 14px;box-shadow:0 8px 22px rgba(87,63,20,.06);}
.media-library-search svg{width:18px;height:18px;fill:none;stroke:#b98b30;stroke-width:2;}
.media-library-search input{border:0;outline:0;background:transparent;width:100%;font-size:14px;color:#3b2a0f;}
.media-library-filter-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.media-library-tabs,.media-library-direction-tabs{display:flex;gap:8px;flex-wrap:wrap;}
.media-library-tabs button,.media-library-direction-tabs button{border:1px solid rgba(185,139,48,.25);background:#fff;color:#6f5b33;border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer;transition:.18s;}
.media-library-direction-tabs{background:#fff8e8;border:1px solid rgba(185,139,48,.18);border-radius:999px;padding:4px;box-shadow:0 8px 22px rgba(87,63,20,.05);}
.media-library-direction-tabs button{padding:8px 12px;background:transparent;border-color:transparent;}
.media-library-tabs button.active,.media-library-tabs button:hover,.media-library-direction-tabs button.active,.media-library-direction-tabs button:hover{background:linear-gradient(135deg,#d5aa48,#a9791f);color:#191100;border-color:transparent;box-shadow:0 8px 18px rgba(185,139,48,.22);}
.media-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;align-items:stretch;}
.media-library-item{border:1px solid rgba(185,139,48,.18);background:#fff;border-radius:18px;overflow:hidden;text-align:left;cursor:pointer;box-shadow:0 10px 25px rgba(70,48,9,.06);transition:.18s;display:flex;flex-direction:column;min-height:210px;}
.media-library-item:hover{transform:translateY(-2px);box-shadow:0 16px 35px rgba(70,48,9,.12);border-color:rgba(185,139,48,.42);}
.media-library-thumb{height:128px;background:linear-gradient(135deg,#fff8e8,#f0dfb7);display:grid;place-items:center;position:relative;overflow:hidden;}
.media-library-thumb img,.media-library-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
.media-library-thumb b{position:absolute;right:10px;bottom:8px;background:rgba(20,14,4,.72);color:#fff;border-radius:999px;padding:4px 8px;font-size:11px;letter-spacing:.03em;}
.media-doc-tile{font-size:40px;width:72px;height:72px;border-radius:20px;display:grid;place-items:center;background:rgba(185,139,48,.12);border:1px solid rgba(185,139,48,.20);}
.media-link-thumb{font-size:36px;color:#b98b30;}
.media-library-info{padding:12px 13px;display:flex;flex-direction:column;gap:4px;min-width:0;}
.media-library-info strong{color:#3b2a0f;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.media-library-info span{color:#766848;font-size:12px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word;}
.media-library-info small{color:#a39168;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;}
.media-library-empty{grid-column:1/-1;padding:38px;text-align:center;color:#9b8659;background:#fff;border-radius:18px;border:1px dashed rgba(185,139,48,.35);font-weight:700;}
@media(max-width:850px){.media-library-head{flex-direction:column}.media-library-search{min-width:0;width:100%}.media-library-filter-row{align-items:stretch}.media-library-tabs,.media-library-direction-tabs{width:100%;overflow:auto;flex-wrap:nowrap}.media-library-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.media-library-thumb{height:105px}}


/* V1_8_119 - Localização estilo WhatsApp */
.wa-location-card{width:min(320px,100%);border-radius:16px;overflow:hidden;border:1px solid rgba(197,151,64,.25);background:#fff;box-shadow:0 10px 25px rgba(0,0,0,.08)}
.wa-location-map{height:118px;background:linear-gradient(135deg,#f4ead6,#fff8e9);display:flex;align-items:center;justify-content:center;position:relative;color:#1f1a12;font-size:32px;overflow:hidden}
.wa-location-map:before,.wa-location-map:after{content:"";position:absolute;inset:auto -10% 35% -10%;height:1px;background:rgba(197,151,64,.28);transform:rotate(-10deg);box-shadow:0 28px 0 rgba(197,151,64,.18),0 56px 0 rgba(197,151,64,.12)}
.wa-location-map:after{transform:rotate(18deg);inset:35% -10% auto -10%}.wa-location-map span{position:relative;z-index:2;filter:drop-shadow(0 4px 8px rgba(0,0,0,.18))}
.wa-location-info{padding:10px 12px;display:flex;flex-direction:column;gap:3px}.wa-location-info strong{font-size:13px;color:#2b2416}.wa-location-info span{font-size:11px;color:#74664f;line-height:1.3}.wa-location-open{display:block;padding:9px 12px;border-top:1px solid rgba(197,151,64,.18);font-size:12px;font-weight:800;color:#9b6a18;text-decoration:none;background:#fffaf0}.wa-location-open:hover{background:#fff2cf}
.attach-ico.location{background:linear-gradient(135deg,#d9aa3f,#f8df91);color:#1c160e;font-weight:900}
.location-modal .location-card{width:min(430px,calc(100vw - 28px));background:#fff;border-radius:22px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.22);border:1px solid rgba(197,151,64,.25)}
.location-card .modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.location-card label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#5d4b2b;margin:10px 0}.location-card input{border:1px solid rgba(197,151,64,.28);border-radius:12px;padding:10px 12px;outline:none;background:#fffaf3}.location-card input:focus{border-color:#c59740;box-shadow:0 0 0 3px rgba(197,151,64,.16)}.location-grid-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px}.location-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 12px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.modal-actions button,.location-actions button{border:0;border-radius:12px;padding:10px 14px;font-weight:800;cursor:pointer}.modal-actions .primary,.location-actions .primary{background:linear-gradient(135deg,#d4a23d,#f1cd76);color:#1f1708}.modal-actions button:not(.primary){background:#f4efe5;color:#5d4b2b}

/* Patch V1_8_121 - mensagens temporárias estilo WhatsApp */
.disappearing-tool-btn{font-size:15px;line-height:1;}
.disappearing-tool-btn.active{background:rgba(212,175,55,.14);border-color:#d4af37;color:#a97800;box-shadow:0 6px 16px rgba(212,175,55,.18);}
.disappearing-banner{align-self:center;margin:8px auto 10px;padding:8px 14px;border:1px solid rgba(212,175,55,.26);border-radius:999px;background:rgba(255,248,220,.86);color:#7c5a00;font-size:12px;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.05);}
.disappearing-card{max-width:420px;}
.disappearing-card .modal-head span{display:block;margin-top:4px;color:#7a6a45;font-size:12px;font-weight:500;line-height:1.35;}
.disappearing-options{display:grid;gap:10px;margin:18px 0 12px;}
.disappearing-options button{width:100%;display:flex;align-items:center;justify-content:space-between;padding:13px 14px;border:1px solid rgba(212,175,55,.28);border-radius:14px;background:#fffdf8;color:#3b2b00;font-weight:800;cursor:pointer;transition:.18s ease;}
.disappearing-options button::after{content:'';width:16px;height:16px;border-radius:50%;border:2px solid rgba(212,175,55,.55);background:#fff;}
.disappearing-options button:hover{border-color:#d4af37;background:#fff8df;transform:translateY(-1px);}
.disappearing-options button.active{background:linear-gradient(135deg,#fff7d8,#fffdf8);border-color:#d4af37;box-shadow:0 8px 18px rgba(212,175,55,.16);}
.disappearing-options button.active::after{background:#d4af37;box-shadow:inset 0 0 0 3px #fff;}
.disappearing-note{margin:0;color:#8a7b58;}


/* Patch V1_8_122 - refinamento premium header + mensagens temporárias */
.chat-header{border-bottom:1px solid rgba(212,175,55,.16);box-shadow:0 2px 14px rgba(52,38,8,.035);}
.chat-tools{display:flex;align-items:center;gap:8px;}
.chat-tools .chat-tool-btn{width:38px!important;height:38px!important;border-radius:14px!important;background:linear-gradient(180deg,#fff,#fffaf0)!important;border:1px solid rgba(212,175,55,.28)!important;color:#3f4652!important;box-shadow:0 6px 18px rgba(66,48,8,.055)!important;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease,color .16s ease!important;font-size:16px!important;margin-left:0!important;}
.chat-tools .chat-tool-btn:hover{background:linear-gradient(180deg,#fff8df,#fff)!important;border-color:#d4af37!important;color:#8a6100!important;box-shadow:0 10px 24px rgba(212,175,55,.16)!important;transform:translateY(-1px);}
.chat-tools .chat-tool-btn.active,.chat-tools .disappearing-tool-btn.active{background:linear-gradient(135deg,#d4af37,#b88200)!important;color:#fff!important;border-color:#b88200!important;box-shadow:0 10px 26px rgba(185,130,0,.24)!important;}
.chat-tools .chat-tool-btn svg,.chat-tools .ui-ico{width:18px!important;height:18px!important;}
.chat-tools .chat-finish-btn{height:38px!important;border-radius:14px!important;background:linear-gradient(135deg,#fffaf0,#fff)!important;border:1px solid rgba(212,175,55,.38)!important;color:#7a5500!important;padding:0 14px!important;box-shadow:0 6px 18px rgba(66,48,8,.055)!important;}
.chat-tools .chat-finish-btn:hover{background:linear-gradient(135deg,#d4af37,#b88200)!important;color:#fff!important;border-color:#b88200!important;box-shadow:0 10px 24px rgba(185,130,0,.24)!important;}

#disappearingModal.modal{background:rgba(17,24,39,.26);backdrop-filter:blur(2px);align-items:flex-start;justify-items:end;padding:74px 264px 0 0;}
#disappearingModal.modal.hidden{display:none!important;}
.premium-disappearing-card{width:min(390px,calc(100vw - 26px));border-radius:20px!important;border:1px solid rgba(212,175,55,.22)!important;background:rgba(255,255,255,.98)!important;box-shadow:0 24px 70px rgba(48,34,0,.18)!important;overflow:hidden;animation:disappearingDrop .16s ease-out;}
@keyframes disappearingDrop{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.premium-disappearing-head{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 18px 12px;border-bottom:1px solid rgba(234,223,202,.72);}
.disappearing-title-wrap{display:flex;align-items:flex-start;gap:11px;}
.disappearing-head-icon{width:36px;height:36px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#fff4d4,#fff);border:1px solid rgba(212,175,55,.34);box-shadow:0 8px 20px rgba(212,175,55,.12);font-size:17px;}
.premium-disappearing-head strong{font-size:15px;color:#1f2937;display:block;margin-top:1px;}
.premium-disappearing-head span:not(.disappearing-head-icon){display:block;margin-top:4px;color:#6b5b3c;font-size:12px;line-height:1.35;font-weight:500;max-width:282px;}
.disappearing-close{width:30px!important;height:30px!important;border:0!important;border-radius:10px!important;background:#fff8e6!important;color:#8a6100!important;font-size:20px!important;line-height:1!important;cursor:pointer;}
.disappearing-close:hover{background:#f3dfaa!important;}
.premium-disappearing-options{display:flex;flex-direction:column;gap:8px;margin:12px;padding:0;}
.premium-disappearing-options button{position:relative;width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:12px 44px 12px 13px;border:1px solid rgba(234,223,202,.94);border-radius:15px;background:#fff;color:#1f2937;cursor:pointer;transition:.16s ease;}
.premium-disappearing-options button span{display:block;min-width:0;}
.premium-disappearing-options button b{display:block;font-size:13px;color:#2b220f;margin-bottom:2px;}
.premium-disappearing-options button small{display:block;font-size:11px;color:#7a6a45;font-weight:500;line-height:1.25;}
.premium-disappearing-options button::after{content:'';position:absolute;right:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;border-radius:50%;border:2px solid rgba(212,175,55,.48);background:#fff;box-sizing:border-box;}
.premium-disappearing-options button:hover{border-color:#d4af37;background:#fffaf0;box-shadow:0 8px 20px rgba(212,175,55,.10);transform:translateY(-1px);}
.premium-disappearing-options button.active{border-color:#d4af37;background:linear-gradient(135deg,#fff8de,#fff);box-shadow:0 10px 24px rgba(212,175,55,.14);}
.premium-disappearing-options button.active::after{background:#d4af37;box-shadow:inset 0 0 0 4px #fff;border-color:#d4af37;}
.premium-disappearing-note{margin:0;padding:13px 18px 16px;border-top:1px solid rgba(234,223,202,.72);background:#fffaf0;color:#7a6a45!important;font-size:11.5px;line-height:1.35;}
@media(max-width:1200px){#disappearingModal.modal{padding:70px 18px 0 0;}}
@media(max-width:760px){#disappearingModal.modal{padding:70px 10px 0 10px;justify-items:center;}}


/* Patch V1_8_123 - status premium de upload/envio de mídia */
#previewContent{align-items:center;flex-wrap:wrap}.media-upload-status{width:100%;margin-top:8px;border:1px solid rgba(189,142,0,.18);background:linear-gradient(180deg,#fffaf0,#fff);border-radius:12px;padding:8px 10px;box-shadow:0 8px 18px rgba(99,73,0,.06)}.media-upload-label{display:flex;align-items:center;gap:8px;font-size:12px;color:#6d550b}.media-upload-label b{font-size:12px;color:#3b2b00}.media-upload-label small{margin-left:auto;color:#8a7a50;font-weight:600}.media-upload-dot{width:9px;height:9px;border-radius:50%;background:#caa11c;box-shadow:0 0 0 3px rgba(202,161,28,.12)}.media-upload-track{height:5px;border-radius:999px;background:#efe5ca;overflow:hidden;margin-top:7px}.media-upload-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#d8b231,#bd8e00);transition:width .18s ease}.media-upload-status.uploading .media-upload-dot,.media-upload-status.processing .media-upload-dot{animation:uploadPulse 1s infinite}.media-upload-status.done{border-color:rgba(30,173,92,.22);background:#f4fff8}.media-upload-status.done .media-upload-dot,.media-upload-status.done .media-upload-track i{background:#23b26b}.media-upload-status.error{border-color:rgba(211,68,68,.25);background:#fff7f7}.media-upload-status.error .media-upload-dot,.media-upload-status.error .media-upload-track i{background:#d34444}.media-upload-actions{display:flex;justify-content:flex-end;margin-top:8px}.media-upload-actions button{border:1px solid #caa11c;background:#fff;color:#9a6b00;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:800}.media-upload-actions button:hover{background:#fff5d9}.hidden{display:none!important}@keyframes uploadPulse{0%{box-shadow:0 0 0 0 rgba(202,161,28,.22)}70%{box-shadow:0 0 0 7px rgba(202,161,28,0)}100%{box-shadow:0 0 0 0 rgba(202,161,28,0)}}


/* Seleção múltipla de mensagens */
.message-selection-toolbar{position:sticky;top:0;z-index:18;margin:8px auto 10px;max-width:760px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid rgba(202,161,28,.28);background:linear-gradient(135deg,#fffaf0,#fff);box-shadow:0 10px 28px rgba(0,0,0,.10);border-radius:18px;color:var(--ink)}
.message-selection-toolbar strong{color:var(--gold-dark)}
.message-selection-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.message-selection-actions button{border:1px solid rgba(202,161,28,.22);background:#fff;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700;color:#4a3b14;box-shadow:0 3px 10px rgba(0,0,0,.06)}
.message-selection-actions button:hover{background:var(--gold-pale);border-color:rgba(202,161,28,.45)}
.msg-row.select-mode{cursor:pointer;position:relative}
.msg-row.is-selected .bubble{outline:2px solid rgba(202,161,28,.55);box-shadow:0 8px 22px rgba(202,161,28,.18)}
.msg-select-check{width:24px;height:24px;border-radius:999px;border:2px solid rgba(202,161,28,.55);background:#fff;color:#111;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:13px;margin:0 6px;align-self:center;box-shadow:0 4px 12px rgba(0,0,0,.10);flex:0 0 auto}
.msg-row.is-selected .msg-select-check{background:var(--gold);border-color:var(--gold-dark);color:#111}
.msg-row.me .msg-select-check{order:3}
@media(max-width:780px){.message-selection-toolbar{align-items:flex-start;flex-direction:column}.message-selection-actions{justify-content:flex-start}.message-selection-actions button{font-size:11px;padding:6px 8px}}


/* Separador interno de mensagens não lidas - estilo WhatsApp/CRM premium */
.unread-chat-separator{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:14px 0 10px;
  color:#8a6a14;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:none;
  pointer-events:none;
}
.unread-chat-separator::before,
.unread-chat-separator::after{
  content:"";
  height:1px;
  flex:1;
  max-width:220px;
  background:linear-gradient(90deg, transparent, rgba(194,151,47,.32));
}
.unread-chat-separator::after{
  background:linear-gradient(90deg, rgba(194,151,47,.32), transparent);
}
.unread-chat-separator span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 12px;
  border-radius:999px;
  background:linear-gradient(135deg,#fff8df,#f3d67a);
  border:1px solid rgba(194,151,47,.34);
  box-shadow:0 8px 18px rgba(156,116,20,.12);
  color:#5b4306;
}
.msg-row + .unread-chat-separator{ margin-top:18px; }

/* PATCH V1_8_126 - composer mais fiel ao WhatsApp oficial */
.modern-composer{
  min-height:64px;
  height:auto;
  padding:9px 12px 10px;
  gap:7px;
  align-items:flex-end;
  background:#f0f2f5;
  border-top:1px solid rgba(11,20,26,.08);
  box-shadow:0 -1px 0 rgba(11,20,26,.03);
}
.modern-composer .chat-icon-btn{
  width:40px;
  height:40px;
  min-width:40px;
  border:0;
  background:transparent;
  color:#54656f;
  box-shadow:none;
}
.modern-composer .chat-icon-btn:hover{
  background:rgba(84,101,111,.10);
  color:#3b4a54;
  border-color:transparent;
  transform:none;
}
.message-input-wrap{
  min-height:44px;
  height:auto;
  max-height:122px;
  background:#fff;
  border:0;
  border-radius:22px;
  padding:0 4px;
  box-shadow:0 1px 2px rgba(11,20,26,.08);
}
.message-input-wrap:focus-within{
  border-color:transparent;
  box-shadow:0 1px 2px rgba(11,20,26,.10),0 0 0 1px rgba(212,175,55,.18);
}
.modern-composer textarea{
  min-height:42px;
  max-height:112px;
  height:42px;
  padding:11px 12px 10px;
  line-height:20px;
  font-size:15px;
  color:#111b21;
  overflow-y:auto;
}
.modern-composer textarea::placeholder{color:#667781}
.quick-select{
  height:38px;
  max-width:104px;
  border:0;
  border-radius:19px;
  background:#fff;
  color:#6b5a2d;
  box-shadow:0 1px 2px rgba(11,20,26,.08);
  font-size:12px;
}
.modern-send{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  background:#00a884!important;
  box-shadow:0 2px 7px rgba(0,168,132,.25)!important;
  transform:none!important;
  opacity:0;
  pointer-events:none;
  scale:.86;
}
.modern-composer.has-text .modern-send,
.modern-composer.has-media .modern-send{
  opacity:1;
  pointer-events:auto;
  scale:1;
}
.modern-composer.has-text #recordBtn,
.modern-composer.has-media #recordBtn{
  opacity:0;
  pointer-events:none;
  width:0;
  min-width:0;
  margin-left:-7px;
  overflow:hidden;
}
.modern-send:hover{
  transform:none!important;
  box-shadow:0 3px 10px rgba(0,168,132,.30)!important;
}
.modern-send .send-ico{width:20px;height:20px;stroke-width:2.3}
.modern-attach-pop{
  bottom:50px;
  border-radius:18px;
  box-shadow:0 14px 44px rgba(11,20,26,.20);
}
.record,.preview{
  background:#f0f2f5;
  border-top:1px solid rgba(11,20,26,.08);
}
@media (max-width:900px){
  .quick-select{display:none}
  .modern-composer{padding:8px;gap:5px}
  .modern-composer .chat-icon-btn{width:38px;min-width:38px;height:38px}
}

/* PATCH V1_8_127 - restaura composer premium dourado do projeto */
.modern-composer{
  min-height:76px!important;
  height:auto!important;
  padding:12px 18px!important;
  gap:12px!important;
  align-items:center!important;
  background:linear-gradient(180deg,#fffdf8,#fffaf0)!important;
  border-top:1px solid #eadfca!important;
  box-shadow:0 -10px 28px rgba(62,43,8,.07), inset 0 1px 0 rgba(255,255,255,.85)!important;
}
.modern-composer .chat-icon-btn{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border-radius:50%!important;
  border:1px solid #eadfca!important;
  background:#fff!important;
  color:#a97705!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:0 8px 18px rgba(90,63,12,.08)!important;
  transition:.16s ease!important;
}
.modern-composer .chat-icon-btn:hover{
  background:#fff4dc!important;
  color:#8a6100!important;
  border-color:#d4af37!important;
  transform:translateY(-1px)!important;
  box-shadow:0 10px 22px rgba(90,63,12,.12)!important;
}
.message-input-wrap{
  min-height:48px!important;
  height:auto!important;
  max-height:128px!important;
  background:#fff!important;
  border:1px solid #eadfca!important;
  border-radius:28px!important;
  padding:0 12px!important;
  box-shadow:0 8px 20px rgba(90,63,12,.06), inset 0 1px 0 rgba(255,255,255,.9)!important;
}
.message-input-wrap:focus-within{
  border-color:#d4af37!important;
  box-shadow:0 10px 24px rgba(90,63,12,.09),0 0 0 4px rgba(212,175,55,.12)!important;
}
.modern-composer textarea{
  min-height:46px!important;
  height:46px!important;
  max-height:116px!important;
  padding:13px 8px 11px!important;
  line-height:21px!important;
  font-size:15px!important;
  color:#243041!important;
  background:transparent!important;
}
.modern-composer textarea::placeholder{color:#8b95a1!important}
.quick-select{
  height:46px!important;
  max-width:132px!important;
  border:1px solid #eadfca!important;
  border-radius:23px!important;
  background:#fff!important;
  color:#8a6100!important;
  padding:0 14px!important;
  font-size:13px!important;
  font-weight:800!important;
  box-shadow:0 8px 18px rgba(90,63,12,.07)!important;
}
.quick-select:focus{border-color:#d4af37!important;box-shadow:0 0 0 4px rgba(212,175,55,.12)!important}
.modern-send{
  width:50px!important;
  height:50px!important;
  min-width:50px!important;
  border-radius:50%!important;
  background:linear-gradient(135deg,#e4c65a 0%,#c29100 52%,#a97705 100%)!important;
  color:#fff!important;
  border:1px solid rgba(137,94,0,.22)!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:0 14px 28px rgba(169,119,5,.28), inset 0 1px 0 rgba(255,255,255,.36)!important;
  opacity:1!important;
  pointer-events:auto!important;
  scale:1!important;
  transform:none!important;
  margin-left:2px!important;
}
.modern-send:hover{
  transform:translateY(-1px) scale(1.02)!important;
  box-shadow:0 18px 34px rgba(169,119,5,.34), inset 0 1px 0 rgba(255,255,255,.36)!important;
}
.modern-send .send-ico{width:22px!important;height:22px!important;stroke-width:2.35!important}
.modern-composer.has-text #recordBtn,
.modern-composer.has-media #recordBtn{
  opacity:1!important;
  pointer-events:auto!important;
  width:46px!important;
  min-width:46px!important;
  margin-left:0!important;
  overflow:visible!important;
}
.modern-attach-pop{
  bottom:58px!important;
  border:1px solid #eadfca!important;
  border-radius:18px!important;
  box-shadow:0 18px 54px rgba(36,25,7,.22)!important;
}
.record,.preview{
  background:#fffdf8!important;
  border-top:1px solid #eadfca!important;
}
@media (max-width:900px){
  .modern-composer{min-height:66px!important;padding:9px!important;gap:7px!important}
  .modern-composer .chat-icon-btn{width:40px!important;min-width:40px!important;height:40px!important}
  .modern-send{width:44px!important;min-width:44px!important;height:44px!important}
  .quick-select{display:none!important}
  .message-input-wrap{min-height:44px!important;border-radius:24px!important}
}

/* PATCH V1_8_129 - botão enviar soft/pastel com dourado refinado */
.modern-send{
  width:50px!important;
  height:50px!important;
  min-width:50px!important;
  border-radius:50%!important;
  background:radial-gradient(circle at 32% 22%,#fff1c7 0%,#edc85f 42%,#c9920d 100%)!important;
  color:#fff!important;
  border:1px solid rgba(201,146,13,.58)!important;
  box-shadow:0 10px 22px rgba(154,104,0,.22), inset 0 1px 0 rgba(255,255,255,.62), inset 0 -10px 18px rgba(139,87,0,.12)!important;
  display:grid!important;
  place-items:center!important;
  opacity:1!important;
  pointer-events:auto!important;
  scale:1!important;
  transform:none!important;
  margin-left:2px!important;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease!important;
}
.modern-send:hover{
  transform:translateY(-1px)!important;
  filter:saturate(1.08) brightness(1.03)!important;
  box-shadow:0 13px 27px rgba(154,104,0,.28), 0 0 0 4px rgba(218,169,45,.10), inset 0 1px 0 rgba(255,255,255,.68), inset 0 -10px 18px rgba(139,87,0,.11)!important;
}
.modern-send:active{
  transform:translateY(0) scale(.96)!important;
  box-shadow:0 5px 13px rgba(154,104,0,.22), inset 0 1px 0 rgba(255,255,255,.50)!important;
}
.modern-send .send-ico{
  width:22px!important;
  height:22px!important;
  stroke-width:2.45!important;
  filter:drop-shadow(0 1px 1px rgba(114,75,0,.22));
}
.modern-send:disabled{
  opacity:.56!important;
  filter:grayscale(.18)!important;
  cursor:not-allowed!important;
}
@media (max-width:900px){
  .modern-send{width:44px!important;min-width:44px!important;height:44px!important}
  .modern-send .send-ico{width:20px!important;height:20px!important}
}

/* PATCH V1_8_130 - botão enviar integrado ao padrão dos outros botões */
.modern-send{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border-radius:50%!important;
  background:#fff!important;
  color:#a97705!important;
  border:1px solid #eadfca!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:0 8px 18px rgba(90,63,12,.08)!important;
  opacity:1!important;
  pointer-events:auto!important;
  scale:1!important;
  transform:none!important;
  margin-left:0!important;
  transition:.16s ease!important;
  filter:none!important;
}
.modern-send:hover{
  background:#fff4dc!important;
  color:#8a6100!important;
  border-color:#d4af37!important;
  transform:translateY(-1px)!important;
  box-shadow:0 10px 22px rgba(90,63,12,.12)!important;
  filter:none!important;
}
.modern-send:active{
  transform:translateY(0) scale(.96)!important;
  background:#fff0c8!important;
  box-shadow:0 4px 12px rgba(90,63,12,.10)!important;
}
.modern-send .send-ico{
  width:21px!important;
  height:21px!important;
  stroke-width:2.25!important;
  filter:none!important;
}
.modern-send:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
  filter:none!important;
}
@media (max-width:900px){
  .modern-send{width:40px!important;min-width:40px!important;height:40px!important}
  .modern-send .send-ico{width:19px!important;height:19px!important}
}

/* V1_8_131 - Animacoes premium leves estilo WhatsApp Desktop */
@keyframes starnailsMessageEnter{
  from{opacity:0;transform:translateY(8px) scale(.985);filter:blur(.3px)}
  to{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}
}
@keyframes starnailsSendPulse{
  0%{transform:scale(1)}
  45%{transform:scale(.94)}
  100%{transform:scale(1)}
}
@keyframes starnailsSoftGlow{
  from{box-shadow:0 1px 3px rgba(0,0,0,.06)}
  to{box-shadow:0 6px 18px rgba(126,91,10,.12)}
}
.messages .msg-row{
  animation:starnailsMessageEnter .22s cubic-bezier(.2,.8,.2,1) both;
  will-change:transform,opacity;
}
.messages .msg-row:nth-last-child(1){animation-duration:.24s}
.bubble{
  transition:box-shadow .18s ease, transform .18s ease, filter .18s ease, background-color .18s ease;
}
.msg-row:hover .bubble{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(48,36,12,.10)!important;
}
.msg-row.me:hover .bubble{
  box-shadow:0 6px 18px rgba(126,91,10,.14)!important;
}
.modern-composer,
.composer{
  transition:box-shadow .22s ease, background-color .22s ease, border-color .22s ease;
}
.modern-composer:focus-within,
.composer:focus-within{
  box-shadow:0 -8px 26px rgba(80,58,10,.06);
}
.modern-composer button,
.composer button,
.chat-tools .chat-tool-btn,
.message-actions button{
  transition:transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.modern-composer button:active,
.composer button:active,
.chat-tools .chat-tool-btn:active,
.message-actions button:active{
  transform:scale(.94)!important;
}
.modern-send:active,
.composer .send:active{
  animation:starnailsSendPulse .22s ease both;
}
.ticket{
  transition:background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.ticket:hover{
  transform:translateX(2px);
}
.preview,
.record,
.reply-preview-bar,
.pinned-message-bar{
  animation:starnailsMessageEnter .18s ease both;
}
@media (prefers-reduced-motion: reduce){
  .messages .msg-row,
  .preview,
  .record,
  .reply-preview-bar,
  .pinned-message-bar{
    animation:none!important;
  }
  .bubble,
  .ticket,
  .modern-composer button,
  .composer button,
  .chat-tools .chat-tool-btn,
  .message-actions button{
    transition:none!important;
  }
}

/* V1_8_132 - Ajuste: remove efeito de pulsar/movimento no hover do card da conversa */
.ticket,
.ticket:hover,
.ticket.active,
.ticket.ticket-pinned,
.ticket.timer-overdue{
  transform:none!important;
  animation:none!important;
}

/* V1_8_133 - Remove pulsacao no hover do card mantendo destaque visual */
.ticket:hover,
.ticket:hover::before,
.ticket:hover::after,
.ticket:hover *,
.ticket:hover *::before,
.ticket:hover *::after{
  animation-name:none!important;
  animation-duration:0s!important;
  animation-iteration-count:1!important;
}
.ticket:hover{
  transform:none!important;
  background:#fffaf0!important;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.14)!important;
}
.ticket:hover .avatar,
.ticket:hover .fallback,
.ticket:hover .unread,
.ticket:hover .account-highlight,
.ticket:hover .origin-chip,
.ticket:hover .status-chip,
.ticket:hover .ticket-timer{
  transform:none!important;
}

/* V1_8_134 - Remove pulsacao residual dos cards sem perder destaque do hover */
.ticket:hover,
.ticket:hover *{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
}
.ticket:hover .response-timer,
.ticket:hover .response-timer.overdue,
.ticket:hover .ticket-timer,
.ticket:hover .unread,
.ticket:hover .status-chip,
.ticket:hover .account-highlight,
.ticket:hover .origin-chip,
.ticket:hover .avatar,
.ticket:hover .fallback{
  animation:none!important;
  transform:none!important;
  filter:none!important;
}
.ticket:hover .response-timer.overdue{
  box-shadow:0 3px 10px rgba(193,18,31,.10)!important;
}
.ticket:hover{
  background:#fffaf0!important;
  border-color:rgba(212,175,55,.28)!important;
  box-shadow:0 10px 24px rgba(66,48,8,.075), inset 0 0 0 1px rgba(212,175,55,.14)!important;
  transform:none!important;
}

/* V1_8_135 - Correção definitiva: hover do card destacado, mas sem qualquer pulso */
.ticket:hover,
.ticket.timer-overdue:hover,
.ticket.timer-overdue.active:hover,
.ticket.active:hover,
.ticket.ticket-pinned:hover{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
  animation-play-state:paused!important;
  transform:none!important;
  will-change:auto!important;
  transition-property:background-color,border-color,color!important;
  background:#fffaf0!important;
  border-color:rgba(212,175,55,.28)!important;
  box-shadow:0 10px 24px rgba(66,48,8,.075), inset 0 0 0 1px rgba(212,175,55,.14)!important;
}
.ticket:hover::before,
.ticket:hover::after,
.ticket.timer-overdue:hover::before,
.ticket.timer-overdue:hover::after,
.ticket.active:hover::before,
.ticket.active:hover::after,
.ticket.ticket-pinned:hover::before,
.ticket.ticket-pinned:hover::after{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
  animation-play-state:paused!important;
  transform:none!important;
  transition:none!important;
  will-change:auto!important;
}
.ticket:hover *,
.ticket:hover *::before,
.ticket:hover *::after{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
  animation-play-state:paused!important;
  transform:none!important;
  will-change:auto!important;
}
.ticket:hover .response-timer,
.ticket:hover .response-timer.overdue,
.ticket:hover .ticket-timer,
.ticket:hover .ticket-timer.overdue,
.ticket:hover .unread,
.ticket:hover .status-chip,
.ticket:hover .account-highlight,
.ticket:hover .origin-chip,
.ticket:hover .avatar,
.ticket:hover .fallback,
.ticket:hover .pin-ticket-btn,
.ticket:hover .modern-pin-icon{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
  animation-play-state:paused!important;
  transform:none!important;
  filter:none!important;
  transition-property:background-color,border-color,color,opacity!important;
  will-change:auto!important;
}
.ticket:hover .response-timer.overdue,
.ticket:hover .ticket-timer.overdue{
  box-shadow:0 3px 10px rgba(193,18,31,.10)!important;
}

/* V1_8_136 - Hover dos cards sem piscar/flicker, mantendo destaque visual */
.ticket,
.ticket::before,
.ticket::after,
.ticket *,
.ticket *::before,
.ticket *::after{
  animation:none!important;
  animation-name:none!important;
  animation-duration:0s!important;
  animation-delay:0s!important;
  animation-iteration-count:1!important;
  animation-play-state:paused!important;
}
.ticket{
  will-change:auto!important;
  transform:none!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease!important;
}
.ticket:hover,
.ticket.active:hover,
.ticket.ticket-pinned:hover,
.ticket.timer-overdue:hover,
.ticket.timer-overdue.active:hover{
  animation:none!important;
  transform:none!important;
  filter:none!important;
  background:#fffaf0!important;
  border-color:rgba(212,175,55,.28)!important;
  box-shadow:inset 0 0 0 1px rgba(212,175,55,.14)!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease!important;
}
.ticket:hover::before,
.ticket:hover::after,
.ticket.active:hover::before,
.ticket.active:hover::after,
.ticket.ticket-pinned:hover::before,
.ticket.ticket-pinned:hover::after,
.ticket.timer-overdue:hover::before,
.ticket.timer-overdue:hover::after{
  animation:none!important;
  transform:none!important;
  filter:none!important;
  transition:none!important;
}
.ticket:hover *,
.ticket:hover *::before,
.ticket:hover *::after{
  animation:none!important;
  transform:none!important;
  filter:none!important;
  transition-property:background-color,border-color,color,opacity!important;
}
.ticket.timer-overdue,
.ticket.timer-overdue.active{
  animation:none!important;
}

/* V1_8_138 - Menu de anexos premium estilo WhatsApp/StarNails */
.modern-attach{position:relative!important}
.modern-attach .premium-attach-panel,
.attach-menu .premium-attach-panel{
  width:292px!important;
  min-width:292px!important;
  right:-8px!important;
  left:auto!important;
  bottom:58px!important;
  padding:10px!important;
  border-radius:22px!important;
  border:1px solid rgba(212,175,55,.22)!important;
  background:linear-gradient(180deg,#fffdf8 0%,#fffaf0 100%)!important;
  box-shadow:0 24px 70px rgba(36,25,7,.22),0 5px 16px rgba(212,175,55,.10)!important;
  overflow:hidden!important;
  transform-origin:bottom right!important;
}
.modern-attach.open .premium-attach-panel,
.modern-attach:focus-within .premium-attach-panel{
  display:block!important;
  animation:attachPremiumIn .16s ease-out both!important;
}
.modern-attach:hover .premium-attach-panel{display:block!important}
@keyframes attachPremiumIn{
  from{opacity:0;transform:translateY(8px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.attach-premium-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:8px 8px 10px!important;
  margin-bottom:6px!important;
  border-bottom:1px solid rgba(212,175,55,.16)!important;
}
.attach-premium-head strong{display:block;color:#3c2a05;font-size:14px;font-weight:900;letter-spacing:.1px}
.attach-premium-head span{display:block;color:#8a7a5d;font-size:11px;font-weight:700;margin-top:2px}
.attach-premium-close{
  width:30px!important;height:30px!important;min-width:30px!important;border-radius:50%!important;border:1px solid rgba(212,175,55,.20)!important;
  background:#fff!important;color:#8a6100!important;font-size:20px!important;line-height:1!important;display:grid!important;place-items:center!important;padding:0!important;
}
.attach-premium-close:hover{background:#fff2d2!important;border-color:rgba(212,175,55,.40)!important;transform:none!important}
.premium-attach-panel .premium-attach-item{
  width:100%!important;
  height:54px!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:8px 10px!important;
  border-radius:16px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#2f2a21!important;
  text-align:left!important;
  box-shadow:none!important;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease!important;
}
.premium-attach-panel .premium-attach-item:hover{
  background:#fff5df!important;
  border-color:rgba(212,175,55,.23)!important;
  color:#7a5500!important;
  transform:none!important;
}
.attach-item-copy{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important;line-height:1.1!important}
.attach-item-copy strong{font-size:13px!important;font-weight:900!important;color:inherit!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.attach-item-copy small{font-size:11px!important;font-weight:700!important;color:#8f846f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.premium-attach-panel .attach-ico{
  width:34px!important;height:34px!important;min-width:34px!important;border-radius:13px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 8px 18px rgba(65,43,4,.10)!important;
}
.premium-attach-panel .attach-ico.gif{background:linear-gradient(135deg,#151515,#4b3b15)!important;color:#f6d778!important;font-size:10px!important;font-weight:900!important;letter-spacing:.3px!important}
.premium-attach-panel .attach-ico.location{background:linear-gradient(135deg,#d7b34a,#9e7000)!important;color:#fff!important;font-size:16px!important}
.premium-attach-panel .attach-divider{height:1px!important;background:rgba(212,175,55,.14)!important;margin:7px 8px!important}
@media (max-width:760px){
  .modern-attach .premium-attach-panel,.attach-menu .premium-attach-panel{width:270px!important;min-width:270px!important;right:-48px!important}
}


/* V1_8_139 - Header, legenda de mídia e avatar refinados */
.chat-header .contact-line{
  margin-top:4px!important;
  gap:7px!important;
}
.chat-header .contact-tag,
.chat-person .contact-tag.colored-tag{
  height:22px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:22px!important;
  letter-spacing:.01em!important;
  background:linear-gradient(180deg,#f2fff6 0%,#e4f8ea 100%)!important;
  border:1px solid rgba(48,174,93,.32)!important;
  color:#17733a!important;
  box-shadow:0 4px 12px rgba(25,135,70,.08)!important;
  white-space:nowrap!important;
}
.chat-header .contact-tag.colored-tag::before,
.chat-person .contact-tag.colored-tag::before{
  width:7px!important;
  height:7px!important;
  margin-right:5px!important;
  background:#22a95a!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.88)!important;
}
.chat-header .origin-chip.origin-contact{
  height:22px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
  font-weight:900!important;
  background:linear-gradient(180deg,#f7fff9,#e6f8ec)!important;
  border:1px solid rgba(34,169,90,.30)!important;
  color:#17733a!important;
  box-shadow:0 4px 12px rgba(25,135,70,.07)!important;
}
.media-caption{
  margin-top:12px!important;
  padding-top:2px!important;
  display:block!important;
  color:#202124!important;
  font-size:14px!important;
  line-height:1.42!important;
  white-space:pre-wrap!important;
  word-break:break-word!important;
}
.media-image-trigger + .media-caption,
.wa-gif-message + .media-caption,
.wa-video-player + .media-caption,
.wa-audio-player + .media-caption{
  margin-top:12px!important;
}
.bubble > .media-caption:first-child{margin-top:0!important;}
.bubble .media-viewer-trigger + div:not(.media-caption){
  margin-top:12px!important;
  line-height:1.42!important;
}
.avatar,
.mini-avatar,
.big-avatar,
.fallback,
.contact-avatar .fallback,
.chat-person .avatar,
.ticket .avatar,
.ticket .fallback,
.msg-row .mini-avatar{
  aspect-ratio:1 / 1!important;
  border-radius:50%!important;
  object-fit:cover!important;
  object-position:center!important;
  flex:0 0 auto!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  line-height:1!important;
  text-align:center!important;
}
.avatar,.fallback{min-width:44px!important;max-width:44px!important;min-height:44px!important;max-height:44px!important;}
.chat-person .avatar,.chat-person .fallback{min-width:44px!important;max-width:44px!important;min-height:44px!important;max-height:44px!important;}
.mini-avatar{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;min-height:30px!important;max-height:30px!important;}
.big-avatar{width:92px!important;height:92px!important;min-width:92px!important;max-width:92px!important;min-height:92px!important;max-height:92px!important;}
.fallback{
  font-weight:900!important;
  background:linear-gradient(135deg,#d4af37,#a97705)!important;
  color:#fff!important;
}
.mini-avatar.fallback{font-size:12px!important;border:2px solid #fff!important;box-shadow:0 4px 12px rgba(0,0,0,.10)!important;}
.chat-person .fallback,.ticket .fallback{font-size:16px!important;}
.big-avatar.fallback{font-size:34px!important;}

/* ===== PATCH V1.8.140 - Etiquetas premium alinhadas no header da conversa ===== */
.chat-header .chat-person{
  min-width:0!important;
  gap:12px!important;
}
.chat-header .chat-title-block{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:5px!important;
}
.chat-header .chat-title-row{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  flex-wrap:wrap!important;
  line-height:1!important;
}
.chat-header .chat-title-name{
  display:block!important;
  font-size:16px!important;
  font-weight:900!important;
  color:#141414!important;
  letter-spacing:-.01em!important;
  line-height:1.12!important;
  min-width:0!important;
  max-width:310px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
.chat-header .header-badges,
.chat-header .contact-line{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  min-height:22px!important;
  line-height:1!important;
}
.chat-header .contact-line{
  margin:0!important;
  color:#5d6673!important;
  font-size:12px!important;
}
.chat-header .account-pill,
.chat-header .origin-chip,
.chat-header .contact-tag{
  height:23px!important;
  min-height:23px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:0 11px!important;
  border-radius:999px!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.01em!important;
  white-space:nowrap!important;
  margin:0!important;
  box-shadow:0 5px 13px rgba(66,48,8,.055), inset 0 1px 0 rgba(255,255,255,.82)!important;
  backdrop-filter:blur(6px)!important;
  transform:none!important;
  animation:none!important;
}
.chat-header .account-pill{
  background:linear-gradient(180deg,#fff8e8 0%,#fff1cc 100%)!important;
  border:1px solid rgba(212,175,55,.52)!important;
  color:#8a6100!important;
}
.chat-header .origin-chip{
  background:linear-gradient(180deg,#fffdf8 0%,#f4eee5 100%)!important;
  border:1px solid rgba(176,156,124,.36)!important;
  color:#6b6154!important;
}
.chat-header .origin-contact,
.chat-header .origin-group,
.chat-header .origin-channel,
.chat-header .contact-tag{
  background:linear-gradient(180deg,#f7fff9 0%,#eaf9ee 100%)!important;
  border:1px solid rgba(50,177,99,.34)!important;
  color:#11733a!important;
}
.chat-header .contact-tag::before{
  width:6px!important;
  height:6px!important;
  flex:0 0 6px!important;
  margin-right:1px!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.8)!important;
}
.chat-header .chat-person .avatar,
.chat-header .chat-person .fallback{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex:0 0 42px!important;
  object-fit:cover!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  box-shadow:0 4px 14px rgba(141,104,7,.12)!important;
}
@media(max-width:1180px){
  .chat-header .chat-title-name{max-width:220px!important;font-size:15px!important;}
  .chat-header .account-pill,.chat-header .origin-chip,.chat-header .contact-tag{font-size:11px!important;padding:0 9px!important;}
}


/* V1_8_142 - Etiquetas da conversa respeitam a cor configurada */
.chat-header .contact-tag.colored-tag,
.chat-person .contact-tag.colored-tag,
.contact-line .contact-tag.colored-tag{
  background:color-mix(in srgb,var(--tag-color,#d4af37) 14%,#fff 86%)!important;
  border:1px solid color-mix(in srgb,var(--tag-color,#d4af37) 58%,#fff 42%)!important;
  color:color-mix(in srgb,var(--tag-color,#d4af37) 72%,#2f2614 28%)!important;
  box-shadow:0 5px 13px color-mix(in srgb,var(--tag-color,#d4af37) 13%,transparent 87%), inset 0 1px 0 rgba(255,255,255,.82)!important;
}
.chat-header .contact-tag.colored-tag::before,
.chat-person .contact-tag.colored-tag::before,
.contact-line .contact-tag.colored-tag::before{
  background:var(--tag-color,#d4af37)!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.88)!important;
}

/* === PATCH V1_8_145 - Painel lateral premium (Dados do cliente) === */
.contact-panel:not(.collapsed){
  background:linear-gradient(180deg,#fffdf8 0%,#fbf7ee 100%)!important;
  border-left:1px solid rgba(202,161,28,.24)!important;
  padding:18px 16px!important;
  box-shadow:-10px 0 30px rgba(72,50,8,.05)!important;
}
.contact-panel h3{
  margin:4px 42px 16px 2px!important;
  font-size:15px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
  color:#262018!important;
}
.close-info{
  width:34px!important;
  height:34px!important;
  border-radius:12px!important;
  background:#fff!important;
  border:1px solid rgba(202,161,28,.22)!important;
  color:#8a6100!important;
  box-shadow:0 6px 16px rgba(66,48,8,.06)!important;
}
.close-info:hover{
  background:#fff5df!important;
  border-color:rgba(202,161,28,.45)!important;
  transform:translateY(-1px)!important;
}
.contact-info,
#contactInfo,
#contactDetails{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
  text-align:center!important;
}
.contact-avatar{display:flex!important;justify-content:center!important;margin-top:2px!important;}
.contact-info h2,
#contactInfo h2,
#contactDetails h2{
  margin:2px 0 0!important;
  font-size:18px!important;
  line-height:1.2!important;
  font-weight:900!important;
  color:#151515!important;
}
.contact-info>p,
#contactInfo>p,
#contactDetails>p{
  margin:-6px 0 4px!important;
  color:#6b5b3b!important;
  font-size:13px!important;
}
.big-avatar{
  width:92px!important;
  height:92px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  aspect-ratio:1/1!important;
  background:#efe7d6!important;
  border:3px solid #fff!important;
  box-shadow:0 12px 26px rgba(50,35,5,.14),0 0 0 1px rgba(202,161,28,.18)!important;
}
.outline{
  height:42px!important;
  border-radius:14px!important;
  border:1px solid rgba(202,161,28,.38)!important;
  background:linear-gradient(180deg,#fff 0%,#fff8e8 100%)!important;
  color:#8a6100!important;
  font-weight:900!important;
  box-shadow:0 8px 18px rgba(80,55,8,.05)!important;
  transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease!important;
}
.outline:hover{
  background:linear-gradient(180deg,#fffaf0 0%,#fff1cf 100%)!important;
  border-color:rgba(202,161,28,.60)!important;
  box-shadow:0 12px 22px rgba(202,161,28,.13)!important;
  transform:translateY(-1px)!important;
}
.ticket-actions-inline{gap:8px!important;margin:0 0 2px!important;}
.ticket-actions-inline button{
  height:38px!important;
  border-radius:13px!important;
  border:1px solid rgba(202,161,28,.22)!important;
  background:#fff!important;
  color:#8a6100!important;
  font-weight:800!important;
  box-shadow:0 6px 14px rgba(66,48,8,.04)!important;
}
.ticket-actions-inline button:hover{background:#fff6e3!important;border-color:rgba(202,161,28,.45)!important;}
.info-card{
  border:1px solid rgba(202,161,28,.20)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.86)!important;
  box-shadow:0 10px 26px rgba(66,48,8,.055)!important;
  padding:14px!important;
  backdrop-filter:blur(8px)!important;
}
.info-card h4{
  margin:0 0 12px!important;
  color:#1f2933!important;
  font-size:13px!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.info-card h4::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:99px;
  background:linear-gradient(135deg,#d8b24b,#a97705);
  box-shadow:0 0 0 4px rgba(216,178,75,.14);
}
.info-card p{
  margin:10px 0!important;
  color:#7a6a4b!important;
  line-height:1.35!important;
  font-size:12px!important;
}
.info-card p b{
  display:block!important;
  margin-top:3px!important;
  color:#1f2937!important;
  font-size:13px!important;
  font-weight:800!important;
  word-break:break-word!important;
}
.tag-card-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:10px!important;}
.tag-card-title h4{margin:0!important;}
.tag-card-title button,
.tag-add-btn,
#manageContactTags,
.note-actions button{
  border-radius:999px!important;
  border:1px solid rgba(202,161,28,.28)!important;
  background:#fff8e8!important;
  color:#8a6100!important;
  font-weight:900!important;
  box-shadow:0 6px 14px rgba(66,48,8,.04)!important;
}
.tag-card-title button{height:30px!important;padding:0 10px!important;font-size:11px!important;}
.tag-add-btn{height:34px!important;padding:0 14px!important;}
.selected-tags{display:flex!important;flex-wrap:wrap!important;gap:7px!important;justify-content:center!important;}
.tag,
.contact-tag,
.selected-tags .tag{
  border-radius:999px!important;
  padding:5px 10px!important;
  line-height:1!important;
  font-size:11px!important;
  font-weight:900!important;
  box-shadow:0 4px 12px rgba(66,48,8,.04)!important;
}
.info-card textarea{
  min-height:92px!important;
  border-radius:14px!important;
  border:1px solid rgba(202,161,28,.22)!important;
  background:#fffdf8!important;
  padding:12px!important;
  color:#1f2937!important;
  outline:none!important;
  resize:vertical!important;
}
.info-card textarea:focus{
  border-color:rgba(202,161,28,.55)!important;
  box-shadow:0 0 0 4px rgba(202,161,28,.11)!important;
  background:#fff!important;
}
.note-actions{display:flex!important;justify-content:flex-end!important;margin-top:8px!important;}
.note-actions button{height:34px!important;padding:0 13px!important;}
.contact-tag-picker{
  border:1px solid rgba(202,161,28,.22)!important;
  border-radius:16px!important;
  background:#fffdf8!important;
  padding:10px!important;
  box-shadow:0 10px 24px rgba(66,48,8,.07)!important;
}
.tag-picker-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:8px!important;}
.tag-picker-head button{border:0!important;background:transparent!important;color:#8a6100!important;font-size:20px!important;}
.tag-choices{display:flex!important;flex-wrap:wrap!important;gap:7px!important;}
.tag-choice{
  border-radius:999px!important;
  border:1px solid rgba(202,161,28,.22)!important;
  background:#fff!important;
  padding:7px 10px!important;
  color:#4b5563!important;
  font-weight:800!important;
}
.tag-choice.selected{box-shadow:0 0 0 3px rgba(202,161,28,.13)!important;}

/* V1_8_147 - Rollback sidebar premium: mantém visual anterior e impede foto/avatar esticar */
.contact-panel .big-avatar,
.contact-panel .contact-avatar img,
.contact-panel img.big-avatar,
.contact-panel .avatar,
.contact-panel img.avatar,
.chat-header .avatar,
.ticket .avatar,
.msg-row .mini-avatar{
  object-fit: cover !important;
  object-position: center !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
}
.contact-panel .big-avatar,
.contact-panel img.big-avatar{
  width: 92px !important;
  height: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  min-height: 92px !important;
  max-height: 92px !important;
}
.contact-panel .contact-avatar,
.contact-panel .contact-info{
  overflow: visible !important;
}

/* === PATCH V1_8_148 - Etiquetas e botões do painel lateral mais alinhados === */
.contact-panel:not(.collapsed){
  padding:18px 16px 20px!important;
}
.contact-info,
#contactInfo,
#contactDetails{
  gap:14px!important;
}
.contact-info .outline,
#contactInfo .outline,
#contactDetails .outline{
  margin:0!important;
}
.contact-info .outline + .outline,
#contactInfo .outline + .outline,
#contactDetails .outline + .outline{
  margin-top:8px!important;
}
.ticket-actions-inline{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
  margin:4px 0 8px!important;
}
.ticket-actions-inline button{
  height:40px!important;
  padding:0 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
.info-card.tag-card,
.contact-panel .tag-card{
  padding:16px!important;
  border-radius:18px!important;
  margin-top:14px!important;
}
.tag-card-title{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:center!important;
  gap:10px!important;
  margin-bottom:14px!important;
}
.tag-card-title h4{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  line-height:1.15!important;
}
.tag-card-title button,
#manageContactTags{
  height:34px!important;
  min-width:82px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.tag-card .selected-tags,
.contact-panel .selected-tags{
  min-height:34px!important;
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:8px!important;
  margin:0 0 12px!important;
  padding:2px 0!important;
}
.tag-card .contact-tag,
.tag-card .tag,
.contact-panel .selected-tags .contact-tag,
.contact-panel .selected-tags .tag{
  min-height:26px!important;
  padding:6px 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  margin:0!important;
}
.tag-card .tag-add-row,
.contact-panel .tag-add-row{
  margin-top:4px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
.tag-card .tag-add-btn,
.contact-panel .tag-add-btn{
  min-width:104px!important;
  height:36px!important;
  padding:0 16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-style:solid!important;
}
.contact-panel .big-avatar,
.contact-panel .contact-avatar img,
.contact-panel img.big-avatar{
  width:92px!important;
  height:92px!important;
  min-width:92px!important;
  max-width:92px!important;
  min-height:92px!important;
  max-height:92px!important;
  object-fit:cover!important;
  object-position:center!important;
  aspect-ratio:1/1!important;
  border-radius:999px!important;
}

/* === PATCH V1_8_149 - Sidebar compacta: botões com menos espaço e etiquetas à esquerda === */
.contact-panel:not(.collapsed){
  padding:14px 14px 18px!important;
}
.contact-info,
#contactInfo,
#contactDetails{
  gap:8px!important;
}
.contact-info h2,
#contactInfo h2,
#contactDetails h2{
  margin:8px 0 2px!important;
}
.contact-info p,
#contactInfo p,
#contactDetails p{
  margin:0 0 6px!important;
}
.contact-info .outline,
#contactInfo .outline,
#contactDetails .outline{
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0 12px!important;
}
.contact-info .outline + .outline,
#contactInfo .outline + .outline,
#contactDetails .outline + .outline{
  margin-top:6px!important;
}
.ticket-actions-inline{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin:6px 0 10px!important;
}
.ticket-actions-inline button{
  height:36px!important;
  min-height:36px!important;
  padding:0 10px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.info-card.tag-card,
.contact-panel .tag-card{
  padding:14px 14px 12px!important;
  margin-top:12px!important;
  min-height:auto!important;
}
.tag-card-title{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  align-items:center!important;
  gap:8px!important;
  margin-bottom:10px!important;
}
.tag-card-title h4{
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
}
.tag-card-title button,
#manageContactTags{
  height:30px!important;
  min-width:74px!important;
  padding:0 12px!important;
  margin:0!important;
}
.tag-card .selected-tags,
.contact-panel .selected-tags{
  width:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-start!important;
  align-content:flex-start!important;
  align-items:flex-start!important;
  gap:7px!important;
  margin:0 0 9px 0!important;
  padding:0!important;
  text-align:left!important;
}
.tag-card .selected-tags > *,
.contact-panel .selected-tags > *{
  margin:0!important;
  flex:0 0 auto!important;
}
.tag-card .contact-tag,
.tag-card .tag,
.contact-panel .selected-tags .contact-tag,
.contact-panel .selected-tags .tag,
.contact-panel .selected-tags .removable-tag{
  min-height:24px!important;
  height:24px!important;
  padding:0 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  margin:0!important;
  line-height:1!important;
}
.tag-card .tag-add-row,
.contact-panel .tag-add-row,
.add-tag-row{
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  text-align:left!important;
}
.tag-card .tag-add-btn,
.contact-panel .tag-add-btn,
.add-tag-row button,
#addContactTag{
  min-width:96px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 14px!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.contact-panel .info-card:not(.tag-card){
  margin-top:12px!important;
}

/* V1_8_152 - Viewer de mídia estilo WhatsApp oficial, mantendo tema claro/dourado do CRM */
body.media-viewer-open{overflow:hidden!important;}
.media-viewer-modal.wa-style-light-viewer{
  position:fixed!important;
  inset:0!important;
  z-index:9999!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  background:var(--page-bg,#fffaf2)!important;
  backdrop-filter:none!important;
  padding:0!important;
}
.media-viewer-modal.wa-style-light-viewer.hidden{display:none!important;}
.media-viewer-card.premium-media-viewer.wa-viewer-fullscreen{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  border-radius:0!important;
  border:0!important;
  box-shadow:none!important;
  background:linear-gradient(180deg,#fffdf8 0%,#fffaf1 100%)!important;
  display:grid!important;
  grid-template-rows:72px minmax(0,1fr) 96px!important;
  grid-template-columns:1fr!important;
  overflow:hidden!important;
}
.premium-media-viewer .wa-viewer-head{
  height:72px!important;
  min-height:72px!important;
  flex-basis:auto!important;
  padding:0 26px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  border-bottom:1px solid rgba(191,145,32,.16)!important;
  background:rgba(255,253,248,.96)!important;
  box-shadow:0 8px 24px rgba(74,48,8,.05)!important;
  grid-row:1!important;
}
.wa-viewer-close{
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  font-size:28px!important;
  line-height:1!important;
  color:#9b7000!important;
  border:1px solid rgba(200,157,43,.25)!important;
  background:#fffaf1!important;
}
.media-viewer-person{
  display:flex!important;
  align-items:center!important;
  min-width:0!important;
  gap:12px!important;
  margin-right:auto!important;
}
.media-viewer-person .mini-avatar,
.media-viewer-person-avatar .mini-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:50%!important;
  overflow:hidden!important;
}
.media-viewer-person .mini-avatar img,
.media-viewer-person-avatar .mini-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:50%!important;
}
.media-viewer-person strong{
  display:block!important;
  max-width:360px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:15px!important;
  color:#1d1a14!important;
  line-height:1.2!important;
}
.media-viewer-person small{
  display:block!important;
  margin-top:2px!important;
  font-size:12px!important;
  color:#7c6b51!important;
}
.premium-media-viewer .wa-viewer-actions{
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  margin-left:auto!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool{
  width:38px!important;
  height:38px!important;
  border-radius:12px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#9b7000!important;
  font-size:20px!important;
  font-weight:800!important;
  box-shadow:none!important;
  transition:background .16s ease,border-color .16s ease,transform .16s ease!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool:hover,
.wa-viewer-close:hover{
  background:#fff3d4!important;
  border-color:rgba(200,157,43,.38)!important;
  transform:translateY(-1px)!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool.active{
  background:#fff1c7!important;
  border-color:rgba(200,157,43,.50)!important;
  color:#b08300!important;
}
.premium-media-viewer .hidden-download{display:none!important;}
.premium-media-viewer .media-viewer-body{
  grid-row:2!important;
  min-height:0!important;
  width:100%!important;
  height:100%!important;
  padding:18px 96px!important;
  background:#fffaf2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.premium-media-viewer .media-stage{
  width:100%!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:auto!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
}
.premium-media-viewer .media-zoom-canvas{
  min-width:100%!important;
  min-height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.premium-media-viewer .zoomable-media{
  border-radius:8px!important;
  box-shadow:0 14px 38px rgba(40,28,8,.12)!important;
  background:#fff!important;
}
.premium-media-viewer .media-nav{
  width:44px!important;
  height:44px!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  z-index:3!important;
  border:1px solid rgba(191,145,32,.30)!important;
  background:#fffaf1!important;
  color:#9b7000!important;
  font-size:32px!important;
  box-shadow:0 12px 28px rgba(74,48,8,.10)!important;
}
.premium-media-viewer .media-prev{left:28px!important;}
.premium-media-viewer .media-next{right:28px!important;}
.premium-media-viewer .media-nav:disabled{
  opacity:.32!important;
  pointer-events:none!important;
  filter:grayscale(.2)!important;
}
.premium-media-viewer .media-thumbs-wrap{
  grid-row:3!important;
  min-height:96px!important;
  border-top:1px solid rgba(191,145,32,.18)!important;
  background:rgba(255,253,248,.96)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:8px 16px 10px!important;
}
.premium-media-viewer .media-thumbs{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  display:flex!important;
  gap:8px!important;
  justify-content:center!important;
  align-items:center!important;
  padding:0 10px!important;
  scrollbar-width:thin!important;
}
.premium-media-viewer .media-thumb{
  flex:0 0 auto!important;
  width:64px!important;
  height:64px!important;
  border-radius:8px!important;
  padding:3px!important;
  border:2px solid rgba(191,145,32,.18)!important;
  background:#fff!important;
  overflow:hidden!important;
  position:relative!important;
  box-shadow:0 4px 14px rgba(40,28,8,.08)!important;
  cursor:pointer!important;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease!important;
}
.premium-media-viewer .media-thumb:hover{transform:translateY(-1px)!important;border-color:rgba(191,145,32,.42)!important;}
.premium-media-viewer .media-thumb img,
.premium-media-viewer .media-thumb video{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:5px!important;
}
.premium-media-viewer .media-thumb.active{
  border-color:#c99716!important;
  box-shadow:0 0 0 3px rgba(201,151,22,.20),0 8px 22px rgba(40,28,8,.12)!important;
}
.premium-media-viewer .media-viewer-counter{
  position:static!important;
  min-width:auto!important;
  height:auto!important;
  padding:5px 14px!important;
  border-radius:999px!important;
  background:#fff7e1!important;
  color:#9b7000!important;
  border:1px solid rgba(200,157,43,.22)!important;
  font-weight:900!important;
  font-size:12px!important;
  box-shadow:none!important;
}
@media (max-width:900px){
  .premium-media-viewer .wa-viewer-head{height:64px!important;min-height:64px!important;padding:0 10px!important;gap:8px!important;}
  .media-viewer-person strong{max-width:150px!important;}
  .premium-media-viewer .wa-viewer-actions{gap:4px!important;}
  .premium-media-viewer .wa-viewer-actions .media-tool{width:32px!important;height:32px!important;font-size:16px!important;}
  .premium-media-viewer .media-viewer-body{padding:12px 58px!important;}
  .premium-media-viewer .media-prev{left:10px!important;}
  .premium-media-viewer .media-next{right:10px!important;}
  .premium-media-viewer .media-thumb{width:54px!important;height:54px!important;}
}


/* ===== PATCH V1.8.153 - Viewer mídia premium claro corrigido ===== */
body.media-viewer-open{overflow:hidden!important;}
.media-viewer-modal.wa-style-light-viewer:not(.hidden){
  position:fixed!important;inset:0!important;z-index:99999!important;
  display:block!important;background:#fffaf2!important;padding:0!important;overflow:hidden!important;
}
.media-viewer-card.premium-media-viewer.wa-viewer-fullscreen{
  position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;
  max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;
  background:#fffaf2!important;box-shadow:none!important;overflow:hidden!important;
  display:grid!important;grid-template-rows:74px minmax(0,1fr) 104px!important;grid-template-columns:1fr!important;
}
.premium-media-viewer .wa-viewer-head{
  grid-row:1!important;height:74px!important;min-height:74px!important;padding:0 22px!important;
  display:flex!important;align-items:center!important;gap:14px!important;
  background:#fffdf8!important;border-bottom:1px solid rgba(191,145,32,.18)!important;
  box-shadow:0 8px 26px rgba(74,48,8,.045)!important;z-index:8!important;
}
.premium-media-viewer .wa-viewer-close{
  order:0!important;flex:0 0 auto!important;width:42px!important;height:42px!important;border-radius:13px!important;
  display:grid!important;place-items:center!important;font-size:28px!important;font-weight:900!important;
  color:#a17400!important;background:#fff8e6!important;border:1px solid rgba(191,145,32,.28)!important;
  box-shadow:0 6px 18px rgba(74,48,8,.07)!important;
}
.premium-media-viewer .media-viewer-person{order:1!important;display:flex!important;align-items:center!important;gap:11px!important;min-width:220px!important;margin-right:auto!important;}
.premium-media-viewer .media-viewer-person strong{font-size:15px!important;font-weight:900!important;color:#141414!important;line-height:1.1!important;max-width:280px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;}
.premium-media-viewer .media-viewer-person small{font-size:12px!important;color:#7a6d5c!important;margin-top:3px!important;display:block!important;}
.premium-media-viewer .media-viewer-person-avatar .mini-avatar,
.premium-media-viewer .media-viewer-person-avatar .avatar,
.premium-media-viewer .media-viewer-person .mini-avatar{
  width:42px!important;height:42px!important;min-width:42px!important;border-radius:50%!important;overflow:hidden!important;
  box-shadow:0 4px 14px rgba(0,0,0,.08)!important;background:#fff!important;
}
.premium-media-viewer .media-viewer-person-avatar img,
.premium-media-viewer .media-viewer-person .mini-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;}
.premium-media-viewer .wa-viewer-actions{
  order:2!important;margin-left:auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:14px!important;flex-wrap:nowrap!important;max-width:calc(100vw - 420px)!important;overflow:visible!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action,
.premium-media-viewer .wa-viewer-actions .media-tool{
  width:54px!important;height:54px!important;min-width:54px!important;padding:4px 2px!important;border-radius:12px!important;
  border:1px solid transparent!important;background:transparent!important;box-shadow:none!important;color:#9b7000!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
  font-size:12px!important;font-weight:800!important;line-height:1!important;opacity:1!important;visibility:visible!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action b{font-size:21px!important;line-height:1!important;font-weight:900!important;color:#9b7000!important;display:block!important;}
.premium-media-viewer .wa-viewer-actions .wa-media-action span{font-size:10px!important;line-height:1.05!important;font-weight:800!important;color:#8a6100!important;white-space:nowrap!important;display:block!important;}
.premium-media-viewer .wa-viewer-actions .media-tool:hover,
.premium-media-viewer .wa-viewer-close:hover{background:#fff4d7!important;border-color:rgba(191,145,32,.38)!important;transform:translateY(-1px)!important;}
.premium-media-viewer .wa-viewer-actions .media-tool.active{background:#fff0c4!important;border-color:rgba(191,145,32,.42)!important;}
.premium-media-viewer .hidden-download{display:none!important;}
.premium-media-viewer .media-viewer-body{
  grid-row:2!important;width:100%!important;height:100%!important;min-height:0!important;padding:8px 82px 10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;background:#fffaf2!important;overflow:hidden!important;
}
.premium-media-viewer .media-stage{
  width:100%!important;height:100%!important;min-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;
  padding:0!important;margin:0!important;background:#fffaf2!important;overflow:auto!important;overscroll-behavior:contain!important;scrollbar-gutter:auto!important;
}
.premium-media-viewer .media-zoom-canvas{
  min-width:100%!important;min-height:100%!important;width:max-content!important;height:max-content!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:center!important;padding:18px!important;margin:auto!important;
}
.premium-media-viewer .zoomable-media{
  display:block!important;flex:0 0 auto!important;object-fit:contain!important;object-position:center center!important;margin:auto!important;
  max-width:none!important;max-height:none!important;border-radius:10px!important;background:#fff!important;
  box-shadow:0 16px 40px rgba(40,28,8,.14)!important;transform:none!important;transform-origin:center!important;
}
.premium-media-viewer .media-nav{
  position:absolute!important;top:50%!important;transform:translateY(-50%)!important;z-index:6!important;
  width:44px!important;height:44px!important;border-radius:50%!important;display:grid!important;place-items:center!important;
  border:1px solid rgba(191,145,32,.30)!important;background:#fffaf1!important;color:#9b7000!important;font-size:32px!important;font-weight:800!important;
  box-shadow:0 12px 28px rgba(74,48,8,.10)!important;opacity:1!important;
}
.premium-media-viewer .media-prev{left:24px!important;}
.premium-media-viewer .media-next{right:24px!important;}
.premium-media-viewer .media-nav:disabled{opacity:.30!important;filter:grayscale(.25)!important;pointer-events:none!important;}
.premium-media-viewer .media-thumbs-wrap{
  grid-row:3!important;height:104px!important;min-height:104px!important;background:#fffdf8!important;border-top:1px solid rgba(191,145,32,.18)!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;padding:8px 16px 9px!important;z-index:7!important;
}
.premium-media-viewer .media-thumbs{
  width:100%!important;max-width:100%!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;
  overflow-x:auto!important;overflow-y:hidden!important;padding:0 10px 2px!important;scrollbar-width:thin!important;scroll-behavior:smooth!important;
}
.premium-media-viewer .media-thumb{
  flex:0 0 58px!important;width:58px!important;height:58px!important;min-width:58px!important;border-radius:7px!important;padding:3px!important;
  border:2px solid rgba(191,145,32,.20)!important;background:#fff!important;overflow:hidden!important;position:relative!important;
  box-shadow:0 4px 12px rgba(40,28,8,.08)!important;cursor:pointer!important;
}
.premium-media-viewer .media-thumb img,
.premium-media-viewer .media-thumb video{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:4px!important;display:block!important;}
.premium-media-viewer .media-thumb.active{border-color:#c99716!important;box-shadow:0 0 0 3px rgba(201,151,22,.20),0 7px 18px rgba(40,28,8,.14)!important;}
.premium-media-viewer .media-thumb span{position:absolute!important;left:5px!important;bottom:5px!important;background:rgba(0,0,0,.58)!important;color:#fff!important;border-radius:999px!important;padding:2px 6px!important;font-size:10px!important;}
.premium-media-viewer .media-viewer-counter{
  position:static!important;display:block!important;padding:5px 14px!important;border-radius:999px!important;background:#fff7e1!important;
  color:#9b7000!important;border:1px solid rgba(200,157,43,.22)!important;font-weight:900!important;font-size:12px!important;box-shadow:none!important;
}
@media (max-width:1150px){
  .premium-media-viewer .wa-viewer-actions{gap:5px!important;max-width:calc(100vw - 300px)!important;}
  .premium-media-viewer .wa-viewer-actions .media-tool{width:38px!important;min-width:38px!important;height:40px!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action span{display:none!important;}
  .premium-media-viewer .media-viewer-body{padding-left:58px!important;padding-right:58px!important;}
  .premium-media-viewer .media-prev{left:10px!important;}.premium-media-viewer .media-next{right:10px!important;}
}

/* ===== PATCH V1.8.154 - Viewer mídia: topbar refinada, avatar visível e contador fixo ===== */
.media-viewer-card.premium-media-viewer.wa-viewer-fullscreen{
  grid-template-rows:78px minmax(0,1fr) 118px!important;
}
.premium-media-viewer .wa-viewer-head{
  height:78px!important;
  min-height:78px!important;
  padding:0 18px!important;
  gap:12px!important;
  background:linear-gradient(180deg,#fffefa 0%,#fffaf1 100%)!important;
}
.premium-media-viewer .wa-viewer-close{
  width:42px!important;
  height:42px!important;
  border-radius:14px!important;
  background:#fffaf1!important;
  border:1px solid rgba(191,145,32,.30)!important;
  color:#a87900!important;
  box-shadow:0 8px 20px rgba(74,48,8,.08)!important;
}
.premium-media-viewer .media-viewer-person{
  gap:12px!important;
  min-width:260px!important;
  max-width:380px!important;
}
.premium-media-viewer .media-viewer-person-avatar{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#fff7df!important;
  border:2px solid rgba(191,145,32,.24)!important;
  box-shadow:0 8px 22px rgba(74,48,8,.12)!important;
  overflow:hidden!important;
}
.premium-media-viewer .media-viewer-person-avatar .mini-avatar,
.premium-media-viewer .media-viewer-person-avatar .avatar,
.premium-media-viewer .media-viewer-person .mini-avatar{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  box-shadow:none!important;
  background:#fff!important;
}
.premium-media-viewer .media-viewer-person-avatar img,
.premium-media-viewer .media-viewer-person .mini-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:50%!important;
}
.premium-media-viewer .media-viewer-person strong{
  font-size:16px!important;
  font-weight:900!important;
  color:#17130d!important;
}
.premium-media-viewer .media-viewer-person small{
  font-size:12px!important;
  color:#7b6b50!important;
}
.premium-media-viewer .wa-viewer-actions{
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  max-width:calc(100vw - 470px)!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action,
.premium-media-viewer .wa-viewer-actions .media-tool{
  width:54px!important;
  min-width:54px!important;
  height:54px!important;
  padding:5px 3px!important;
  border-radius:15px!important;
  background:rgba(255,250,241,.60)!important;
  border:1px solid rgba(191,145,32,.16)!important;
  color:#9a7100!important;
  box-shadow:0 5px 16px rgba(74,48,8,.045)!important;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action b{
  font-size:20px!important;
  color:#a57900!important;
  line-height:1!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action span{
  font-size:9.5px!important;
  font-weight:850!important;
  color:#8a6100!important;
  margin-top:2px!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool:hover,
.premium-media-viewer .wa-viewer-close:hover{
  background:#fff3d4!important;
  border-color:rgba(191,145,32,.42)!important;
  box-shadow:0 8px 20px rgba(74,48,8,.10)!important;
  transform:translateY(-1px)!important;
}
.premium-media-viewer .media-viewer-body{
  padding:10px 86px 8px!important;
}
.premium-media-viewer .media-thumbs-wrap{
  position:relative!important;
  height:118px!important;
  min-height:118px!important;
  padding:10px 16px 16px!important;
  overflow:visible!important;
}
.premium-media-viewer .media-thumbs{
  height:68px!important;
  padding:0 10px 2px!important;
  align-items:center!important;
}
.premium-media-viewer .media-thumb{
  flex:0 0 60px!important;
  width:60px!important;
  height:60px!important;
  min-width:60px!important;
  border-radius:8px!important;
}
.premium-media-viewer .media-viewer-counter{
  position:absolute!important;
  left:50%!important;
  bottom:8px!important;
  transform:translateX(-50%)!important;
  z-index:10!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:72px!important;
  height:30px!important;
  padding:0 16px!important;
  border-radius:999px!important;
  background:#fff7df!important;
  color:#9b7000!important;
  border:1px solid rgba(191,145,32,.30)!important;
  box-shadow:0 8px 20px rgba(74,48,8,.08)!important;
  font-weight:900!important;
  font-size:12px!important;
  line-height:1!important;
}
@media (max-width:1150px){
  .premium-media-viewer .media-viewer-person{min-width:210px!important;}
  .premium-media-viewer .wa-viewer-actions{gap:5px!important;max-width:calc(100vw - 330px)!important;}
  .premium-media-viewer .wa-viewer-actions .media-tool{width:40px!important;min-width:40px!important;height:42px!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action span{display:none!important;}
}

/* ===== PATCH V1.8.155 - Viewer topbar real: ações visíveis, avatar premium e contador acima das miniaturas ===== */
.media-viewer-modal.wa-style-light-viewer:not(.hidden){
  background:#fffaf2!important;
}
.media-viewer-card.premium-media-viewer.wa-viewer-fullscreen{
  grid-template-rows:76px minmax(0,1fr) 120px!important;
  background:#fffaf2!important;
}
.premium-media-viewer .wa-viewer-head{
  height:76px!important;
  min-height:76px!important;
  padding:0 20px!important;
  gap:12px!important;
  background:linear-gradient(180deg,#fffefa 0%,#fffaf2 100%)!important;
  border-bottom:1px solid rgba(191,145,32,.20)!important;
  box-shadow:0 8px 24px rgba(74,48,8,.055)!important;
}
.premium-media-viewer .wa-viewer-close{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:14px!important;
  display:grid!important;
  place-items:center!important;
  color:#9b7000!important;
  background:#fff8e8!important;
  border:1px solid rgba(191,145,32,.32)!important;
  box-shadow:0 8px 20px rgba(74,48,8,.08)!important;
}
.premium-media-viewer .media-viewer-person{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:280px!important;
  max-width:420px!important;
  margin-right:auto!important;
}
.premium-media-viewer .media-viewer-person-avatar{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:radial-gradient(circle,#fff8df 0%,#f8e8b9 100%)!important;
  border:2px solid rgba(191,145,32,.30)!important;
  box-shadow:0 8px 22px rgba(74,48,8,.13)!important;
  overflow:hidden!important;
}
.premium-media-viewer .media-viewer-person-avatar .mini-avatar,
.premium-media-viewer .media-viewer-person-avatar .avatar,
.premium-media-viewer .media-viewer-person .mini-avatar{
  width:50px!important;
  height:50px!important;
  min-width:50px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:none!important;
}
.premium-media-viewer .media-viewer-person-avatar img,
.premium-media-viewer .media-viewer-person .mini-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:50%!important;
  display:block!important;
}
.premium-media-viewer .media-viewer-person strong{
  display:block!important;
  max-width:330px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:16px!important;
  font-weight:900!important;
  color:#17130d!important;
  line-height:1.15!important;
}
.premium-media-viewer .media-viewer-person small{
  display:block!important;
  margin-top:3px!important;
  font-size:12px!important;
  font-weight:650!important;
  color:#7b6b50!important;
  line-height:1.15!important;
}
.premium-media-viewer .wa-viewer-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  max-width:calc(100vw - 520px)!important;
  overflow:visible!important;
  flex-wrap:nowrap!important;
  margin-left:auto!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action,
.premium-media-viewer .wa-viewer-actions .media-tool{
  width:58px!important;
  min-width:58px!important;
  height:54px!important;
  padding:4px 3px!important;
  border-radius:15px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  opacity:1!important;
  visibility:visible!important;
  background:rgba(255,250,241,.72)!important;
  border:1px solid rgba(191,145,32,.18)!important;
  color:#9b7000!important;
  box-shadow:0 5px 15px rgba(74,48,8,.045)!important;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action b{
  display:block!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
  color:#9b7000!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action span{
  display:block!important;
  font-size:9.5px!important;
  line-height:1.05!important;
  font-weight:850!important;
  color:#8a6100!important;
  white-space:nowrap!important;
  max-width:58px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool:hover,
.premium-media-viewer .wa-viewer-close:hover{
  background:#fff3d6!important;
  border-color:rgba(191,145,32,.44)!important;
  box-shadow:0 9px 22px rgba(74,48,8,.10)!important;
  transform:translateY(-1px)!important;
}
.premium-media-viewer .media-viewer-body{
  padding:8px 88px 8px!important;
  background:#fffaf2!important;
}
.premium-media-viewer .media-stage{
  background:#fffaf2!important;
}
.premium-media-viewer .media-thumbs-wrap{
  grid-row:3!important;
  position:relative!important;
  height:120px!important;
  min-height:120px!important;
  padding:14px 18px 14px!important;
  gap:8px!important;
  background:#fffdf8!important;
  border-top:1px solid rgba(191,145,32,.20)!important;
  overflow:hidden!important;
}
.premium-media-viewer .media-viewer-counter{
  order:0!important;
  position:relative!important;
  left:auto!important;
  bottom:auto!important;
  transform:none!important;
  z-index:10!important;
  align-self:center!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:74px!important;
  height:30px!important;
  padding:0 15px!important;
  margin:0!important;
  border-radius:999px!important;
  background:#fff7df!important;
  color:#9b7000!important;
  border:1px solid rgba(191,145,32,.32)!important;
  box-shadow:0 8px 20px rgba(74,48,8,.08)!important;
  font-weight:900!important;
  font-size:12px!important;
  line-height:1!important;
}
.premium-media-viewer .media-thumbs{
  order:1!important;
  height:62px!important;
  min-height:62px!important;
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:0 8px 2px!important;
  scroll-behavior:smooth!important;
}
.premium-media-viewer .media-thumb{
  flex:0 0 58px!important;
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  border-radius:8px!important;
  padding:3px!important;
  border:2px solid rgba(191,145,32,.22)!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 4px 12px rgba(40,28,8,.08)!important;
}
.premium-media-viewer .media-thumb img,
.premium-media-viewer .media-thumb video{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
  border-radius:5px!important;
}
.premium-media-viewer .media-thumb.active{
  border-color:#c99716!important;
  box-shadow:0 0 0 3px rgba(201,151,22,.22),0 7px 18px rgba(40,28,8,.14)!important;
}
@media (max-width:1280px){
  .premium-media-viewer .media-viewer-person{min-width:220px!important;max-width:300px!important;}
  .premium-media-viewer .wa-viewer-actions{gap:4px!important;max-width:calc(100vw - 390px)!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action,
  .premium-media-viewer .wa-viewer-actions .media-tool{width:42px!important;min-width:42px!important;height:42px!important;border-radius:13px!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action b{font-size:18px!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action span{display:none!important;}
}

/* V1.8.156 - Viewer ações funcionais + avatar do contato correto */
.premium-media-viewer .media-viewer-person-avatar{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.premium-media-viewer .media-viewer-person-avatar img,
.premium-media-viewer .media-viewer-person-avatar .mini-avatar,
.premium-media-viewer .media-viewer-person-avatar .avatar,
.premium-media-viewer .media-viewer-person-avatar .fallback{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  box-shadow:none!important;
}
.premium-media-viewer .media-viewer-tools .wa-media-action{
  cursor:pointer!important;
}
.premium-media-viewer .media-viewer-tools .wa-media-action.active{
  background:linear-gradient(180deg,#fff6dd,#fffaf0)!important;
  border-color:#caa11c!important;
  color:#8a6100!important;
}
.media-viewer-popover{
  position:fixed;
  z-index:999999;
  width:260px;
  padding:8px;
  border-radius:16px;
  border:1px solid rgba(196,151,39,.22);
  background:rgba(255,253,248,.98);
  box-shadow:0 18px 46px rgba(95,67,8,.18);
  backdrop-filter:blur(10px);
}
.media-viewer-popover button{
  width:100%;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border-radius:12px;
  color:#6f4f00;
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.media-viewer-popover button:hover{
  background:#fff3d1;
}
.media-viewer-popover button span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* V1.8.157 - Viewer: ações realmente clicáveis e avatar igual ao da conversa */
.premium-media-viewer .wa-viewer-actions,
.premium-media-viewer .wa-viewer-actions .wa-media-action,
.premium-media-viewer .wa-viewer-actions .media-tool{
  pointer-events:auto!important;
  position:relative!important;
  z-index:120!important;
}
.premium-media-viewer .media-viewer-head{
  pointer-events:auto!important;
  z-index:110!important;
}
.premium-media-viewer .media-viewer-person-avatar{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
.premium-media-viewer .media-viewer-person-avatar .avatar,
.premium-media-viewer .media-viewer-person-avatar .mini-avatar,
.premium-media-viewer .media-viewer-person-avatar img,
.premium-media-viewer .media-viewer-person-avatar .fallback{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  border:0!important;
  box-shadow:none!important;
}

/* V1.8.159 - Viewer: ícones premium consistentes e botão Compartilhar sem corte */
.premium-media-viewer .wa-viewer-actions{
  gap:8px!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action,
.premium-media-viewer .wa-viewer-actions .media-tool{
  width:64px!important;
  min-width:64px!important;
  height:58px!important;
  border-radius:16px!important;
  padding:6px 5px!important;
  background:rgba(255,251,244,.88)!important;
  border:1px solid rgba(191,145,32,.20)!important;
  box-shadow:0 8px 20px rgba(74,48,8,.06)!important;
}
.premium-media-viewer .wa-viewer-actions .media-action-share{
  width:82px!important;
  min-width:82px!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action .viewer-ico,
.premium-media-viewer .wa-viewer-actions .wa-media-action b.viewer-ico{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:24px!important;
  height:24px!important;
  font-size:0!important;
  color:#a67605!important;
  margin:0!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action .viewer-ico svg{
  width:23px!important;
  height:23px!important;
  display:block!important;
  color:inherit!important;
  stroke:currentColor!important;
}
.premium-media-viewer .wa-viewer-actions .wa-media-action span{
  max-width:none!important;
  width:100%!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  font-size:10px!important;
  letter-spacing:-.15px!important;
}
.premium-media-viewer .wa-viewer-actions .media-tool:hover{
  background:#fff4dc!important;
  border-color:rgba(191,145,32,.42)!important;
  box-shadow:0 10px 24px rgba(74,48,8,.12)!important;
}
@media (max-width: 1280px){
  .premium-media-viewer .wa-viewer-actions .wa-media-action,
  .premium-media-viewer .wa-viewer-actions .media-tool{width:48px!important;min-width:48px!important;height:46px!important;padding:4px!important;}
  .premium-media-viewer .wa-viewer-actions .media-action-share{width:52px!important;min-width:52px!important;}
  .premium-media-viewer .wa-viewer-actions .wa-media-action span{display:none!important;}
}

/* ===== PATCH V1.8.165 - Hora colada ao pin na lista de conversas ===== */
.ticket{
  position:relative!important;
}
.ticket .ticket-body{
  padding-right:74px!important;
}
.ticket .ticket-top{
  position:static!important;
  padding-right:0!important;
}
.ticket .ticket-top time{
  position:absolute!important;
  right:41px!important;
  top:18px!important;
  margin:0!important;
  width:auto!important;
  min-width:auto!important;
  flex:0 0 auto!important;
  text-align:right!important;
  white-space:nowrap!important;
  color:#8a6100!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  z-index:3!important;
}
.ticket .pin-ticket-btn{
  right:8px!important;
  top:10px!important;
}
.ticket .unread{
  right:12px!important;
  top:47px!important;
  transform:none!important;
}
.ticket:not(:has(.pin-ticket-btn)) .ticket-top time{
  right:14px!important;
}
@media(max-width:1280px){
  .ticket .ticket-body{padding-right:68px!important;}
  .ticket .ticket-top time{right:38px!important;}
}

/* ===== PATCH V1.8.166 - Não lidas premium na lista de conversas ===== */
.ticket.has-unread,
.ticket.unread-ticket,
.ticket[data-unread="true"]{
  background:linear-gradient(90deg, rgba(255,248,229,.98), rgba(255,255,255,.98));
}
.ticket.has-unread .ticket-body strong,
.ticket.unread-ticket .ticket-body strong,
.ticket[data-unread="true"] .ticket-body strong{
  font-weight:900;
  color:#14110b;
}
.ticket.has-unread .ticket-body p,
.ticket.unread-ticket .ticket-body p,
.ticket[data-unread="true"] .ticket-body p{
  font-weight:800;
  color:#2d2617;
}
.ticket .unread{
  background:linear-gradient(180deg,#d6ad28,#a87500)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.75);
  box-shadow:0 5px 12px rgba(168,117,0,.23);
  min-width:19px;
  height:19px;
  padding:0 5px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  line-height:19px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ticket .ticket-meta,
.ticket .ticket-right,
.ticket .ticket-side{
  align-items:center;
}
.ticket .ticket-pin,
.ticket .pin-indicator,
.ticket .pinned-indicator{
  flex:0 0 auto;
}
