/* 14.1.58: cabeçalho de conversa e rodapé em escopo de Rádio; não interfere no Kanban ou em páginas externas. */
#gl58TopActions[hidden],#gl58TopActions button[hidden]{display:none!important}
#gl58TopActions{display:flex;align-items:center;gap:3px;margin-left:auto;min-width:0;flex:0 0 auto}
#gl58TopActions button{appearance:none;min-width:43px;max-width:63px;padding:5px 4px;background:transparent;border:0;border-radius:9px;color:var(--text,#e5f9f8);display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;position:relative}
#gl58TopActions button:hover,#gl58TopActions button:focus-visible{background:rgba(96,153,163,.16);outline-offset:2px}
#gl58TopActions small{font-size:9px!important;line-height:1;white-space:nowrap;color:inherit!important}
#gl58TopActions .gl58-header-icon{display:flex;width:23px;height:23px}#gl58TopActions .gl58-header-icon svg{width:22px;height:22px}#gl58TopActions .gl58-header-symbol{font-size:19px;height:23px;line-height:23px}
#gl58TopActions [data-source="notificationBell"][data-count]:not([data-count=""])::after{content:attr(data-count);position:absolute;top:-3px;right:1px;background:#db385d;color:white;border-radius:15px;font-weight:800;font-size:9px;padding:1px 4px;max-width:30px;overflow:hidden}
#app:not(.glw-home-active) .topbar:has(#gl58TopActions) .top-actions{display:none!important}
@media(min-width:861px){
 #app:not(.glw-home-active) .topbar .top-actions{display:none!important}
 #app:not(.glw-home-active) .topbar{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;max-height:74px!important;height:66px!important;overflow:hidden!important;padding:6px 14px!important}
 #app:not(.glw-home-active) .topbar .current-info{flex:1 1 200px!important;min-width:125px!important;max-width:none!important}
 #app:not(.glw-home-active) .topbar .current-info strong,#app:not(.glw-home-active) .topbar .current-info small{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 #app:not(.glw-home-active) .ptt-zone{align-items:center!important;min-height:0!important;max-height:108px!important;padding:8px 12px!important;overflow:visible!important}
 #app:not(.glw-home-active) .ptt-zone .ptt-left{min-width:130px!important;max-width:230px!important;flex:0 1 230px!important;overflow:hidden!important}
 #app:not(.glw-home-active) .ptt-zone .ptt-actions{flex:1 1 auto!important;justify-content:flex-end!important;min-width:0!important;gap:5px!important}
 #app:not(.glw-home-active) .ptt-zone .ptt-control{display:flex!important;flex-direction:column!important;min-width:165px!important;flex:0 1 230px!important;max-width:240px!important;gap:3px!important;align-items:stretch!important}
}
#app .ptt-control .gl58-version-under-ptt{position:static!important;display:block!important;width:100%!important;margin:0!important;padding:0 2px!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;text-align:right!important;white-space:nowrap!important;text-overflow:ellipsis!important;font-size:9px!important;line-height:14px!important;letter-spacing:0!important;color:var(--muted,#94aeb5)!important}
#app.glw-home-active #gl58TopActions,#app.glw-home-active .ptt-control .gl58-version-under-ptt{display:none!important}
#gl58HomeMenu{background:rgba(13,127,109,.16);border:1px solid #36736c;border-radius:10px;color:#cff9ed;width:42px;min-width:42px;height:42px;font-size:23px;cursor:pointer;margin-right:8px}
#app .glw-home-heading{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}#app .glw-home-heading>div{flex:1;min-width:180px}
@media(min-width:861px){#app .sidebar.gl58-collapsed{width:0!important;min-width:0!important;padding:0!important;overflow:hidden!important;border:0!important}#app:has(.sidebar.gl58-collapsed) .main{flex:1!important}}
@media(max-width:860px){#gl58TopActions{display:none!important}#app #glMobileBar{display:flex!important}#app.glw-home-active #glMobileBar{display:none!important}#app #gl58HomeMenu{display:inline-flex;align-items:center;justify-content:center}}
/* Diálogo de chamadas — apenas rótulos e estado de mídia, sem mudar conexão */
#sfVideoOverlay .sf-phone{width:min(410px,calc(100vw - 22px));max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;border-radius:25px;border-width:3px;padding:14px;box-sizing:border-box}
#sfVideoOverlay .sf-phone-keys button:not([hidden]){display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;width:68px;height:68px;flex-shrink:0}
#sfVideoOverlay .sf-phone-keys button .gl58-call-glyph{font-size:21px}#sfVideoOverlay .sf-phone-keys button small{font-size:10px;line-height:1.1;color:#fff}
#sfVideoOverlay .sf-call-indicator{align-items:center;gap:7px;flex-wrap:wrap}
/* Dialogs full-width responsivos, com rolagem interna quando necessário. */
#gl53MoreShade .gl53-more-dialog,#glMobileToolLayer .gl-mobile-tools{max-height:calc(100dvh - 24px)!important;overflow-y:auto!important;overscroll-behavior:contain!important}
/* Só um ícone de caixa por área. A caixa antiga continua acessível pelo Super Admin. */
#glEiQuick,#glEvoComposer{display:none!important}

/* 14.1.82 revisão 2: uma barra por dispositivo; nome e presença sempre legíveis */
@media(min-width:861px){
 #app:not(.glw-home-active) .topbar #gl58TopActions{flex:0 1 auto;max-width:min(56vw,500px);margin-left:auto}
 #app:not(.glw-home-active) .topbar .current-info{max-width:34vw!important;flex:1 1 170px!important}
 #app:not(.glw-home-active) .topbar #gl82ChatPresence{margin-left:8px;order:99;flex:0 0 auto}
}
#app:not(.glw-home-active) .topbar #gl58TopActions button{transition:background-color .12s ease, color .12s ease}
#app:not(.glw-home-active) .topbar #gl58TopActions [data-source="gl52More"]{display:flex!important}
@media(max-width:860px){
 #app:not(.glw-home-active) #glMobileBar{max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 #app:not(.glw-home-active) #glMobileBar::-webkit-scrollbar{display:none}
 #app:not(.glw-home-active) #glMobileBar [data-custom="more"]{margin-left:auto;flex:0 0 auto}
}

/* 14.1.90: two persistent, distinct radio destinations in chat/home. */
#app:not(.glw-home-active) .topbar #gl90ChatPair{display:flex!important;align-items:center;gap:5px;flex:0 0 auto;order:95;min-width:0}
#app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;text-decoration:none;min-width:48px;min-height:44px;padding:5px 7px;color:#cef6ee;border:1px solid #385e72;border-radius:11px;background:#102d40;white-space:nowrap;font-size:10px;font-weight:700}
#app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link svg{flex:0 0 21px}
#app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link small{font:inherit;font-size:9px;line-height:1.1}
#app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link:hover,#app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link:focus-visible{background:#0c514c;border-color:#24edcc;outline:2px solid transparent;color:#fff}
#app:not(.glw-home-active) .topbar #gl90ChatWalkie{color:#55f0cb!important;border-color:#179b84!important}
#app.glw-home-active #gl90ChatPair{display:none!important}
#app:not(.glw-home-active) .topbar #gl86HeaderSettings{display:none!important}
#app .gl90-radio-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0 10px}
#app .gl90-radio-modes .gl90-home-radio{min-width:0;display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#123d4c,#0b2639);border:1px solid #2f6672;border-radius:16px;text-decoration:none;color:#e7fffb;padding:16px;cursor:pointer;text-align:left;box-sizing:border-box}
#app .gl90-radio-modes .gl90-home-radio:hover,#app .gl90-radio-modes .gl90-home-radio:focus-visible{border-color:#16dec0;background:#145751}
#app .gl90-home-radio .gl90-mode-icon{width:46px;height:46px;display:grid;place-items:center;flex:0 0 46px;border-radius:14px;background:#0b685c;color:#d5fff7;font-size:24px}
#app .gl90-home-radio strong,#app .gl90-home-radio small{display:block;line-height:1.4}
#app .gl90-home-radio strong{font-size:15px}#app .gl90-home-radio small{color:#aecbd3;font-size:11px}
@media(max-width:860px){
 #app:not(.glw-home-active) .topbar #gl90ChatPair{position:absolute;right:8px;bottom:5px;z-index:8;gap:4px}
 #app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link{min-width:43px;min-height:39px;padding:3px 5px}
 #app:not(.glw-home-active) .topbar #gl90ChatPair .gl90-radio-link svg{width:17px;height:17px;flex-basis:17px}
 #app:not(.glw-home-active) .topbar .current-info{padding-right:0!important}
 #app .gl90-radio-modes{grid-template-columns:1fr;gap:8px}
}

/* 14.1.92: apenas o Walkie ao lado do indicador de presença no chat. */
#app:not(.glw-home-active) .topbar #gl90ChatPair{display:none!important}
#app:not(.glw-home-active) .topbar #glwChatShortcut{display:inline-flex!important;align-items:center;justify-content:center;order:100;flex:0 0 42px;max-width:42px;min-width:42px;z-index:8}
#app.glw-home-active #glwChatShortcut{display:none!important}
@media(max-width:860px){#app:not(.glw-home-active) .topbar #glwChatShortcut{position:absolute;right:10px;top:11px;min-height:35px;max-height:35px;flex-basis:35px;min-width:35px;width:35px;padding:2px}#app:not(.glw-home-active) .topbar{padding-right:52px!important}}
