/* PMO All Conversations: balanced desktop inbox and full-height mobile list */
.chat-layout.pmo-enhanced{grid-template-columns:minmax(290px,345px) minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:min(790px,calc(100dvh - var(--topbar-height) - 90px));min-height:540px;max-height:none;border:1px solid #dae4f0;border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 12px 34px rgba(18,38,75,.06)}
.pmo-enhanced .chat-sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#f7f9fd;border-right:1px solid #e2eaf4}
.pmo-enhanced .chat-mode-toggle{display:flex;flex:0 0 auto;gap:3px;margin:0;padding:9px 8px;border-bottom:1px solid #e5ecf5;background:#fff}
.pmo-enhanced .chat-mode-btn{flex:1 1 0;min-width:0;min-height:38px;padding:6px 5px;font-size:10.5px;line-height:1.25;white-space:normal}
.pmo-enhanced .chat-sidebar-head{display:none}
.pmo-ux-toolbar{display:flex;flex:0 0 auto;flex-direction:column;gap:10px;padding:14px 12px 10px}
.pmo-ux-title-row{display:flex;gap:7px;align-items:center;justify-content:space-between}
.pmo-ux-title-box{display:flex;flex-direction:column;gap:3px;min-width:0}
.pmo-ux-overline{font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;color:#946e15}
.pmo-ux-title{font-size:18px;font-weight:850;line-height:1.1;color:#1a2d4c}
.pmo-ux-count{font-size:10px;color:#8997aa}
.pmo-ux-top-actions{display:flex;gap:5px;flex:0 0 auto}
.pmo-ux-refresh,.pmo-ux-new{height:35px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;gap:4px;border:1px solid #d9e4f2;border-radius:10px;background:#fff;color:#245b90;font-size:11px;font-weight:800;cursor:pointer}
.pmo-ux-refresh{width:33px;padding:0;font-size:19px}.pmo-ux-new{background:#00338d;color:#fff;border-color:#00338d}.pmo-ux-new:hover{background:#005eb8}
.pmo-ux-search{width:100%;min-height:41px;padding:8px 11px;border:1px solid #d5e1f0;border-radius:11px;background:#fff;font-size:12px;color:#243650;outline:0!important}.pmo-ux-search:focus{border-color:#87b0da;box-shadow:0 0 0 3px rgba(0,94,184,.06)}
.pmo-ux-filters{display:flex;gap:5px}.pmo-ux-filter{min-height:30px;padding:6px 12px;border:0;border-radius:999px;background:transparent;color:#7888a0;font-size:10px;font-weight:800;cursor:pointer}
.pmo-ux-filter.active{background:#e4eefb;color:#004b9b}.pmo-ux-caption{font-size:10px;color:#8997aa}
.pmo-enhanced .chat-channel-list.chat-channel-list-admin{display:flex;flex-direction:column;flex:1 1 0%;gap:4px;min-height:0;max-height:none!important;width:100%;overflow-y:auto;overflow-x:hidden;padding:2px 8px 16px;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:thin}
.pmo-ux-row{position:relative;display:flex;flex:0 0 auto;align-items:center;min-height:69px;border:1px solid transparent;border-radius:12px;overflow:hidden}
.pmo-ux-row:hover{background:#edf3fb}.pmo-ux-row:has(.chat-channel-item.active){background:#e6f0fd;border-color:#d2e2f6;box-shadow:inset 3px 0 #005eb8}
.pmo-enhanced .pmo-ux-open-row.chat-channel-item{display:grid;grid-template-columns:35px minmax(0,1fr);align-items:center;gap:9px;width:100%;min-height:69px;min-width:0;padding:10px 32px 10px 9px;margin:0;border:0!important;border-radius:11px;background:transparent!important;box-shadow:none!important;text-align:left;touch-action:pan-y}
.pmo-enhanced .pmo-ux-avatar{display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;border-radius:11px;background:#dce9fa;color:#0756a3;font-size:11px;font-weight:800}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name{display:block;width:100%;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#2c3e57;font-size:11.5px;font-weight:750}
.pmo-ux-pin{position:absolute;top:50%;right:5px;transform:translateY(-50%);z-index:1;display:grid;place-items:center;width:27px;height:30px;border:0;border-radius:7px;background:transparent;color:#9facbf;font-size:18px;cursor:pointer}
.pmo-ux-pin.is-pinned,.pmo-ux-pin:hover{color:#b48611}.pmo-ux-row[hidden]{display:none!important}.pmo-ux-empty{padding:25px 12px;text-align:center;color:#718099;font-size:12px}
.pmo-enhanced .chat-main{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;background:#fff}
.pmo-enhanced .chat-main-head{display:flex;align-items:center;gap:9px;min-height:63px;flex:0 0 auto;padding:10px 12px;border-bottom:1px solid #e5edf6;background:#fff}
.pmo-enhanced .chat-main-head>div>strong{font-size:13px!important}.pmo-enhanced .chat-main-head .chat-switch-btn{display:none}
.pmo-ux-main-tools{display:flex;gap:5px;flex:0 0 auto;margin-left:auto}.pmo-ux-tool{padding:7px 9px;min-height:32px;border:1px solid #dce7f4;border-radius:9px;background:#fff;color:#315d8d;font-size:10px;font-weight:800;cursor:pointer}.pmo-ux-tool:hover{background:#f1f6ff}
.pmo-ux-back{display:none}.pmo-enhanced .chat-messages{flex:1 1 auto;min-height:0;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.pmo-enhanced .chat-admin-sendas{display:flex!important;gap:7px!important;align-items:center;margin:8px 11px;padding:9px 10px!important;border:1px solid #cbdef3!important;border-radius:11px;background:#f2f7ff;color:#225184!important;font-weight:700}
.pmo-enhanced #chatAdminSendAs{max-width:230px;min-width:0;padding:8px!important;border:1px solid #b8cfe9!important;border-radius:8px!important;background:#fff;font-size:12px!important}
.pmo-enhanced .chat-composer{flex:0 0 auto;padding:10px 12px}
.pmo-ux-surface{position:absolute;z-index:150;inset:0;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(12,30,57,.58)}
.pmo-ux-surface-panel{width:min(94vw,500px);max-height:82dvh;overflow-y:auto;padding:18px;background:#fff;border:1px solid #e0e9f6;border-radius:16px;box-shadow:0 28px 80px rgba(17,40,73,.22)}
.pmo-ux-surface-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.pmo-ux-surface-heading h3{margin:0;font-size:17px;color:#1d3554}.pmo-ux-close{width:32px;height:32px;border:0;border-radius:9px;background:#ecf2fa;font-size:24px}
.pmo-ux-hint{font-size:12px;color:#6d7b91;line-height:1.5}.pmo-ux-detail-title{font-size:16px;line-height:1.3;color:#233c61}
.pmo-ux-detail-list{display:grid;gap:8px}.pmo-ux-detail-person{display:grid;gap:4px;padding:12px;background:#f7faff;border:1px solid #e1eaf6;border-radius:10px}.pmo-ux-detail-person small{font-size:9px;color:#8495aa}.pmo-ux-detail-person strong{font-size:13px;color:#284669}
.pmo-ux-search-messages{width:100%;min-height:42px;padding:9px;border:1px solid #d5e4f4;border-radius:10px;font-size:14px}.pmo-ux-search-results{display:grid;gap:7px;max-height:40dvh;margin-top:10px;overflow-y:auto}.pmo-ux-search-hit{padding:10px;border:1px solid #e1e9f4;border-radius:10px;background:#f8fbff;color:#36506c;font-size:12px;line-height:1.5;text-align:left;overflow-wrap:anywhere}
.pmo-ux-notice{position:absolute;bottom:18px;left:50%;z-index:180;max-width:92%;padding:11px 13px;border-radius:10px;background:#16395f;color:#fff;font-size:12px;transform:translateX(-50%);opacity:0;pointer-events:none}.pmo-ux-notice.shown{opacity:1}
@media(max-width:760px){
.chat-layout.pmo-enhanced{display:block;height:calc(100dvh - var(--topbar-height) - 75px);max-height:none;min-height:0;border-radius:14px}
.pmo-enhanced .chat-sidebar{height:100%;max-height:100%;min-height:0;overflow:hidden;border-right:0}
.pmo-enhanced:not(.pmo-mobile-detail) .chat-main{display:none}
.pmo-ux-toolbar{padding:12px 10px 8px}.pmo-ux-title{font-size:18px}.pmo-ux-search{font-size:16px}
.pmo-enhanced .chat-channel-list.chat-channel-list-admin{flex:1 1 0%;min-height:0;max-height:none!important;touch-action:pan-y}
.pmo-enhanced.pmo-mobile-detail{position:fixed;inset:0;z-index:100;width:100vw;height:100dvh!important;min-height:0;max-height:100dvh;border:0;border-radius:0}
.pmo-enhanced.pmo-mobile-detail .chat-sidebar{display:none}
.pmo-enhanced.pmo-mobile-detail .chat-main{display:flex;height:100%;width:100%;min-height:0}
.pmo-ux-back{display:grid;place-items:center;flex:0 0 35px;width:35px;height:36px;border:0;border-radius:9px;background:#eef4fb;color:#134d8c;font-size:25px}
.pmo-enhanced .chat-main-head{min-height:60px;padding:8px 9px}.pmo-enhanced .chat-main-head>div>strong{font-size:11.5px!important}.pmo-ux-tool{font-size:10px;padding:6px}
.pmo-enhanced .chat-admin-sendas{flex-wrap:wrap;margin:5px 7px;padding:7px!important}
.pmo-enhanced #chatAdminSendAs{flex:1;max-width:100%}
.pmo-enhanced #chatScheduleBtn{margin-left:0!important}
.pmo-enhanced .chat-composer{padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
body.pmo-mobile-detail-open{overflow:hidden}
body.pmo-mobile-detail-open .topbar,body.pmo-mobile-detail-open .mobile-nav{display:none!important}
body.pmo-mobile-detail-open .view-container{padding:0!important;min-height:100dvh;height:100dvh;overflow:hidden}
body.pmo-mobile-detail-open .view-container>.page-heading{display:none!important}
}

/* PMO new conversation launch and searchable employee picker */
.chat-layout.pmo-enhanced{position:relative}
.pmo-ux-employee-start-bar{display:flex;flex:0 0 auto;padding:3px 12px 9px}
.pmo-ux-start-employees{width:100%;display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:38px;padding:8px 10px;border:1px dashed #a8c4e6;border-radius:10px;background:#eef5ff;color:#20588e;font-weight:800;font-size:11px;cursor:pointer}
.pmo-ux-start-employees:hover{background:#e3effe;border-style:solid}
.pmo-ux-start-employees svg{width:15px;height:15px;flex:0 0 auto}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;line-height:1.35}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name .pmo-ux-row-preview{display:block;min-width:0;max-width:98%;margin-top:5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#8b98ac;font-weight:450;font-size:10px}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name .pmo-ux-row-date{display:block;margin-top:4px;color:#a2aebe;font-weight:600;font-size:9px}
.pmo-enhanced .pmo-ux-open-row.chat-channel-item{min-height:79px}
.pmo-ux-row{min-height:79px}
.pmo-new-conversation-form{display:grid;gap:9px}
.pmo-new-conversation-form label{display:grid;gap:5px;min-width:0}
.pmo-new-conversation-form input[type=search]{min-height:41px;width:100%;padding:8px 11px;font-size:16px;border-radius:10px;border:1px solid #dbe6f2;background:#fbfdff;outline:0}
.pmo-new-conversation-form input[type=search]:focus{border-color:#82b1e7;box-shadow:0 0 0 3px rgba(0,94,184,.08)}
.pmo-employee-suggestions{display:grid;gap:4px;max-height:170px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.pmo-employee-choice{display:grid;gap:2px;text-align:left;width:100%;padding:9px 11px;border:1px solid #e2eaf4;border-radius:9px;background:#f7faff;cursor:pointer;word-break:break-word}
.pmo-employee-choice:hover,.pmo-employee-choice:focus-visible{background:#edf5ff;border-color:#acccea}
.pmo-employee-choice strong{font-size:12px;color:#2a4669}.pmo-employee-choice small{font-size:10px;color:#8796ac}
@media(max-width:760px){
.pmo-enhanced .pmo-ux-open-row.chat-channel-item{min-height:76px}
.pmo-ux-row{min-height:76px}
.pmo-ux-employee-start-bar{padding:0 10px 7px}
.pmo-ux-start-employees{min-height:40px}
}


/* PMO activity is a local oversight review marker, not an employee read receipt. */
.pmo-ux-filters{flex-wrap:wrap}
.pmo-ux-filter{padding:6px 10px}
.pmo-ux-row.pmo-has-new-activity:before{content:"";position:absolute;z-index:1;left:3px;top:50%;width:5px;height:5px;transform:translateY(-50%);background:#006dca;border-radius:50%}
@media(max-width:760px){.pmo-ux-filters{gap:3px}.pmo-ux-filter{font-size:10px;padding:6px 9px}}

/* v31 — calm, desktop-first PMO conversation workspace. PMO-only selectors. */
.chat-layout.pmo-enhanced{grid-template-columns:minmax(350px,380px) minmax(0,1fr);height:clamp(560px,calc(100dvh - 192px),880px);min-height:560px;isolation:isolate;contain:layout;border-color:#dce5ef;border-radius:16px;box-shadow:0 5px 22px rgba(24,47,79,.045)}
.pmo-enhanced .chat-sidebar{background:#fff;border-right:1px solid #e5ebf3}
.pmo-enhanced .chat-mode-toggle{gap:5px;margin:0;padding:10px 12px 12px;border-bottom:1px solid #eff2f6;background:#fff}
.pmo-enhanced .chat-mode-btn{min-height:36px;padding:8px 7px;border-radius:8px;background:#f5f7fa;color:#67768a;font-size:11px;white-space:nowrap;transition:background-color .12s,color .12s,box-shadow .12s}
.pmo-enhanced .chat-mode-btn.active{color:#06458f;background:#eaf2ff;box-shadow:none}
.pmo-enhanced .pmo-ux-employee-start-bar{order:2;padding:0 16px 11px}
.pmo-enhanced .pmo-ux-start-employees{min-height:36px;background:#fff;border:1px solid #dbe5f0;color:#315f8d;border-radius:9px;font-size:11px;justify-content:flex-start;padding:8px 12px}
.pmo-enhanced .pmo-ux-toolbar{order:1;gap:12px;padding:21px 16px 10px;background:#fff}
.pmo-enhanced .pmo-ux-title-row{align-items:center;gap:12px}
.pmo-enhanced .pmo-ux-title-box{gap:4px}
.pmo-enhanced .pmo-ux-overline{color:#8090a8;font-size:9px;letter-spacing:.105em}
.pmo-enhanced .pmo-ux-title{font-size:21px;letter-spacing:-.035em;font-weight:800;color:#192c48}
.pmo-enhanced .pmo-ux-count{font-size:11px;font-weight:500;color:#8390a3}
.pmo-enhanced .pmo-ux-top-actions{gap:7px}
.pmo-enhanced .pmo-ux-refresh,.pmo-enhanced .pmo-ux-new{height:36px;border-radius:9px;font-size:11px}
.pmo-enhanced .pmo-ux-refresh{width:36px;font-size:20px}
.pmo-enhanced .pmo-ux-new{padding:0 14px}
.pmo-enhanced .pmo-ux-search{min-height:43px;border-radius:10px;padding:10px 12px;background:#f8fafc;border:1px solid #e1e8f1;font-size:12px}
.pmo-enhanced .pmo-ux-search:focus{background:white}
.pmo-enhanced .pmo-ux-filters{display:flex;gap:3px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:1px}
.pmo-enhanced .pmo-ux-filters::-webkit-scrollbar{display:none}
.pmo-enhanced .pmo-ux-filter{padding:7px 11px;min-height:32px;font-size:10.5px;font-weight:700;white-space:nowrap;color:#77869c}
.pmo-enhanced .pmo-ux-filter.active{color:#064c9b;background:#eaf2fd}
.pmo-enhanced .pmo-ux-caption{display:none}
.pmo-enhanced .chat-channel-list.chat-channel-list-admin{order:3;gap:2px;padding:5px 10px 15px;overflow-anchor:none;scrollbar-gutter:stable;contain:layout style}
.pmo-enhanced .pmo-ux-row{min-height:78px;border-radius:11px;border-color:transparent;overflow:visible;transition:background-color .12s;contain:layout style}
.pmo-enhanced .pmo-ux-row:hover{background:#f4f7fb}
.pmo-enhanced .pmo-ux-row:has(.chat-channel-item.active){background:#edf4fe;box-shadow:inset 3px 0 #0061bf;border-color:#dbe7f8}
.pmo-enhanced .pmo-ux-open-row.chat-channel-item{min-height:78px;padding:10px 33px 10px 11px;grid-template-columns:42px minmax(0,1fr);gap:11px;align-items:center}
.pmo-enhanced .pmo-ux-avatar{width:42px;height:42px;flex-basis:42px;border-radius:50%;font-size:12px;background:#e4edf8;color:#12589e}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name{line-height:1.4}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name strong{font-size:12px;line-height:1.35;color:#24354c;letter-spacing:-.008em}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name .pmo-ux-row-preview{margin-top:5px;font-size:11px;line-height:1.45;color:#7d8ba0;font-weight:450}
.pmo-enhanced .pmo-ux-open-row .chat-channel-name .pmo-ux-row-date{margin-top:4px;font-size:10px;color:#a0aaba}
.pmo-enhanced .pmo-ux-pin{width:29px;height:36px;right:6px;font-size:17px;border-radius:8px}
.pmo-enhanced .pmo-ux-pin:hover{background:#e7eef9}
.pmo-enhanced .chat-main{background:#fff;min-width:0}
.pmo-enhanced .chat-main-head{min-height:65px;padding:12px 18px;gap:10px;box-shadow:none}
.pmo-enhanced .chat-main-head>div>strong{font-size:14px!important;color:#253851}
.pmo-enhanced .chat-main-head>.chat-dm-avatar{width:39px;height:39px;flex:0 0 39px;border-radius:50%;display:grid;place-items:center}
.pmo-enhanced .chat-messages{padding:22px 24px 16px;scrollbar-gutter:stable;overflow-anchor:none;gap:7px;background:#fcfdff}
.pmo-enhanced .chat-msg{gap:12px;padding:3px 0}
.pmo-enhanced .chat-msg-avatar{width:36px;height:36px;border-radius:50%;font-size:11px}
.pmo-enhanced .chat-msg-body{max-width:min(82%,720px)}
.pmo-enhanced .chat-msg-meta{gap:9px;margin-bottom:6px}
.pmo-enhanced .chat-msg-meta strong{font-size:12px}
.pmo-enhanced .chat-msg-meta span{font-size:10.5px}
.pmo-enhanced .chat-msg-text{font-size:13px;line-height:1.6;padding:10px 14px;background:#edf2f7;border-radius:12px 12px 12px 3px;color:#29394e}
.pmo-enhanced .chat-msg-grouped{margin-top:-5px;padding:0}
.pmo-enhanced .chat-admin-sendas{margin:0!important;border:0!important;border-top:1px solid #e7edf5!important;border-radius:0!important;background:#f7faff!important;padding:9px 18px!important;flex:0 0 auto}
.pmo-enhanced #chatAdminSendAs{min-height:35px;border-radius:9px!important}
.pmo-enhanced .chat-composer{padding:12px 16px 14px;border-top:1px solid #edf1f6;background:#fff}
.pmo-enhanced .chat-input{min-height:43px;padding:10px 13px;border-radius:11px;background:#f8fafc;border-color:#e2eaf3;font-size:13px}
.pmo-enhanced .chat-send-btn{min-height:42px;min-width:45px;border-radius:10px}
.pmo-enhanced .pmo-ux-main-tools{gap:7px}
.pmo-enhanced .pmo-ux-tool{min-height:34px;border-radius:9px;font-size:11px}
.pmo-enhanced .chat-empty{padding:45px 18px}
@media(max-width:1040px) and (min-width:761px){.chat-layout.pmo-enhanced{grid-template-columns:minmax(280px,34%) minmax(0,1fr)}.pmo-enhanced .chat-mode-btn{font-size:10px;white-space:normal}.pmo-enhanced .pmo-ux-title{font-size:19px}.pmo-enhanced .pmo-ux-toolbar{padding-inline:12px}.pmo-enhanced .chat-messages{padding:16px}}
@media(max-width:760px){
.chat-layout.pmo-enhanced{height:calc(100dvh - var(--topbar-height) - 75px);min-height:0;contain:none}
.pmo-enhanced .chat-mode-toggle{padding:8px 8px 10px}
.pmo-enhanced .chat-mode-btn{white-space:normal}
.pmo-enhanced .pmo-ux-toolbar{padding:16px 13px 10px;gap:11px}
.pmo-enhanced .pmo-ux-employee-start-bar{padding:0 13px 10px}
.pmo-enhanced .chat-channel-list.chat-channel-list-admin{padding:4px 8px 16px}
.pmo-enhanced .pmo-ux-open-row.chat-channel-item{min-height:75px;padding:9px 35px 9px 11px}
.pmo-enhanced .chat-main-head{padding:8px 11px}
.pmo-enhanced .chat-messages{padding:14px 12px}
.pmo-enhanced .chat-msg-body{max-width:85%}
.pmo-enhanced .chat-admin-sendas{padding:8px 10px!important}
.pmo-enhanced .chat-composer{padding:8px 10px calc(10px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.pmo-enhanced .pmo-ux-row,.pmo-enhanced .chat-mode-btn{transition:none}}
