:root{--bg:#0b0d0c;--panel:#121513;--line:#252a27;--text:#f5f7f5;--muted:#929a95;--accent:#20d56b;--accent2:#0ea84e}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,Arial,sans-serif}.layout{display:flex;min-height:100vh}.sidebar{width:255px;background:#0e110f;border-right:1px solid var(--line);padding:24px 16px;position:fixed;inset:0 auto 0 0}.brand{font-size:23px;font-weight:800;margin:0 10px 30px}.brand span{color:var(--accent)}.nav a{display:block;color:#c8cfca;text-decoration:none;padding:12px 14px;border-radius:10px;margin:5px 0}.nav a:hover,.nav a.active{background:#183322;color:#fff}.main{margin-left:255px;width:calc(100% - 255px);padding:28px}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:20px}.metric{font-size:30px;font-weight:800;margin-top:10px}.muted{color:var(--muted)}.btn{background:var(--accent);border:0;color:#06170c;padding:11px 16px;border-radius:10px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-block}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:13px;border-bottom:1px solid var(--line)}input,textarea,select{width:100%;background:#0c0f0d;border:1px solid #303632;color:#fff;padding:12px;border-radius:9px;margin:6px 0 14px}.login{min-height:100vh;display:grid;place-items:center}.login .card{width:min(420px,92vw)}@media(max-width:900px){.sidebar{width:76px;padding:20px 8px}.brand{font-size:0}.brand:after{content:'LC';font-size:20px;color:var(--accent)}.nav a{font-size:0}.nav a:before{content:'•';font-size:24px}.main{margin-left:76px;width:calc(100% - 76px);padding:18px}.grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.grid{grid-template-columns:1fr}}
.notice{background:#102c1b;border:1px solid #205f38;color:#bff6d2;padding:13px 16px;border-radius:12px;margin-bottom:18px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.space-top{margin-top:16px}.qr-box{text-align:center;padding:18px}.qr-placeholder{width:150px;height:150px;margin:8px auto 16px;border:2px dashed #334239;border-radius:16px;display:grid;place-items:center;font-size:34px;font-weight:900;color:#526258;background:#0b0e0c}.status{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;text-transform:capitalize;background:#2a2e2b}.status.connected{background:#123d24;color:#6ff09e}.status.qr_pending{background:#423815;color:#f5d66b}.status.disconnected{background:#3b2020;color:#ff9b9b}.table-wrap{overflow:auto}.chat-shell{display:grid;grid-template-columns:340px 1fr;min-height:680px;background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden}.chat-list{border-right:1px solid var(--line);background:#0f1210}.chat-search{padding:14px;border-bottom:1px solid var(--line)}.chat-search input{margin:0}.empty-chat{padding:28px 18px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:8px}.chat-main{display:grid;grid-template-rows:auto 1fr auto}.chat-head{padding:18px;border-bottom:1px solid var(--line)}.small{font-size:12px;margin-top:3px}.chat-body{display:grid;place-items:center;padding:24px;background:radial-gradient(circle at center,#152019 0,#0c0f0d 65%)}.chat-welcome{text-align:center;max-width:430px}.chat-icon{font-size:52px;color:var(--accent)}.chat-compose{padding:14px;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:10px}.chat-compose input{margin:0}@media(max-width:900px){.two-col{grid-template-columns:1fr}.chat-shell{grid-template-columns:1fr;min-height:600px}.chat-list{display:none}.wa-stats{grid-template-columns:1fr 1fr}}

/* v1.3 Central de Conversas */
.chat-shell{display:grid;grid-template-columns:360px 1fr;min-height:680px;background:#0b1211;border:1px solid #20352f;border-radius:22px;overflow:hidden}.chat-list{border-right:1px solid #20352f;background:#0d1715}.chat-search{padding:16px}.chat-search input,.composer textarea{width:100%;background:#111f1c;border:1px solid #29433b;color:#fff;border-radius:12px;padding:12px}.chat-item{display:flex;gap:12px;align-items:center;padding:14px 16px;color:#fff;text-decoration:none;border-top:1px solid #172824}.chat-item:hover,.chat-item.active{background:#13251f}.avatar{width:44px;height:44px;min-width:44px;border-radius:50%;display:grid;place-items:center;background:#13d68f;color:#062017;font-weight:800}.chat-meta{min-width:0;display:flex;flex-direction:column;flex:1}.chat-meta span{color:#8fa9a1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.badge{background:#18e69b;color:#052018;border-radius:20px;padding:3px 8px}.chat-panel{display:flex;flex-direction:column;min-width:0}.chat-header{display:flex;gap:12px;align-items:center;padding:15px 20px;border-bottom:1px solid #20352f}.chat-header small{display:block;color:#8fa9a1}.messages{flex:1;overflow:auto;padding:24px;background:radial-gradient(circle at top,#11251f,#09110f)}.bubble{max-width:72%;width:max-content;margin:8px 0;padding:10px 12px;border-radius:14px;background:#1c2a27;color:#fff}.bubble.out{margin-left:auto;background:#0d6f50}.bubble small{display:block;color:#a9c1ba;font-size:10px;margin-top:5px}.composer{display:flex;gap:10px;padding:14px;border-top:1px solid #20352f}.composer textarea{resize:none}.composer button{border:0;border-radius:12px;background:#17df96;color:#052018;font-weight:800;padding:0 22px}.chat-placeholder,.empty{padding:30px;color:#8fa9a1}.chat-placeholder{margin:auto;text-align:center}.top select{background:#111f1c;color:#fff;border:1px solid #29433b;padding:10px;border-radius:10px}@media(max-width:850px){.chat-shell{grid-template-columns:1fr}.chat-list{max-height:300px;border-right:0;border-bottom:1px solid #20352f}.chat-panel{min-height:520px}.bubble{max-width:88%}}
.ai-output{margin-top:18px;padding:16px;border-radius:12px;background:#0d2118;border:1px solid #235a3a;white-space:pre-wrap}.card h2{margin-top:0}.main h1{font-size:38px;margin-top:10px}

.automation-tip{display:flex;flex-direction:column;gap:5px;padding:14px 0;border-bottom:1px solid var(--line)}.automation-tip strong{color:#fff}.automation-tip span{color:var(--muted);line-height:1.45}.btn-small{padding:7px 10px;font-size:12px}.btn-danger{background:#522323;color:#ffcaca}.table form{margin:0}

/* v1.5.4 Central de Conversas Pro */
.conversations-page{padding-bottom:18px}.conversations-top{margin-bottom:16px}.conversations-top h1{margin-bottom:5px}.chat-v2{height:calc(100vh - 165px);min-height:620px;grid-template-columns:370px minmax(0,1fr);box-shadow:0 18px 50px #0004}.chat-v2 .chat-list{display:flex;flex-direction:column;min-height:0}.chat-list-scroll{overflow-y:auto;min-height:0}.chat-name-row{display:flex;align-items:center;gap:8px}.chat-name-row strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.chat-name-row time{font-size:10px;color:#789087}.chat-v2 .chat-item{min-height:72px}.chat-v2 .chat-item.active{box-shadow:inset 3px 0 #17df96}.chat-v2 .chat-panel{min-height:0;background:#09110f}.chat-person{min-width:0}.chat-person strong,.chat-person small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:420px}.live-dot{margin-left:auto;color:#5de9a8;font-size:12px}.chat-v2 .messages{min-height:0;background:radial-gradient(circle at 50% 0,#123128 0,#0a1713 55%,#08100e 100%);padding:22px 28px}.bubble{line-height:1.38;box-shadow:0 4px 14px #0002}.bubble.in{border-bottom-left-radius:4px}.bubble.out{border-bottom-right-radius:4px;background:#0b6b4d}.bubble-body{overflow-wrap:anywhere}.composer{background:#0d1715;align-items:flex-end}.composer textarea{margin:0;min-height:46px;max-height:130px;line-height:1.35}.composer button{height:46px;min-width:94px;cursor:pointer}.composer button:disabled{opacity:.55;cursor:wait}.send-status{position:absolute;right:35px;bottom:78px;font-size:11px;color:#87a99e}.chat-panel{position:relative}.chat-logo{width:74px;height:74px;border-radius:22px;background:#13d68f;color:#062017;display:grid;place-items:center;font-weight:900;font-size:26px;margin:0 auto 18px}.chat-search{border-bottom:1px solid #20352f}.chat-search input{margin:0}.chat-v2 .badge{min-width:24px;text-align:center}.chat-v2 ::-webkit-scrollbar{width:8px}.chat-v2 ::-webkit-scrollbar-thumb{background:#29433b;border-radius:20px}
@media(max-width:850px){.conversations-page{padding:12px}.conversations-top{display:block}.conversations-top select{margin-top:10px}.chat-v2{height:auto;min-height:0;grid-template-columns:1fr}.chat-v2 .chat-list{max-height:300px}.chat-v2 .chat-panel{min-height:62vh}.chat-v2 .messages{min-height:420px;padding:16px}.live-dot{display:none}.composer button{min-width:72px;padding:0 12px}}

/* v1.5.5 refinements */
.chat-name-row{justify-content:space-between;column-gap:14px}.chat-name-row strong{padding-right:6px}.chat-name-row time{flex:0 0 auto;margin-left:8px}.chat-meta>span{margin-top:3px}.chat-person{display:flex;flex-direction:column;gap:2px}


/* v1.5.6 Central polish */
.conversations-page{height:100vh;overflow:hidden;display:flex;flex-direction:column}
.conversations-top{flex:0 0 auto}
.chat-v2{flex:1 1 auto;height:auto;min-height:0;margin-bottom:0}
.chat-v2 .chat-list-scroll{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
.chat-v2 .chat-panel{height:100%;overflow:hidden}
.chat-v2 .messages{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.chat-v2 .composer{flex:0 0 auto;position:relative;z-index:4;box-shadow:0 -8px 24px #0003}
.chat-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.chat-name-row strong{min-width:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-name-row time{margin:0;min-width:38px;text-align:right;color:#7f978e;font-variant-numeric:tabular-nums}
.chat-meta>span{display:block;max-width:100%;padding-right:4px}
.chat-item{position:relative}
.chat-item .badge{margin-left:4px;flex:0 0 auto}
.bubble{max-width:min(72%,720px);font-size:15px}
.bubble small{font-variant-numeric:tabular-nums;opacity:.9}
.chat-header{flex:0 0 auto;background:#0b1512;position:relative;z-index:3}
.chat-search{flex:0 0 auto;background:#0d1715;position:sticky;top:0;z-index:3}
@media(max-width:850px){
 .conversations-page{height:auto;min-height:100vh;overflow:visible}
 .chat-v2{display:flex;flex-direction:column;min-height:calc(100vh - 150px)}
 .chat-v2 .chat-list{max-height:34vh;min-height:190px}
 .chat-v2 .chat-panel{height:66vh;min-height:520px}
 .chat-v2 .messages{min-height:0}
 .bubble{max-width:90%}
}

/* v1.5.7 - mídia no chat */
.chat-media-image{display:block;max-width:min(360px,100%);max-height:360px;border-radius:12px;object-fit:contain;margin-bottom:7px;background:rgba(0,0,0,.16)}
.chat-media-image.sticker{max-width:190px;max-height:190px;background:transparent}
.chat-media-video{display:block;max-width:min(420px,100%);max-height:360px;border-radius:12px;margin-bottom:7px}
.chat-media-audio{display:block;width:min(360px,70vw);max-width:100%;margin:3px 0 7px}
.chat-media-doc{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.08);color:inherit;text-decoration:none;margin-bottom:7px}
.chat-media-doc:hover{text-decoration:underline}

/* v1.6.1 - Central de Conversas responsiva definitiva */
.brand-mini{display:none}.brand-full b{color:var(--accent)}
.nav a{display:flex;align-items:center;gap:10px}.nav-icon{width:20px;flex:0 0 20px;text-align:center}.nav-label{min-width:0}
.chat-back{display:none;color:#fff;text-decoration:none;width:38px;height:38px;border-radius:50%;align-items:center;justify-content:center;font-size:24px;background:#13251f;flex:0 0 38px}
.media-failed{display:none;font-size:12px;color:#a9c1ba;padding:5px 0}.media-failed.show{display:block}
.conversations-page{max-width:none}.conversations-top{gap:22px}.conversations-top>div{min-width:0}.conversations-top select{width:min(46vw,720px);margin:0}
.chat-v2{width:100%;grid-template-columns:minmax(300px,34%) minmax(0,1fr)}
.chat-v2 .chat-list,.chat-v2 .chat-panel{min-width:0}
.chat-v2 .chat-list-scroll{scrollbar-gutter:stable}.chat-v2 .chat-item{width:100%}
.chat-v2 .chat-header{min-height:74px}.chat-v2 .messages{width:100%}
.chat-v2 .composer textarea{min-width:0}.chat-v2 .composer{width:100%}

@media(max-width:1100px){
 .sidebar{width:68px;padding:18px 8px}.brand{margin:0 0 24px;text-align:center}.brand-full{display:none}.brand-mini{display:block;font-size:20px;font-weight:900;color:var(--accent)}
 .nav a{justify-content:center;padding:12px 8px}.nav-icon{font-size:20px;width:30px;flex-basis:30px}.nav-label{display:none}
 .main{margin-left:68px;width:calc(100% - 68px);padding:16px}
 .conversations-page{height:100dvh;min-height:0;overflow:hidden;padding:16px}
 .conversations-top{margin-bottom:12px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .conversations-top h1{font-size:30px;margin:0}.conversations-top .muted{margin:4px 0 0}.conversations-top select{width:100%;margin:0}
 .chat-v2{flex:1 1 auto;display:block;height:auto;min-height:0;border-radius:16px;overflow:hidden}
 .chat-v2 .chat-list,.chat-v2 .chat-panel{height:100%;max-height:none;min-height:0}
 .chat-v2.has-active .chat-list{display:none}
 .chat-v2.no-active .chat-panel{display:none}
 .chat-v2.no-active .chat-list{display:flex;width:100%;border:0}
 .chat-v2.has-active .chat-panel{display:flex;width:100%}
 .chat-back{display:flex}
 .chat-v2 .messages{min-height:0;padding:18px}
 .chat-v2 .bubble{max-width:min(88%,680px)}
 .chat-v2 .composer{padding:10px;gap:8px}.chat-v2 .composer button{min-width:78px;padding:0 12px}
 .live-dot{display:none}
}

@media(max-width:620px){
 .sidebar{width:0;padding:0;border:0;overflow:hidden}.main{margin-left:0;width:100%;padding:10px}
 .conversations-page{padding:10px}.conversations-top h1{font-size:25px}.conversations-top .muted{font-size:13px}
 .chat-v2{border-radius:13px}.chat-search{padding:10px}.chat-item{padding:11px 12px}.avatar{width:42px;height:42px;min-width:42px}
 .chat-header{padding:10px 12px}.chat-person strong{font-size:15px}.chat-v2 .messages{padding:12px}
 .chat-v2 .bubble{max-width:92%;font-size:14px}.chat-media-audio{width:min(300px,78vw)}
 .composer textarea{font-size:16px}.composer button{min-width:64px!important}
}
@media(max-width:1100px){.brand:after,.nav a:before{content:none!important;display:none!important}.nav a{font-size:initial}}

/* v1.6.3 - Central inspirada no fluxo do WhatsApp, identidade Lagos Connect */
.wa-central .conversations-top h1{font-size:34px}.wa-shell{border-radius:14px;background:#101614;box-shadow:none}.wa-shell .chat-list{background:#101412}.wa-list-title{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 8px;font-size:21px}.wa-list-title span{font-size:12px;color:#82928c}.wa-shell .chat-search{padding:8px 12px;border:0;position:relative;background:#101412}.wa-shell .chat-search input{height:40px;border:0;border-radius:10px;background:#202522;padding:0 14px 0 40px;font-size:13px}.search-icon{position:absolute;z-index:2;left:27px;top:17px;color:#a9b2ae;font-size:21px}.wa-filters{display:flex;gap:8px;padding:4px 12px 10px;border-bottom:1px solid #242b28}.wa-filters .filter{border:1px solid #303733;background:#171c19;color:#c7cfcb;border-radius:999px;padding:7px 13px;cursor:pointer}.wa-filters .filter.active{background:#153b2a;color:#8cf0b6;border-color:#24573d}.wa-shell .chat-item{min-height:70px;padding:10px 14px;border-top:0;border-bottom:1px solid #202622}.wa-shell .chat-item:hover{background:#202522}.wa-shell .chat-item.active{background:#2a302d;box-shadow:none}.wa-shell .avatar{width:48px;height:48px;min-width:48px}.wa-shell .chat-name-row strong{font-size:15px}.wa-shell .chat-name-row time{font-size:11px}.wa-shell .chat-meta>span{font-size:12px;color:#a4ada8}.wa-shell .badge{background:#20d56b;color:#092015;font-size:11px;min-width:21px;height:21px;line-height:15px;padding:3px 6px}.wa-shell .chat-header{min-height:64px;padding:8px 14px;background:#202522;border-bottom:0}.wa-shell .chat-header .avatar{width:42px;height:42px;min-width:42px}.wa-shell .chat-person strong{font-size:15px}.wa-shell .chat-person small{font-size:11px}.wa-shell .live-dot{font-size:11px}.wa-messages{background-color:#0b100e!important;background-image:linear-gradient(rgba(11,16,14,.93),rgba(11,16,14,.93)),radial-gradient(circle at 20px 20px,#31413a 1px,transparent 1.5px)!important;background-size:auto,38px 38px!important;padding:18px 6%!important}.day-separator{display:flex;justify-content:center;clear:both;margin:14px 0}.day-separator span{font-size:11px;color:#c5ceca;background:#18211e;border-radius:7px;padding:6px 10px;box-shadow:0 1px 2px #0006}.wa-shell .bubble{position:relative;max-width:min(65%,640px);width:max-content;margin:3px 0;padding:7px 8px 5px;border-radius:8px;background:#202925;box-shadow:0 1px 2px #0005;font-size:14px;line-height:1.35}.wa-shell .bubble.in{border-top-left-radius:2px}.wa-shell .bubble.out{margin-left:auto;background:#075e45;border-top-right-radius:2px}.wa-shell .bubble-body{padding-right:2px}.wa-shell .message-text{white-space:normal}.bubble-meta{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-height:14px;margin:2px 0 0 12px;white-space:nowrap}.bubble-meta time{font-size:9px;color:#a9b8b2;font-variant-numeric:tabular-nums}.ticks{font-size:11px;color:#b7c2bd;letter-spacing:-2px;padding-right:2px}.ticks.read{color:#55b9ff}.wa-shell .chat-media-image{max-width:min(330px,55vw);max-height:330px;margin-bottom:4px}.wa-shell .chat-media-image.sticker{max-width:180px;box-shadow:none}.wa-shell .chat-media-audio{width:min(330px,62vw);margin:0}.wa-composer{position:relative!important;background:#202522!important;border-top:0!important;padding:9px 12px!important;gap:8px!important;align-items:flex-end!important;box-shadow:none!important}.wa-composer textarea{min-height:42px!important;max-height:120px!important;border:0!important;background:#2a302d!important;border-radius:10px!important;padding:11px 13px!important;font-size:14px!important}.composer-icon,.send-btn{width:42px!important;height:42px!important;min-width:42px!important;border:0!important;border-radius:50%!important;display:grid;place-items:center;padding:0!important;cursor:pointer}.composer-icon{background:transparent!important;color:#c8d0cc!important;font-size:24px}.send-btn{background:#20b96b!important;color:#071b10!important;font-size:19px}.emoji-pop{display:none;position:absolute;left:10px;bottom:60px;width:220px;padding:8px;background:#202522;border:1px solid #35403b;border-radius:12px;box-shadow:0 10px 35px #0008;z-index:10;flex-wrap:wrap}.emoji-pop.open{display:flex}.emoji-pop button{border:0;background:transparent;font-size:22px;padding:6px;cursor:pointer}.wa-shell .send-status{right:66px;bottom:58px;background:#202522;padding:3px 7px;border-radius:6px}.wa-shell .chat-placeholder{color:#9da8a3}.wa-shell .chat-logo{border-radius:50%}
@media(max-width:1100px){.wa-central .conversations-top h1{font-size:30px}.wa-shell .chat-header{min-height:62px}.wa-messages{padding:14px 4%!important}.wa-shell .bubble{max-width:78%}}
@media(max-width:620px){.wa-central .conversations-top h1{font-size:24px}.wa-list-title{font-size:18px}.wa-shell .chat-item{min-height:66px}.wa-shell .bubble{max-width:86%;font-size:14px}.wa-messages{padding:10px 3%!important}.wa-composer{padding:7px!important}.composer-icon,.send-btn{width:40px!important;height:40px!important;min-width:40px!important}.wa-shell .chat-media-audio{width:min(290px,70vw)}}


/* v1.6.4 - acabamento definitivo da Central: mais chat, composer sempre visivel */
.wa-central{padding:16px 18px 12px!important;height:100dvh!important;min-height:0!important;overflow:hidden!important}
.wa-central .conversations-top{display:grid!important;grid-template-columns:minmax(280px,1fr) minmax(360px,58%)!important;align-items:center!important;gap:20px!important;margin:0 0 10px!important;min-height:54px!important}
.wa-central .conversations-top h1{font-size:26px!important;line-height:1.05!important;margin:0!important}
.wa-central .conversations-top .muted{font-size:12px!important;margin:4px 0 0!important;line-height:1.2!important}
.wa-central .conversations-top select{height:42px!important;margin:0!important;padding:8px 12px!important;width:100%!important}
.wa-central .wa-shell{flex:1 1 auto!important;height:auto!important;min-height:0!important;margin:0!important;grid-template-columns:minmax(350px,31%) minmax(0,1fr)!important}
.wa-shell .chat-list,.wa-shell .chat-panel{height:100%!important;min-height:0!important;overflow:hidden!important}
.wa-shell .chat-list-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important}
.wa-shell .chat-header{flex:0 0 58px!important;min-height:58px!important;padding:7px 14px!important}
.wa-shell .chat-header .avatar{width:40px!important;height:40px!important;min-width:40px!important}
.wa-shell .wa-messages{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;padding:14px 5%!important}
.wa-shell .wa-composer{flex:0 0 auto!important;position:relative!important;bottom:auto!important;min-height:58px!important;padding:8px 10px!important;z-index:20!important}
.wa-shell .wa-composer textarea{min-height:40px!important;padding:10px 13px!important}
.wa-shell .composer-icon,.wa-shell .send-btn{width:40px!important;height:40px!important;min-width:40px!important}
.wa-shell .bubble{max-width:min(62%,620px)!important;margin:2px 0!important;padding:6px 8px 4px!important}
.wa-shell .chat-media-doc{min-width:210px;max-width:340px;padding:12px 14px!important;border-radius:8px!important;background:rgba(255,255,255,.075)!important;text-decoration:none!important}
.wa-shell .day-separator{margin:9px 0!important}
.wa-shell .day-separator span{padding:5px 9px!important}
.wa-list-title{padding:12px 16px 5px!important;font-size:19px!important}
.wa-shell .chat-search{padding:6px 10px!important}
.wa-shell .chat-search input{height:38px!important}
.wa-shell .search-icon{left:25px!important;top:14px!important}
.wa-filters{padding:3px 10px 8px!important}
.wa-filters .filter{padding:6px 12px!important}
.wa-shell .chat-item{min-height:64px!important;padding:8px 12px!important}
.wa-shell .chat-item .avatar{width:44px!important;height:44px!important;min-width:44px!important}

@media(max-width:1100px){
 .wa-central{padding:10px!important}
 .wa-central .conversations-top{grid-template-columns:1fr!important;gap:6px!important;margin-bottom:8px!important;min-height:0!important}
 .wa-central .conversations-top>div{display:none!important}
 .wa-central .conversations-top select{height:40px!important}
 .wa-central .wa-shell{grid-template-columns:1fr!important;border-radius:12px!important}
 .wa-shell.has-active .chat-list{display:none!important}.wa-shell.has-active .chat-panel{display:flex!important}
 .wa-shell.no-active .chat-list{display:flex!important}.wa-shell.no-active .chat-panel{display:none!important}
 .wa-shell .chat-header{flex-basis:56px!important;min-height:56px!important}
 .wa-shell .wa-messages{padding:10px 3%!important}
 .wa-shell .bubble{max-width:82%!important}
}
@media(max-width:620px){
 .wa-central{padding:0!important}
 .wa-central .conversations-top{padding:7px 8px 5px!important;margin:0!important;background:#101412!important}
 .wa-central .conversations-top select{height:38px!important;border-radius:8px!important}
 .wa-central .wa-shell{border-radius:0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
 .wa-list-title{padding:10px 13px 4px!important}
 .wa-shell .chat-search{padding:5px 8px!important}.wa-shell .chat-search input{height:37px!important}
 .wa-shell .search-icon{left:22px!important;top:13px!important}
 .wa-filters{padding:3px 8px 7px!important}
 .wa-shell .chat-item{min-height:62px!important;padding:7px 10px!important}
 .wa-shell .wa-messages{padding:8px 2.5%!important}
 .wa-shell .bubble{max-width:88%!important}
 .wa-shell .wa-composer{padding:6px!important;min-height:54px!important}
}

/* v1.6.5 - corrige altura do chat em meia tela/tablet */
@media (max-width:1100px){
  .wa-central{height:100dvh!important;min-height:100dvh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .wa-central .conversations-top{flex:0 0 auto!important}
  .wa-central .wa-shell{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  .wa-shell.has-active .chat-panel{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  .wa-shell.has-active .chat-header{flex:0 0 56px!important}
  .wa-shell.has-active .wa-messages{flex:1 1 0!important;height:0!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .wa-shell.has-active .wa-composer{flex:0 0 auto!important;margin-top:0!important}
  .wa-shell.no-active .chat-list{height:100%!important;min-height:0!important;max-height:none!important}
  .wa-shell.no-active .chat-list-scroll{flex:1 1 0!important;height:0!important;min-height:0!important;overflow-y:auto!important}
}
@media (max-width:620px){
  .wa-central .wa-shell{height:0!important;min-height:0!important}
}

/* v1.6.6 - composer completo + atualizacao em tempo real */
.wa-composer{flex-wrap:wrap!important}.wa-composer textarea{flex:1 1 180px!important}.attach-preview{display:none;order:10;flex:1 0 100%;align-items:center;justify-content:space-between;background:#151c19;border:1px solid #304039;border-radius:8px;padding:7px 10px;font-size:12px;color:#c7d0cc}.attach-preview.show{display:flex}.attach-preview button{border:0;background:transparent;color:#d6ded9;font-size:20px;cursor:pointer}.mic-btn.recording{background:#7b2020!important;color:#fff!important;animation:lcPulse 1s infinite}.send-btn:disabled{opacity:.55;cursor:wait}@keyframes lcPulse{50%{transform:scale(.92);opacity:.75}}
@media(max-width:620px){.wa-composer{gap:4px!important}.wa-composer .composer-icon,.wa-composer .send-btn{width:38px!important;height:38px!important;min-width:38px!important}.wa-composer textarea{min-width:110px!important}}


/* v1.6.8 - mídia compacta + viewport desktop fechado */
.wa-central{display:flex!important;flex-direction:column!important;box-sizing:border-box!important}
.wa-central .wa-shell{min-height:0!important;overflow:hidden!important}
.wa-shell .chat-panel{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
.wa-shell .media-bubble{padding:4px!important;max-width:min(370px,62%)!important}
.wa-shell .media-bubble .bubble-body{padding:0!important}
.wa-shell .media-bubble .chat-media-image,.wa-shell .media-bubble .chat-media-video{display:block!important;width:auto!important;max-width:100%!important;margin:0!important;border-radius:7px!important;background:transparent!important}
.wa-shell .media-bubble .chat-media-image{max-height:350px!important;object-fit:contain!important}
.wa-shell .media-bubble .chat-media-image.sticker{max-width:190px!important;max-height:190px!important}
.wa-shell .media-bubble .message-text{padding:6px 5px 2px!important}
.wa-shell .media-bubble .bubble-meta{margin:2px 4px 0!important}
@media(min-width:1101px){
 .wa-central{height:100dvh!important;max-height:100dvh!important;overflow:hidden!important}
 .wa-central .conversations-top{flex:0 0 auto!important}
 .wa-central .wa-shell{flex:1 1 0!important;height:0!important;max-height:none!important}
 .wa-shell .chat-list,.wa-shell .chat-panel{height:100%!important;min-height:0!important}
 .wa-shell .wa-messages{flex:1 1 0!important;height:0!important;min-height:0!important;overflow-y:auto!important}
 .wa-shell .wa-composer{flex:0 0 auto!important}
}
@media(max-width:1100px){.wa-shell .media-bubble{max-width:min(390px,82%)!important}}
@media(max-width:620px){.wa-shell .media-bubble{max-width:88%!important}}
\n\n/* v1.6.9 - acabamento definitivo de midia */
.wa-shell .bubble.media-bubble{overflow:visible!important}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker){background:transparent!important;box-shadow:none!important;padding:0!important;border-radius:0!important}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .bubble-body{background:transparent!important}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .chat-media-image.sticker{display:block!important;width:auto!important;height:auto!important;max-width:190px!important;max-height:190px!important;object-fit:contain!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .bubble-meta{position:relative!important;float:right!important;margin:-16px 3px 0 0!important;padding:2px 5px!important;border-radius:6px!important;background:rgba(0,0,0,.48)!important;z-index:2!important}
.wa-shell .bubble.media-bubble:not(:has(.sticker)){padding:3px!important;width:fit-content!important;max-width:min(350px,62%)!important}
.wa-shell .bubble.media-bubble:not(:has(.sticker)) .chat-media-image,.wa-shell .bubble.media-bubble:not(:has(.sticker)) .chat-media-video{max-width:340px!important;width:auto!important;height:auto!important;max-height:340px!important;object-fit:contain!important}
.wa-shell .media-failed{display:none!important}.wa-shell .media-failed.show{display:block!important;padding:10px!important;color:#b9c5c0!important}
@media(max-width:1100px){.wa-shell .bubble.media-bubble:not(:has(.sticker)){max-width:82%!important}.wa-shell .bubble.media-bubble:not(:has(.sticker)) .chat-media-image,.wa-shell .bubble.media-bubble:not(:has(.sticker)) .chat-media-video{max-width:min(340px,74vw)!important}}
@media(max-width:620px){.wa-shell .bubble.media-bubble:not(:has(.sticker)){max-width:88%!important}.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .chat-media-image.sticker{max-width:170px!important;max-height:170px!important}}

/* v1.6.10: acabamento de figurinha e recuperação de mídia */
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker){overflow:hidden!important;max-width:190px!important}
.wa-shell .chat-media-image.sticker{clip-path:inset(0 0 6% 0)!important;margin-bottom:-8px!important}

/* Lagos Connect v1.6.11 — acabamento final de mídias */
.wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)){
  width:fit-content!important;
  max-width:min(440px,70%)!important;
  padding:3px!important;
}
.wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-image,
.wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-video{
  display:block!important;
  width:min(420px,100%)!important;
  max-width:420px!important;
  height:auto!important;
  max-height:520px!important;
  object-fit:contain!important;
  border-radius:7px!important;
  background:#111815!important;
}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker){
  width:fit-content!important;
  max-width:210px!important;
  overflow:visible!important;
}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .chat-media-image.sticker{
  width:auto!important;
  height:auto!important;
  max-width:200px!important;
  max-height:200px!important;
  clip-path:none!important;
  margin:0!important;
}
.wa-shell .bubble.media-bubble:has(.chat-media-image.sticker) .bubble-meta{
  float:none!important;
  position:absolute!important;
  right:3px!important;
  bottom:3px!important;
  margin:0!important;
}
@media(max-width:1100px){
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)){max-width:86%!important}
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-image,
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-video{
    width:min(390px,72vw)!important;
    max-width:72vw!important;
    max-height:480px!important;
  }
}
@media(max-width:620px){
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)){max-width:90%!important}
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-image,
  .wa-shell .bubble.media-bubble:not(:has(.chat-media-image.sticker)) .chat-media-video{
    width:min(360px,82vw)!important;
    max-width:82vw!important;
    max-height:440px!important;
  }
}

/* Lagos Connect v1.7.1 — Campanhas Pro + sidebar consistente */
.brand:after,.nav a:before{content:none!important;display:none!important}
.brand-mini{display:none!important}.brand-full{display:inline!important}
.nav-icon{display:inline-grid!important;place-items:center!important}
.campaign-grid{align-items:start;grid-template-columns:minmax(460px,.92fr) minmax(520px,1.08fr)!important;gap:22px!important}
.campaign-grid>.card{min-width:0;padding:24px!important}
.campaign-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.campaign-section-head h2{margin:0 0 4px!important}.campaign-section-head p{margin:0}
.history-count,.selected-count{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 10px;border-radius:999px;background:#123d2b;color:#62e8a5;font-size:12px;font-weight:800}
.contacts-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:2px}.contacts-title label{margin:0}
.contact-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.contact-tools input{margin:6px 0 10px}.btn-secondary{background:#1b2621;color:#dce6e1;border:1px solid #31423a;white-space:nowrap;padding:11px 13px}
.contact-picker{max-height:310px!important;scrollbar-gutter:stable}.contact-row{cursor:pointer;border-radius:10px}.contact-row:hover{background:#111d18}.contact-row input{accent-color:#20d56b}.contact-row strong{display:block;line-height:1.2}
.campaign-history{min-height:620px}.campaign-card{background:#0d1210}.campaign-head strong{font-size:16px}.progress{height:7px}.actions .btn{padding:8px 12px;font-size:13px}
@media(min-width:1101px){.campaign-grid{max-width:1500px;margin:0 auto}.campaign-create form{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.campaign-create form>label,.campaign-create form>input[name="name"],.campaign-create form>select[name="instance_id"],.campaign-create form>textarea,.campaign-create form>input[type="file"],.campaign-create form>.contacts-title,.campaign-create form>.contact-tools,.campaign-create form>.contact-picker,.campaign-create form>p,.campaign-create form>button{grid-column:1/-1}.campaign-create textarea{min-height:112px}.campaign-create .contact-picker{max-height:250px!important}}
@media(max-width:1100px){
 .sidebar{width:68px!important;padding:18px 8px!important}.brand{margin:0 0 24px!important;text-align:center!important;font-size:0!important}.brand-full{display:none!important}.brand-mini{display:block!important;font-size:20px!important;font-weight:900!important;color:var(--accent)!important}
 .nav a{display:flex!important;justify-content:center!important;align-items:center!important;padding:12px 8px!important;font-size:0!important}.nav-icon{font-size:20px!important;width:30px!important;flex:0 0 30px!important}.nav-label{display:none!important}
 .main{margin-left:68px!important;width:calc(100% - 68px)!important;padding:16px!important}.main>.top{margin-bottom:14px}.main>.top h1{font-size:30px;margin:0}.main>.top .muted{margin:5px 0 0}
 .campaign-grid{grid-template-columns:1fr!important;gap:14px!important}.campaign-grid>.card{padding:16px!important}.campaign-history{min-height:0}.contact-picker{max-height:300px!important}
}
@media(max-width:620px){.main{padding:10px!important}.campaign-grid>.card{padding:13px!important;border-radius:14px}.contact-tools{grid-template-columns:1fr}.contact-tools .btn{margin-bottom:8px}.campaign-section-head{margin-bottom:10px}.campaign-create textarea{min-height:110px}}

/* Lagos Connect v1.7.2 — Campanhas acabamento final */
body{overflow-x:hidden}
.brand{display:block!important}.brand-full{display:inline!important}.brand-mini{display:none!important}
.sidebar .nav a:before{content:none!important;display:none!important}
.sidebar .nav a{font-size:16px!important}
.sidebar .nav-icon{display:inline-grid!important;font-size:16px!important}
.sidebar .nav-label{display:inline!important}
.campaign-grid{grid-template-columns:minmax(560px,1.15fr) minmax(380px,.85fr)!important;max-width:1440px!important;width:100%!important;margin:0 auto!important}
.campaign-create,.campaign-history{min-width:0!important}.campaign-history{min-height:0!important}
.contacts-title{margin-top:4px!important}.contacts-title label{display:block!important}.selected-count{margin-left:auto!important;white-space:nowrap!important}
.contact-tools{margin-bottom:2px}.contact-picker{max-height:330px!important}
.campaign-create form>.btn{margin-top:4px;width:max-content;min-width:180px}
.campaign-history>.muted{margin-top:12px}
@media(max-width:1250px){
 .sidebar{width:68px!important;padding:18px 8px!important}.brand{margin:0 0 24px!important;text-align:center!important;font-size:0!important}.brand-full{display:none!important}.brand-mini{display:block!important;font-size:20px!important;font-weight:900!important;color:var(--accent)!important}
 .sidebar .nav a{display:flex!important;justify-content:center!important;align-items:center!important;padding:12px 8px!important;font-size:0!important}.sidebar .nav-icon{font-size:20px!important;width:30px!important;flex:0 0 30px!important}.sidebar .nav-label{display:none!important}
 .main{margin-left:68px!important;width:calc(100% - 68px)!important;padding:16px!important}
 .campaign-grid{grid-template-columns:minmax(0,1fr)!important;max-width:900px!important}.campaign-grid>.card{padding:20px!important}.campaign-history{min-height:0!important}
}
@media(max-width:700px){
 .main{padding:10px!important}.campaign-grid>.card{padding:14px!important}.campaign-create form{display:block!important}.contacts-title{align-items:flex-start!important;flex-wrap:wrap!important}.selected-count{margin-left:0!important}.contact-picker{max-height:280px!important}
}
