.pc-chats-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px}.pc-chats-head h3{margin:0!important}.pc-chats-head button{border:0;background:#2563eb;color:#fff;border-radius:7px;padding:7px 9px;font-size:12px;font-weight:700;cursor:pointer}.pc-chats>input{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:8px;margin-top:10px;font-size:14px}.pc-room{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left;padding:9px;cursor:pointer;font-size:14px}.pc-room span:not(.pc-unread){flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pc-room.selected{background:#dbeafe;color:#1d4ed8;font-weight:700}.pc-room[hidden]{display:none}.pc-unread{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:12px;background:#2563eb;color:white;font-size:11px;font-weight:700;margin-left:auto}.chat-room{display:flex;gap:8px;align-items:center}.pc-member-list{max-height:300px;overflow:auto;border:1px solid #e2e8f0;border-radius:9px}.pc-member-list label{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #eef2f7}.pc-member-list label[hidden]{display:none}.pc-member-list input{width:18px;height:18px}.pc-member-list small{display:block;color:#64748b;font-size:12px}.pc-goal{padding:22px;margin-bottom:20px}.pc-goal-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.pc-goal-head h2{font-size:20px;margin:0 0 5px}.pc-goal-head p{color:#64748b;font-size:13px;margin:0}.pc-goal-head input{max-width:180px;border:1px solid #cbd5e1;border-radius:8px;padding:8px;font-size:14px}.pc-goal-progress{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center;margin-top:22px;font-size:18px}.pc-goal-progress strong{font-size:30px;color:#0f2447}.pc-goal-progress small{display:block;color:#64748b;font-size:12px;margin-top:9px}.pc-progress-track{height:18px;border-radius:12px;background:#e2e8f0;overflow:hidden}.pc-progress-track span{display:block;height:100%;background:#2563eb;border-radius:12px;transition:width .3s}.pc-goal-details{display:flex;justify-content:space-between;gap:8px;margin-top:8px;font-size:13px;color:#475569}.pc-agency-goal{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #e2e8f0;margin-top:16px;padding-top:12px;font-size:14px}.pc-toast{position:fixed;bottom:22px;right:22px;z-index:1100;max-width:340px;box-shadow:0 8px 28px #0f172a30;border:1px solid #dbeafe;background:white;border-radius:12px;padding:16px;cursor:pointer;color:#0f2447}.pc-toast strong,.pc-toast span{display:block}.pc-toast span{font-size:13px;margin-top:5px;color:#64748b}@media(max-width:700px){.pc-goal-head{align-items:flex-start;flex-direction:column}.pc-goal-progress{grid-template-columns:1fr;gap:18px}.pc-goal-progress strong{font-size:25px}.pc-agency-goal{flex-direction:column;gap:5px}.pc-chats h3{font-size:11px}.pc-goal{padding:16px}.chat-head{flex-wrap:wrap}.pc-toast{left:16px;right:16px;bottom:16px}}

/* Approved light chat design. */
.chat-app{background:#fff;color:#152b4d;border:1px solid #dce5f0;grid-template-columns:240px minmax(0,1fr);border-radius:12px;box-shadow:0 8px 24px #17365d0b;height:calc(100dvh - var(--chat-nav-height,130px) - 40px)}
.chat-sidebar{background:#f8fafc;border-right:1px solid #e2e8f0;padding:20px 14px;overflow:auto;gap:6px}
.pc-sidebar-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}.pc-sidebar-title h2{margin:0;font-size:23px;font-weight:800;color:#142847}
.pc-sidebar-title button{border:0;background:#0878f9;color:white;font-weight:700;font-size:12px;border-radius:7px;padding:9px 11px;white-space:nowrap;cursor:pointer}
#pcChatSearch{width:100%;background:#f2f5fa;border:1px solid #dce5f0;border-radius:7px;font-size:13px;padding:9px 10px;margin-bottom:9px;color:#243b5b}
.chat-sidebar label{font-size:10px;color:#71809a;letter-spacing:.7px}.chat-sidebar select{background:white;color:#344965;border:1px solid #dce5f0;padding:7px 9px;font-size:12px}
.chat-sidebar h3{font-size:11px;color:#51627c;letter-spacing:.3px;margin:16px 8px 6px}.chat-room,.pc-room{padding:9px 10px;color:#243956;font-size:14px;font-weight:500;border-radius:7px;gap:8px}
.chat-room span{font-size:17px;color:#627492;margin-right:2px}.chat-room:hover,.pc-room:hover{background:#edf4ff;color:#15345d}.chat-room.selected,.pc-room.selected{background:#e1eeff;color:#123967;font-weight:750}
.chat-sidebar .chat-unread,.chat-sidebar .pc-unread{background:#0878f9;color:white;font-size:11px;min-width:21px;height:20px;margin-left:auto;margin-right:0}
.chat-sidebar-note{color:#77869e;font-size:11px;line-height:1.6;padding-top:16px}
.chat-main{background:#fff}.chat-head{padding:16px 22px;border-bottom:1px solid #e2e8f0;gap:10px;min-height:76px;flex-wrap:wrap}.chat-head>div:first-child{margin-right:auto}.chat-head strong{color:#102747;font-size:19px}.chat-head strong span{color:#627492}.chat-head small{color:#7a89a0;font-size:12px}
.chat-head button,.chat-head #chatPins,.chat-head #chatRefresh{background:white;border:1px solid #dce5f0;border-radius:7px;color:#2c4668;font-size:12px;font-weight:600;padding:8px 10px;white-space:nowrap}.chat-head #chatRefresh{font-size:19px;padding:4px 10px}.chat-head #chatConnection{color:#708098;font-size:11px;margin-left:0}.chat-head #chatConnection.connected{color:#16956d}
.chat-messages{background:#fff;padding:20px 24px;scrollbar-color:#cbd5e1 #fff}.chat-message{gap:13px;padding:14px 0}.chat-avatar{border-radius:50%;width:40px;height:40px;background:#e6effc;color:#2454a0;font-size:14px}.chat-message header strong{color:#162d4b;font-size:15px;font-weight:750}.chat-message time{color:#8997ac;font-size:11px}
.chat-message-text{color:#304562;font-size:15px;line-height:1.65;margin-top:5px}.chat-message-text a{color:#1671df}.chat-message-actions{gap:6px;margin-top:8px}.chat-message-actions button{background:#f1f6fd;border:1px solid #e0e9f5;color:#385675;border-radius:16px;padding:4px 9px;font-size:12px}.chat-message-actions .mine{background:#e2eeff;border-color:#b4d2ff;color:#1957ab}
.chat-reply-quote{background:#f6f8fc;border-left:3px solid #b7cee9;color:#697d97;border-radius:0 5px 5px 0}.chat-mention{background:#dceaff;color:#1b55a1}.chat-bot{background:#e6f8ef;color:#178457}
.chat-deal{background:linear-gradient(130deg,#f3f8ff,#edf9f4);border-color:#d3e5de;border-left-color:#29b681}.chat-deal-label{color:#1b946c}.chat-deal h3{color:#15395a}.chat-deal h3 small{color:#709085}.chat-deal p{color:#3e5b6c}.chat-deal>span:last-child{color:#6a8591}
.chat-welcome{color:#73829a}.chat-welcome h2{color:#223d5f}.chat-welcome>span{background:#e5eefb;color:#4480c8}.chat-error,.chat-compose-hint span{color:#bd394a}.chat-history-note{color:#71829c}
.chat-compose-wrap{background:#fff;border-top:1px solid #edf1f7;padding:14px 20px 16px}.chat-compose{border:0;background:white;padding:0;gap:9px}.chat-compose textarea{background:#fff;color:#2c4363;border:1px solid #d8e3f0;border-radius:8px;min-height:43px;font-size:14px;padding:11px 13px;resize:vertical}.chat-compose textarea::placeholder{color:#8b9ab0}.chat-compose button{background:#0878f9;color:white;padding:12px 17px;border-radius:7px;font-size:13px;font-weight:700}
.chat-compose #chatAttach,.chat-compose #chatGifButton,.chat-compose #chatSlash{background:#fff;color:#395a82;border:1px solid #d8e3f0;border-radius:7px;min-height:43px;padding:7px 11px}.chat-compose #chatAttach{font-size:22px}.chat-compose #chatSlash{font-size:19px}.chat-compose-hint{color:#8390a6;font-size:11px;margin-top:9px}
.chat-commands,.chat-mentions{background:white;border-color:#d1dff0;box-shadow:0 8px 28px #153a6520}.chat-commands button,.chat-mentions button{color:#314866}.chat-commands strong{color:#234262}.chat-commands small,.chat-command-title{color:#7b8da7}.chat-commands button:hover,.chat-commands button.chosen,.chat-mentions button[aria-selected=true]{background:#e8f1ff}.chat-command-icon{background:#e7effb;color:#2b609e}
.chat-reply-draft{background:#eff5ff;color:#365984}.chat-reply-draft button{color:#57749a}.chat-older{border-color:#d4e0ef;color:#527198}.chat-remove-deal{border-color:#e6c7cb;color:#b44955}.chat-message-text [data-resource-path]{background:#eef5ff;color:#27527d;border-color:#d0e1f7}
#modal:has(#pcCreateForm),#modal:has(#pcPreferenceForm){background:transparent;pointer-events:none}
#modal:has(#pcCreateForm) .modalbox,#modal:has(#pcPreferenceForm) .modalbox{pointer-events:auto;position:absolute;right:var(--pc-panel-right,24px);top:var(--pc-panel-top,150px);max-height:calc(100dvh - var(--pc-panel-top,150px) - 20px);overflow:auto;margin:0;border:1px solid #dce5ef;box-shadow:0 10px 30px #172f571c;border-radius:10px;padding:20px;background:white}
#modal:has(#pcCreateForm) .modalbox{width:330px;max-width:94vw}#modal:has(#pcCreateForm) h2{font-size:22px;margin-top:0;color:#152b4c}
#modal:has(#pcCreateForm) label{font-size:13px;color:#29425f;font-weight:600}#modal:has(#pcCreateForm) input[type=text],#modal:has(#pcCreateForm) input[type=search],#modal:has(#pcCreateForm) select{font-size:14px;border-color:#dbe5f0;border-radius:7px}
#modal:has(#pcPreferenceForm) .modalbox{width:285px;max-width:90vw;padding:18px}#modal:has(#pcPreferenceForm) h2{font-size:17px;margin:0}#modal:has(#pcPreferenceForm) label{background:#f4f7fc;padding:10px;border-radius:7px;font-size:13px}
@media(min-width:1200px){body:has(#pcCreateForm) .chat-app{padding-right:350px}}
@media(max-width:900px){.chat-app{grid-template-columns:190px minmax(0,1fr)}.pc-sidebar-title{flex-wrap:wrap}.chat-head,.chat-messages{padding:14px}.chat-compose-wrap{padding:12px}.chat-head button{padding:7px;font-size:11px}}
@media(max-width:580px){.chat-app{display:flex;min-height:550px}.chat-sidebar{display:block;max-height:210px;border-bottom:1px solid #e2e8f0;border-right:0;padding:12px;overflow:auto}.pc-sidebar-title{display:flex;flex-wrap:nowrap}.chat-sidebar label,.chat-sidebar h3{display:block}.chat-sidebar select{display:block}.chat-room{display:inline-flex!important;width:auto;margin:0 4px 4px 0}.pc-chats{display:block}.pc-room{display:inline-flex;width:auto;margin-right:5px}.pc-chats h3{display:inline-block;font-size:10px;margin-right:6px}.chat-main{min-height:330px}.chat-compose{gap:5px}.chat-compose button{padding:10px}.chat-compose #chatSlash{display:none}.chat-message-text{font-size:14px}#modal:has(#pcCreateForm),#modal:has(#pcPreferenceForm){background:#0c234947;pointer-events:auto}#modal:has(#pcCreateForm) .modalbox,#modal:has(#pcPreferenceForm) .modalbox{position:relative;right:auto;top:auto;width:94vw;max-height:85dvh;margin:auto}}

.pc-member-chips{display:flex;gap:7px;flex-wrap:wrap}.pc-member-chips:empty{display:none}.pc-member-chips>span{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid #dce5f0;background:#f2f6fc;border-radius:7px;font-size:12px;color:#294366}.pc-member-chips button{border:0;background:transparent;color:#73849b;padding:0;font-size:17px;cursor:pointer}
#modal:has(#pcCreateForm) .pc-member-list{max-height:180px}#modal:has(#pcCreateForm) #pcCreateSave{flex:1;width:100%;background:#0878f9}#modal:has(#pcCreateForm) #pcCancel{font-size:12px}
.chat-head #pcPrefs{display:flex;align-items:center;justify-content:center;border-radius:50%;background:#f0f5fc;border-color:transparent;min-width:34px;min-height:34px;padding:7px}

/* Keep create-chat fields full width, with labels above controls. */
#pcCreateForm{display:flex;flex-direction:column;gap:18px}
#pcCreateForm>label{display:flex;flex-direction:column;gap:8px;line-height:1.4}
#pcCreateForm>label[hidden]{display:none}
#pcCreateForm #pcName,#pcCreateForm #pcMemberSearch,#pcCreateForm #pcKind{display:block;width:100%;box-sizing:border-box;min-height:44px;padding:11px 12px;background:#fff;border:1px solid #d5e0ee;border-radius:8px;font:inherit;color:#243b5b}
#pcCreateForm #pcName:focus,#pcCreateForm #pcMemberSearch:focus,#pcCreateForm #pcKind:focus{outline:2px solid #a8cfff;outline-offset:1px;border-color:#3187ed}
#pcCreateForm #pcCreateError:empty{display:none}
#pcCreateForm>.row{display:flex;gap:10px;margin-top:8px}
#pcCreateForm .pc-member-list label{display:flex;flex-direction:row;align-items:center}

/* Honor filtering after the member-row and responsive flex layout rules. */
#pcCreateForm .pc-member-list label[hidden],#pcCreateForm #pcMemberEmpty[hidden],.pc-chats .pc-room[hidden]{display:none!important}
#pcCreateForm #pcMemberHelp{margin:0;line-height:1.45}
#pcCreateForm #pcMemberEmpty{padding:12px;margin:0;line-height:1.45}
#pcCreateForm #pcCreateError{color:#b42318;line-height:1.45;margin:0}
