/* Approved WhatsApp Órbita: original controllers and permissions, one work area. */
body.aura-whatsapp-active { overflow:hidden; }
body.aura-whatsapp-active .app { height:100dvh; min-height:0; }
body.aura-whatsapp-active .app>.main { height:100dvh; display:flex; flex-direction:column; padding:14px 24px 18px!important; overflow:hidden; }
body.aura-whatsapp-active #topBar { flex:none; margin-bottom:12px!important; }
body.aura-whatsapp-active #v-whatsapp.on { display:flex!important; flex:1; min-height:0; flex-direction:column; gap:10px; color:#34243e; }
#v-whatsapp .wa-heading { flex:none; margin:0!important; gap:12px; min-height:58px; }
#v-whatsapp .wa-heading h1 { font-family:'Inter',sans-serif; letter-spacing:-1.5px; color:#35203f; margin:3px 0 0; }
.wa-eyebrow { font-size:10px; letter-spacing:1.6px; font-weight:750; color:#9d63ae; }
#v-whatsapp .wa-heading-actions { display:flex; gap:8px; }
#v-whatsapp button:focus-visible,#v-whatsapp input:focus-visible,#v-whatsapp textarea:focus-visible { outline:3px solid #a463c0; outline-offset:2px; }
#v-whatsapp .btn { border-radius:13px; color:#795083; border:1px solid #e7d8ef; background:linear-gradient(125deg,#fff,#fcf6fe); min-height:40px; }
#v-whatsapp .btn.prim { background:linear-gradient(110deg,#c93672,#b53aa1 46%,#7846c9); color:#fff; border:1px solid #b44b9d; box-shadow:0 12px 24px -18px #77406e; }
.wa-workspace-tabs { display:flex; align-items:center; flex:none; gap:6px; padding:5px; border:1px solid white; border-radius:18px; background:#ffffff8c; }
.wa-workspace-tabs>button { font:650 12px/1.25 'Inter',sans-serif; color:#795083; border:0; background:transparent; padding:10px 14px; min-height:40px; border-radius:12px; cursor:pointer; }
.wa-workspace-tabs>button[aria-selected=true] { color:#fff; background:linear-gradient(110deg,#b63b99,#8550b7); box-shadow:0 8px 18px -12px #794172; }
.wa-workspace-tabs .wa-channel-status { margin-left:auto; font-size:11px; font-weight:550; }
#waAutopilotNotice { flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 14px; font-size:12px; line-height:1.4; border:1px solid #edddc2; border-radius:14px; background:#fffaf1; color:#7d602d; }
#waAutopilotNotice button { background:none; border:0; font:650 12px/1.4 inherit; color:inherit; white-space:nowrap; cursor:pointer; min-height:28px; }
#waChannelPane,#waReception { min-height:0; overflow:auto; overscroll-behavior:contain; }
#waChannelPane { padding:3px; }
#waChannelPane #as-whatsapp { margin:12px 0 0; }
#waChannelPane #waActions { display:flex!important; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
#waChannelPane #waActions .btn { display:inline-flex!important; align-items:center; }
#waChannelPane #waActions .tag { width:auto!important; }
#v-whatsapp [hidden] { display:none!important; }
#waBody { flex:1; min-height:0; display:flex; flex-direction:column; gap:8px; overflow:auto; }
#waBody>.card:has(#waGrid) { flex:1; min-height:0; border:1px solid white!important; border-radius:26px!important; padding:0!important; margin:0!important; background:#ffffffb8; box-shadow:0 15px 40px -30px #9e6daf; }
#waBody #waHealthBanner,#waBody #waConnectivityNotice { flex:none; margin:0!important; padding:7px 12px!important; font-size:12px!important; }
body.aura-whatsapp-active #waGrid { position:relative; display:grid!important; grid-template-columns:260px minmax(0,1fr); height:100%!important; min-height:0!important; overflow:hidden; }
body.aura-whatsapp-active #waGrid>* { min-height:0; min-width:0; }
#waGrid #waColList { background:#ffffff9e!important; border-color:#eadfed!important; }
#waColList>div:first-child { padding:14px 12px 10px!important; border:0!important; }
#waSearch { width:100%; min-width:0; border-radius:13px!important; border-color:#eadfed!important; background:#f6f0fa!important; padding:10px!important; font:13px 'Inter',sans-serif!important; }
.wa-list-filters { display:flex; flex-wrap:wrap; gap:4px; padding:0 12px 10px; }
.wa-list-filters button { border:0; border-radius:10px; background:none; color:#795b84; font:600 11px 'Inter',sans-serif; cursor:pointer; padding:8px; min-height:32px; }
.wa-list-filters button[aria-pressed=true] { background:#f0e4f8; }
#waChatList { padding:0 9px; overscroll-behavior:contain; scrollbar-width:thin; }
#waChatList .wa-chat { min-height:92px; margin:3px 0; border:0!important; border-radius:18px; padding:13px 10px!important; font-size:13px; }
#waChatList .wa-chat:hover { background:#f5eef9!important; }
#waChatList .wa-chat[aria-current=true] { background:linear-gradient(120deg,#fbf0f7,#efe5f9)!important; box-shadow:inset 3px 0 #ad589a; }
#waChatList .wa-chat b { color:#34243e!important; font-size:13px!important; }
#waChatList .wa-chat>span { width:38px!important; height:38px!important; flex:0 0 38px!important; font-size:12px!important; }
.wa-list-foot { padding:8px 12px; color:#8d7495; font-size:10px; border-top:1px solid #eadfed; }
#waGrid #waConvo { background:linear-gradient(130deg,#fff,#fbf7fd)!important; overflow:hidden; }
.wa-chat-header { flex:none; min-height:66px; padding:12px 17px!important; background:#fff9!important; border-color:#ede4f1!important; }
.wa-chat-header b { color:#35203f!important; font-size:15px!important; }
.wa-chat-header .btn,.wa-chat-header .wa-back-btn { width:36px!important; min-width:36px; height:36px!important; min-height:36px!important; padding:4px!important; border:0!important; background:none!important; }
#waWindowBar { flex:none; padding:6px 16px!important; font-size:11px!important; font-weight:550!important; line-height:1.3; }
#waOpsStrip { flex:none; min-height:38px; padding:6px 16px!important; color:#624b6a; border-color:#eee5f2!important; flex-wrap:wrap; }
#waOpsStrip>.wa-ops-copy { flex:1; min-width:0; }
#waOpsStrip .wa-ops-copy { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:11px; }
#waOpsStrip .wa-owner-label { white-space:nowrap; color:#684878; font-weight:700; }
#waOpsStrip .wa-assignee { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:120px; }
#waOpsStrip .wa-ops-actions { display:flex; gap:5px; flex:none; }
body.aura-whatsapp-active #waOpsStrip .btn { font-size:11px!important; padding:5px 8px!important; min-height:30px!important; }
#waMsgs { overscroll-behavior:contain; scrollbar-width:thin; padding:18px 20px!important; gap:12px!important; }
#waMsgs>[id^=wa-msg-] { max-width:88%!important; border-radius:18px!important; padding:12px 14px 8px!important; font-size:14px!important; line-height:1.55!important; color:#493550; box-shadow:0 6px 18px -12px #795182!important; }
#waMsgs>[id^=wa-msg-][data-outgoing=true] { background:#eee2f5!important; }
#waMsgs>[id^=wa-msg-][data-failed=true] { background:#fff0f1!important; }
#waMsgs img,#waMsgs video,#waMsgs audio { max-width:100%!important; }
#waSuggest { flex:none; max-height:24%; overflow:auto; padding:8px 14px!important; background:#f7f1fc!important; scrollbar-width:thin; }
#waSuggest:empty { display:none!important; }
#waReplyBar { flex:none; background:#f0e7f8!important; color:#634a6d!important; padding:7px 14px!important; }
body.aura-whatsapp-active #waQuick { display:none!important; }
body.aura-whatsapp-active:has(#waGrid.show-chat) :is(#copilotFab,#copilotNudge) { display:none!important; visibility:hidden!important; pointer-events:none!important; }
body.aura-whatsapp-active #waGrid.show-chat .wa-mobile-copilot:not([hidden]) { display:inline-flex; align-items:center; justify-content:center; }
.wa-composer { flex:none; background:#fff!important; padding:7px 14px 11px!important; border-top:1px solid #eee5f2; }
.wa-compose-modes { display:flex; gap:6px; align-items:center; margin-bottom:7px; }
.wa-compose-modes button { background:none; border:0; border-radius:9px; padding:7px 10px; color:#796580; font:600 11px 'Inter',sans-serif; min-height:32px; cursor:pointer; }
.wa-compose-modes button[aria-pressed=true] { background:#efe4f6; color:#71417d; }
.wa-compose-modes small { margin-left:auto; color:#94849a; font-size:10px; }
#waInput,#waNoteInput { display:block; box-sizing:border-box; width:100%; min-width:0; height:64px; min-height:44px; max-height:130px; resize:vertical; padding:11px 13px!important; border:1px solid #e5d8ed!important; border-radius:14px!important; background:#fffdff!important; color:#34243e; font:13px/1.5 'Inter',sans-serif; }
#waNoteInput { background:#fffbf1!important; border-color:#ecdcb7!important; }
.wa-compose-tools { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-top:7px; }
.wa-compose-tools .btn { font-size:11px!important; min-height:36px!important; padding:7px 9px!important; }
#waSendBtn { margin-left:auto; width:auto!important; height:auto!important; border-radius:12px!important; }
#waFileLabel { display:flex; align-items:center; justify-content:center; min-width:36px; min-height:36px; margin:0; font-size:16px!important; color:#795083!important; }
.wa-compose-help { margin-top:6px; font-size:10px; color:#94849a; }
#waDraftHint { background:#fff!important; padding:0 14px 6px!important; }
#waNoteArea .btn { margin-top:7px; }
#waGrid #waCtx { display:none!important; background:#fcf9ff!important; padding:14px!important; border-color:#eadfed!important; overscroll-behavior:contain; scrollbar-width:thin; }
#waGrid.show-ctx #waCtx { display:block!important; }
.wa-context-close { display:flex; width:100%; justify-content:space-between; align-items:center; min-height:38px; border:0; border-bottom:1px solid #eee5f2; background:#fcf9ff; color:#624b6a; font:650 12px 'Inter',sans-serif; margin:-4px 0 13px; cursor:pointer; position:sticky; top:-14px; z-index:1; }
.wa-context-links { display:grid; gap:7px; margin-top:10px; }
.wa-context-links .btn { text-align:left; font-size:12px!important; width:100%; }
.wa-context-card { padding:15px; border-radius:20px; color:#fff; background:linear-gradient(125deg,#382341,#4a2959 48%,#684475); margin:12px 0; }
.wa-context-card strong { display:block; font-size:17px; margin:7px 0; }
.wa-context-card small,.wa-context-card p { font-size:12px; line-height:1.5; color:#e3d2ea; }
.wa-context-card .btn { margin-top:10px; color:#fff!important; background:#ffffff16!important; border-color:#ffffff33!important; }
@media(min-width:1250px){body.aura-whatsapp-active #waGrid.show-ctx{grid-template-columns:250px minmax(300px,1fr) 280px}}
@media(min-width:861px) and (max-width:1249px){#waGrid.show-ctx #waCtx{position:absolute!important;inset:0 0 0 260px!important;width:auto!important;z-index:3;box-shadow:none!important}}
@media(max-width:860px){
 body.aura-whatsapp-active .app>.main{padding:8px 10px calc(80px + env(safe-area-inset-bottom))!important}
 body.aura-whatsapp-active #v-whatsapp.on{gap:7px}
 body.aura-whatsapp-active #v-whatsapp .wa-heading{min-height:47px}
 #v-whatsapp .wa-heading h1{font-size:28px!important}.wa-eyebrow{font-size:8px;letter-spacing:1px}
 #v-whatsapp .wa-heading-actions{gap:5px}#v-whatsapp .wa-heading-actions .btn{font-size:11px;min-height:36px;padding:8px}
 .wa-workspace-tabs{padding:3px;border-radius:13px}.wa-workspace-tabs>button{font-size:11px;padding:7px 9px;min-height:36px}.wa-workspace-tabs .wa-channel-status{font-size:10px}
 #waAutopilotNotice{font-size:10px;padding:6px 10px;gap:6px}#waAutopilotNotice button{font-size:10px}
 body.aura-whatsapp-active #waGrid{grid-template-columns:1fr!important}
 #waGrid #waConvo{display:none!important}#waGrid.show-chat #waColList{display:none!important}#waGrid.show-chat #waConvo{display:flex!important}
 #waGrid .wa-back-btn{display:inline-flex!important;align-items:center;justify-content:center}
 #waGrid.show-ctx #waCtx{position:absolute!important;inset:0!important;width:auto!important;z-index:3;box-shadow:none!important}
 #waGrid .wa-chat-header{min-height:58px;padding:9px 11px!important;gap:7px!important}.wa-chat-header b{font-size:14px!important}
 #waGrid .wa-chat-header>span{width:34px!important;height:34px!important;font-size:11px!important;flex:none!important}
 #waWindowBar{padding:5px 11px!important;font-size:10px!important}#waOpsStrip{padding:5px 11px!important;font-size:10px!important;gap:4px!important}
 #waMsgs{padding:14px 12px!important;gap:10px!important}#waMsgs>[id^=wa-msg-]{font-size:13px!important;padding:10px 12px 7px!important}
 #waSuggest{max-height:21%;padding:5px 10px!important}#waSuggest .btn{min-height:32px!important}
 .wa-composer{padding:5px 10px 8px!important}#waInput,#waNoteInput{height:56px;font-size:13px}.wa-compose-help{font-size:9px}
 .wa-compose-tools{gap:3px}.wa-compose-tools .btn{font-size:10px!important;padding:7px!important}.wa-compose-modes{margin-bottom:4px}
 .wa-compose-modes small{display:none}#waBody>.card:has(#waGrid){border-radius:20px!important}
 #waColList>div:first-child{padding:11px!important}#waChatList .wa-chat{min-height:86px}
}
@media(max-height:780px){#waInput,#waNoteInput{height:46px;max-height:85px}.wa-chat-header{min-height:55px;padding-top:8px!important;padding-bottom:8px!important}.wa-compose-modes{margin-bottom:3px}.wa-compose-help{display:none}#waMsgs{padding-top:10px!important;padding-bottom:10px!important}}
/* Workspace V5 owns the persistent header and its mobile focused-chat rule. */
@media(min-width:861px){body.aura-whatsapp-active .wa-workspace-tabs>button{min-height:34px!important;padding:7px 12px!important}body.aura-whatsapp-active #waAutopilotNotice{padding:3px 12px!important}body.aura-whatsapp-active #waAutopilotNotice button{min-height:28px!important}body.aura-whatsapp-active #waOpsStrip{flex-wrap:nowrap!important}}
@media(prefers-reduced-motion:reduce){#v-whatsapp *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
