:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#24242a;background:#f8f6fb;--purple:#7156e8;--purple-soft:#eee9ff;--orange:#f56b22;--line:#ece9f1;--muted:#8b8794}*{box-sizing:border-box}body{margin:0;overflow:hidden}.workspace{height:100vh;display:flex;background:#faf8fc}.rail{width:74px;background:#767789;color:#fff;display:flex;align-items:center;flex-direction:column;padding:14px 0;gap:12px}.rail-logo{width:48px;height:48px;border-radius:16px;background:#6754e8;display:grid;place-items:center;font-size:25px;margin-bottom:6px}.rail-btn{width:46px;height:46px;border:0;border-radius:14px;background:#56596a;color:white;font-size:22px;cursor:pointer;opacity:.9}.rail-btn.active{background:#6d57eb}.rail-btn:hover{filter:brightness(1.08)}.rail-spacer{flex:1}.app-shell{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.brand{display:flex;align-items:center;gap:13px}.brand b{font-size:20px}.brand span{font-size:13px;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:12px}.status-chip{padding:7px 12px;border-radius:8px;font-size:12px;font-weight:700}.status-chip.on{color:#d94d52;background:#ffe9eb}.status-chip.off{color:#777;background:#f2f1f3}.btn{border:0;border-radius:10px;padding:10px 14px;cursor:pointer;font:inherit}.btn.small{padding:8px 12px}.btn.orange{background:var(--orange);color:#fff;font-weight:700}.btn.ghost{background:#fff;border:1px solid #dedbe3}.seat{display:flex;align-items:center;gap:8px;padding-left:8px}.seat-avatar{width:36px;height:36px;border-radius:50%;background:#7460e9;color:#fff;display:grid;place-items:center;font-weight:800}.seat small{display:block;color:#7359e8;font-size:11px;margin-top:2px}.three-col{flex:1;min-height:0;display:grid;grid-template-columns:360px minmax(460px,1fr) 320px}.conversation-panel,.profile-panel{background:#fff;min-height:0}.conversation-panel{border-right:1px solid var(--line);display:flex;flex-direction:column}.panel-title{font-size:18px;font-weight:800;padding:18px 18px 10px}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 14px 12px}.tab{border:0;border-radius:9px;padding:9px;background:#fff;color:#514f58;font-weight:700;cursor:pointer}.tab.active{background:#e9e0ff;color:#6d55de}.search-wrap{padding:0 14px 14px}.search-wrap input{width:100%;border:1px solid #dcd8e3;border-radius:13px;padding:11px 14px;font:inherit;outline:none}.sessions{overflow:auto}.session{position:relative;display:flex;align-items:center;gap:10px;margin:0 10px 4px;padding:12px 10px;border-radius:16px;cursor:pointer}.session:hover,.session.active{background:#ece5ff}.session-check{display:flex;align-items:center}.session-check input{width:17px;height:17px}.avatar{width:42px;height:42px;border-radius:50%;background:#22bf5a;color:#fff;display:grid;place-items:center;font-weight:800}.sbody{min-width:0;flex:1}.srow{display:flex;align-items:center;justify-content:space-between;gap:8px}.srow span,.preview{font-size:12px;color:#8f8b98}.preview{margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session i{position:absolute;right:8px;bottom:9px;background:#ef4554;color:white;border-radius:50%;min-width:20px;height:20px;display:grid;place-items:center;font-size:11px;font-style:normal}.no-data{padding:36px;text-align:center;color:#9b97a4}.chat-panel{min-width:0;min-height:0;background:#fbf7ff}.empty-state{height:100%;display:grid;place-items:center;align-content:center;gap:10px;color:#a6a0af}.empty-icon{font-size:42px}.chat{height:100%;display:flex;flex-direction:column}.chat-head{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px}.chat-user{display:flex;align-items:center;gap:11px}.chat-avatar{width:38px;height:38px;border-radius:7px;background:#22c35c;color:white;display:grid;place-items:center;font-weight:800}.subtle{font-size:12px;color:#9792a1;margin-top:3px}.pin-btn{border:0;background:none;font-size:20px;cursor:pointer}.messages{flex:1;overflow:auto;padding:20px 7%;background:#fbf6ff}.msg{margin:14px 0;display:flex;flex-direction:column;align-items:flex-start}.msg.out{align-items:flex-end}.msg-line{display:flex;align-items:flex-end;gap:8px;max-width:86%}.bubble{max-width:680px;padding:10px 14px;border-radius:17px;background:#eeeef3;color:#2e2c33;white-space:pre-wrap;word-break:break-word;box-shadow:0 1px 1px #00000008}.msg.out .bubble{background:#7258e7;color:#fff}.mini-avatar,.agent-tag{width:32px;height:32px;border-radius:7px;display:grid;place-items:center;font-weight:800}.mini-avatar{background:#22bf5a;color:#fff}.agent-tag{background:#d8ffe2;color:#199849}.msg time{font-size:11px;color:#938d9e;margin:5px 42px}.msg.out time{text-align:right}.composer-area{background:#fff;border-top:1px solid var(--line);padding:8px 14px 14px}.composer-tools{display:flex;gap:14px;padding:4px 2px 8px}.composer-tools button{border:0;background:transparent;font-size:20px;cursor:pointer}.composer{display:grid;grid-template-columns:1fr 54px;gap:10px;align-items:end}.composer textarea{width:100%;border:1px solid #dbd6e5;border-radius:18px;padding:12px 14px;resize:none;font:inherit;outline:none;min-height:70px}.send-btn{width:50px;height:50px;border:0;border-radius:50%;background:#755bea;color:white;font-size:24px;cursor:pointer}.profile-panel{border-left:1px solid var(--line);overflow:auto}.profile-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:15px}.profile-tab{border:0;background:#fff;border-radius:10px;padding:10px;font:inherit;color:#777;cursor:pointer}.profile-tab.active{background:#eee9ff;color:#7059df;font-weight:800}.profile-empty{padding:60px 20px;text-align:center;color:#9a95a3}.profile-body{padding:0 18px 20px}.profile-hero{text-align:center;padding:12px 0 20px}.profile-avatar{width:72px;height:72px;background:#22bf5a;color:#fff;font-size:34px;font-weight:800;display:grid;place-items:center;margin:0 auto 10px}.profile-hero h3{margin:4px 0}.profile-type{color:#8d8797;font-size:12px}.profile-list{border-top:1px solid var(--line)}.profile-list>div{display:grid;grid-template-columns:112px 1fr;gap:8px;padding:13px 2px;border-bottom:1px solid var(--line);font-size:13px}.profile-list span{color:#8e8997}.profile-list strong{text-align:right;font-weight:500;word-break:break-all}.online-dot{color:#26b55a!important}.wide{width:100%;border:0;border-radius:12px;padding:12px;margin-top:14px;font-weight:800;cursor:pointer}.purple{background:#7259e7;color:#fff}.danger-soft{background:#ffe6e1;color:#6e3333}.hidden{display:none!important}.modal{position:fixed;inset:0;background:#0007;display:grid;place-items:center;z-index:50}.modal-card{width:410px;max-width:92vw;background:#fff;border-radius:18px;padding:28px;text-align:center;position:relative}.modal-card img{width:310px;max-width:100%}.modal-card h2{margin-top:8px}.x{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;cursor:pointer}.verify-wrap{display:flex;gap:8px}.verify-wrap input{flex:1;border:1px solid #ddd;border-radius:9px;padding:10px}@media(max-width:1100px){.three-col{grid-template-columns:320px 1fr}.profile-panel{display:none}}@media(max-width:760px){.rail{display:none}.three-col{grid-template-columns:110px 1fr}.conversation-panel .panel-title,.tabs,.search-wrap,.session-check,.sbody{display:none}.session{justify-content:center}.topbar{padding:0 10px}.seat{display:none}}

.chat-head-actions{display:flex;align-items:center;gap:8px}.sync-history-btn{border:1px solid #ddd7ef;background:#fff;color:#6a55d7;border-radius:9px;padding:7px 10px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}.sync-history-btn:hover{background:#f1ecff}.sync-history-btn:disabled{opacity:.55;cursor:wait}


/* inbound media */
.msg-content{display:flex;flex-direction:column;gap:7px;max-width:680px}.chat-image{display:block;max-width:min(360px,60vw);max-height:420px;border-radius:12px;object-fit:contain;background:#eee}.chat-video{display:block;max-width:min(420px,65vw);max-height:420px;border-radius:12px;background:#111}.media-link{display:block}.voice-card{min-width:180px;max-width:360px;padding:10px 12px;border-radius:14px;background:#eeeef3;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.voice-card audio{width:220px;max-width:100%;height:34px}.voice-card small{width:100%;color:#666}.file-card{display:flex;align-items:center;gap:8px;padding:11px 13px;border-radius:13px;background:#eeeef3;color:#383542;text-decoration:none;max-width:360px;word-break:break-all}.media-error{padding:10px 12px;border-radius:12px;background:#fff2e7;color:#a05b21}.msg.out .voice-card,.msg.out .file-card{background:#eae5ff}
.purple-mini{background:#7058e8;color:#fff;font-weight:700}.entry-card{width:470px}.entry-card img{width:300px;max-width:100%;border:1px solid #eee;border-radius:12px}.entry-help{color:#777;font-size:13px;line-height:1.6}.entry-url{margin:12px 0 6px;padding:10px;border-radius:10px;background:#f6f4fa;word-break:break-all;font-size:12px;text-align:left}.entry-count{color:#6e59dc;font-weight:700;margin:8px 0}.entry-actions{display:flex;gap:10px;justify-content:center;margin-top:12px}


/* customer profile / blacklist / visitor details */
.session.blocked{opacity:.72}.blocked-badge{display:inline-block;margin-left:6px;padding:1px 5px;border-radius:999px;background:#ffe1df;color:#c6463d;font-style:normal;font-size:10px;vertical-align:1px}.danger-text{color:#d64842!important}.wide.unblock{background:#e5f6e9;color:#2d8b46}.detail-soft{background:#eef0ff;color:#5b56c7}.customer-edit-card{width:560px;max-width:94vw;text-align:left}.customer-edit-card h2,.visitor-detail-card h2{text-align:center}.customer-form{display:grid;gap:12px;margin-top:18px}.customer-form label{display:grid;gap:6px;font-size:13px;color:#666}.customer-form input,.customer-form textarea,.customer-form select{width:100%;box-sizing:border-box;border:1px solid #ddd7e6;border-radius:10px;padding:10px 12px;font:inherit;background:#fff;outline:none}.customer-form input:focus,.customer-form textarea:focus,.customer-form select:focus{border-color:#7b64ea;box-shadow:0 0 0 3px #7b64ea16}.customer-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.visitor-detail-card{width:620px;max-width:94vw;text-align:left}.visitor-detail{display:grid;grid-template-columns:1fr 1fr;gap:0 20px;margin-top:18px}.visitor-detail>div{display:grid;grid-template-columns:110px 1fr;gap:8px;padding:11px 0;border-bottom:1px solid #eee}.visitor-detail span{color:#8b8694}.visitor-detail b{font-weight:600;word-break:break-all}@media(max-width:700px){.customer-form-grid,.visitor-detail{grid-template-columns:1fr}}

/* full visitor list page */
.visitor-page{flex:1;min-height:0;overflow:auto;padding:22px 26px 36px;background:#fbf8ff}.visitor-page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.visitor-page-head h2{margin:0;font-size:22px}.visitor-page-head p{margin:5px 0 0;color:#938d9e;font-size:13px}.visitor-stats{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:18px;margin-bottom:18px}.visitor-stats article{position:relative;background:#fff;border:1px solid #eee9f4;border-radius:22px;padding:22px 22px 26px;box-shadow:0 6px 18px #452c6f12;overflow:hidden}.visitor-stats article::after{content:"";position:absolute;right:-26px;top:-32px;width:92px;height:92px;border-radius:50%;background:#eef4ff}.visitor-stats article:nth-child(2)::after{background:#eff8ef}.visitor-stats article:nth-child(3)::after{background:#fff2e8}.visitor-stats article:nth-child(4)::after{background:#f1efff}.visitor-stats span{display:block;color:#4c4854;font-size:15px}.visitor-stats b{display:block;margin-top:8px;font-size:27px}.visitor-filters{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.visitor-filter{border:1px solid #dbd5e8;background:#fff;border-radius:999px;padding:10px 16px;cursor:pointer;font-weight:700;color:#666}.visitor-filter.active{background:#7358e8;color:#fff;border-color:#7358e8}.visitor-table-wrap{background:#fff;border:1px solid #eee9f4;border-radius:22px;padding:14px 18px 18px;box-shadow:0 6px 18px #452c6f12;overflow:auto}.visitor-table{width:100%;border-collapse:collapse;min-width:940px}.visitor-table th,.visitor-table td{padding:14px 12px;border-bottom:1px solid #eeeaf2;text-align:left;font-size:13px;vertical-align:middle}.visitor-table th{color:#55505d;font-weight:800;background:#fbfbfd;position:sticky;top:0;z-index:1}.visitor-person{display:flex;align-items:center;gap:9px}.visitor-avatar{width:34px;height:34px;border-radius:8px;background:#24bf5b;color:#fff;display:grid;place-items:center;font-weight:800}.table-link{border:0;background:transparent;padding:3px 2px;color:#6656dd;cursor:pointer;font:inherit}.table-link:hover{text-decoration:underline}.danger-action{color:#d54b48}.reply-state,.session-state,.list-state{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;white-space:nowrap}.reply-state.done{background:#e8f7eb;color:#2b9950}.reply-state.waiting{background:#fff0d9;color:#b47213}.session-state{background:#e7f2ff;color:#377abe}.list-state.normal{background:#e5f4e7;color:#2f9b4b}.list-state.blocked{background:#ffe4df;color:#c94b42}.visitor-actions{display:flex;gap:12px;align-items:center;white-space:nowrap}.visitor-empty{text-align:center;padding:40px;color:#999}.rail-btn[title="访客列表"].active{background:#6d57eb}.purple-mini{background:#7058e8;color:#fff;font-weight:700}.entry-card{width:470px}.entry-card img{width:300px;max-width:100%;border:1px solid #eee;border-radius:12px}.entry-help{color:#777;font-size:13px;line-height:1.6}.entry-url{margin:12px 0 6px;padding:10px;border-radius:10px;background:#f6f4fa;word-break:break-all;font-size:12px;text-align:left}.entry-count{color:#6e59dc;font-weight:700;margin:8px 0}.entry-actions{display:flex;gap:10px;justify-content:center;margin-top:12px}
@media(max-width:1050px){.visitor-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.visitor-page{padding:14px}.visitor-stats{grid-template-columns:1fr 1fr;gap:10px}.visitor-filters{grid-template-columns:1fr 1fr}.visitor-page-head p{display:none}}
.dashboard-page{flex:1;overflow:auto;padding:22px;background:#fbf8fd}.dashboard-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.dashboard-head h2{margin:0;font-size:20px}.dashboard-cards{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:18px}.dashboard-cards article{min-height:150px;background:#fff;border:1px solid #eee8f1;border-radius:24px;padding:24px;display:flex;gap:18px;align-items:flex-start;box-shadow:0 8px 20px #4e3f6414}.dashboard-cards article div{display:flex;flex-direction:column;gap:10px;font-size:16px}.dashboard-cards article b{font-size:24px}.dash-icon{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;font-size:26px;font-weight:800;box-shadow:0 4px 10px #0002}.dash-icon.blue{background:#bfe4ff;color:#1764a8}.dash-icon.green{background:#c8efc9;color:#25813c}.dash-icon.orange{background:#ffe2a9;color:#d27b00}.dash-icon.purple{background:#e4d4ff;color:#6f50dc}.trend-card{margin-top:28px;background:#fff;border:1px solid #eee8f1;border-radius:24px;padding:28px;min-height:300px;box-shadow:0 8px 20px #4e3f6414}.trend-title{font-size:18px;margin-bottom:26px}.trend-chart{height:220px;display:grid;grid-template-columns:repeat(7,1fr);gap:22px;align-items:end;border-bottom:1px solid #eee8f1;padding:0 30px 18px}.trend-col{height:190px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:9px;color:#888392;font-size:12px}.trend-bar-wrap{height:165px;width:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.trend-count{font-size:11px;color:#6c58e8;margin-bottom:4px}.trend-bar{width:20px;border-radius:5px 5px 0 0;background:#7058ea;min-height:2px}@media(max-width:1200px){.dashboard-cards{grid-template-columns:repeat(2,minmax(180px,1fr))}}

/* emoji + outbound media */
.composer-area{position:relative}
.composer-tools button{cursor:pointer;border:0;background:transparent;font-size:20px;padding:5px 8px;border-radius:8px}
.composer-tools button:hover{background:#f0ebff}
.composer-tools button:disabled{opacity:.45;cursor:not-allowed}
.media-send-status{font-size:12px;color:#6e61a9;margin-left:6px}
.emoji-panel{position:absolute;left:16px;bottom:92px;z-index:30;width:310px;max-height:220px;overflow:auto;background:#fff;border:1px solid #e9e3f5;border-radius:16px;box-shadow:0 12px 36px #3d2f6d26;padding:10px;display:grid;grid-template-columns:repeat(8,1fr);gap:4px}
.emoji-panel.hidden{display:none}
.emoji-panel button{border:0;background:transparent;border-radius:8px;font-size:23px;line-height:36px;height:38px;cursor:pointer}
.emoji-panel button:hover{background:#f2edff}

/* productivity: pinned conversations, customer tags, unanswered reminders */
.pin-btn.active{background:#fff3c8;border-radius:9px;padding:5px 8px;box-shadow:0 0 0 1px #f2d36d inset}.session.is-pinned{box-shadow:inset 3px 0 0 #f2b544}.inline-pin{font-size:12px}.session-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.session-tags span{font-size:10px;line-height:1;padding:4px 6px;border-radius:999px;background:#f0ebff;color:#6c54d9;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-reminder{display:inline-flex;margin-top:6px;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:800}.reply-reminder.due{background:#fff2c7;color:#9b6d00}.reply-reminder.warn{background:#ffe5cc;color:#bf6200}.reply-reminder.critical{background:#ffe0e3;color:#c62d3e}.session.needs-reply{background-image:linear-gradient(90deg,#fff9f2 0,transparent 55%)}.session.active.needs-reply{background-image:linear-gradient(90deg,#f1e9ff 0,#fff6ee 100%)}.reminder-control{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px 12px;font-size:11px;color:#888291}.reminder-control select{border:1px solid #ddd7e7;background:white;border-radius:8px;padding:5px 7px;color:#5b5664;outline:none}.customer-tags-box{padding:0 2px 14px;margin-bottom:4px;border-bottom:1px solid var(--line)}.customer-tags-head{display:flex;align-items:center;justify-content:space-between;color:#8e8997;font-size:13px;margin-bottom:9px}.customer-tags-head button{border:0;background:#eee9ff;color:#6b54de;border-radius:8px;padding:5px 8px;cursor:pointer;font-weight:700}.customer-tags{display:flex;gap:6px;flex-wrap:wrap}.customer-tag{border:0;border-radius:999px;padding:6px 9px;background:#efeaff;color:#654bd5;cursor:pointer;font-size:11px}.customer-tag:hover{background:#ffe6e6;color:#b53d3d}.tags-empty{font-size:12px;color:#aaa4b0}


/* login page */
.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#fff5ef,#f5f6f8)}
.login-card{width:min(430px,92vw);background:#fff;border:1px solid #e6e8ec;border-radius:18px;padding:36px;box-shadow:0 20px 60px #0001}
.lobster{font-size:42px}
.login-card h1{margin:8px 0}
.login-card p{color:#7c8490}
.login-card label{display:block;margin:18px 0 7px}
.login-card input{width:100%;border:1px solid #dfe3e8;border-radius:10px;padding:12px 14px;font:inherit;outline:none}
.login-card button{width:100%;margin-top:22px;border:0;border-radius:10px;padding:12px;background:#ec641f;color:#fff;font-weight:700;cursor:pointer}
.login-card .error{color:#d33;margin-top:12px}

/* Team operator management */
.operator-card{width:min(980px,94vw);max-height:88vh;overflow:auto}
.operator-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.operator-head h2{margin:0 0 6px}.operator-head p{margin:0;color:#777;font-size:13px}
.operator-table-wrap{border:1px solid #eee;border-radius:14px;overflow:auto;background:#fff}
.operator-table{width:100%;border-collapse:collapse;min-width:760px}.operator-table th,.operator-table td{padding:13px 14px;border-bottom:1px solid #f0f0f0;text-align:left;vertical-align:middle;font-size:13px}.operator-table th{background:#fafafa;color:#666;font-weight:600}.operator-table tr:last-child td{border-bottom:0}
.operator-wechat{display:flex;flex-direction:column;gap:3px}.operator-wechat:before{content:'●';color:#bbb;margin-right:5px}.operator-wechat.online:before{color:#23b26d}.operator-wechat small{display:block;color:#999;font-size:11px;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.operator-status{display:inline-flex;padding:3px 9px;border-radius:999px;font-size:12px}.operator-status.enabled{background:#eaf8f0;color:#16854f}.operator-status.disabled{background:#f1f1f1;color:#888}
.operator-actions{display:flex;gap:10px;white-space:nowrap}
.operator-form{margin-top:18px;padding:18px;border:1px solid #ece8ff;border-radius:14px;background:#faf9ff}.operator-form h3{margin:0 0 14px}.operator-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.operator-form label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#555}.operator-form input,.operator-form select{height:40px;border:1px solid #ddd;border-radius:9px;padding:0 11px;background:#fff;font:inherit}.operator-enabled{margin-top:14px!important;display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important}.operator-enabled input{height:auto;width:auto}
@media(max-width:720px){.operator-form-grid{grid-template-columns:1fr}.operator-head{flex-direction:column}.operator-card{width:96vw}}

/* multi-tenant platform manager */
.platform-card{width:min(1180px,96vw);max-height:92vh;overflow:auto}.platform-head-actions{display:flex;gap:8px;align-items:center}.tenant-slug{display:block;color:#8b8894;font-weight:500;margin-top:3px}.platform-card a{color:#6653d9;text-decoration:none}.platform-card a:hover{text-decoration:underline}.platform-card .operator-table td:nth-child(5){min-width:180px}

/* Delivery acknowledgement state (2026-09-20 normal-system parity patch) */
.delivery-state{white-space:nowrap}
.msg.send-failed .delivery-state{color:#dc2626;font-weight:700}

/* =========================================================
   Normal-system visual parity — 2026-09-21
   Front-end only. Existing ClawDesk IDs / behaviors preserved.
   ========================================================= */
:root{
  --ui-purple:#6f55e7;
  --ui-purple-2:#7a5df0;
  --ui-purple-soft:#eee8ff;
  --ui-purple-soft-2:#f7f3ff;
  --ui-cyan:#10b9cc;
  --ui-green:#25c763;
  --ui-green-soft:#dff9e8;
  --ui-text:#29262f;
  --ui-muted:#9993a2;
  --ui-border:#eeeaf1;
  --ui-panel:#ffffff;
  --ui-chat:#fbf7ff;
  --ui-rail:#777986;
}
html,body{width:100%;height:100%}
body{background:#fff;color:var(--ui-text);font-family:Inter,"Microsoft YaHei","PingFang SC",system-ui,sans-serif}
.workspace{height:100vh;background:#fff}
.rail{width:78px;flex:0 0 78px;background:var(--ui-rail);padding:18px 0 12px;gap:10px;box-shadow:inset -1px 0 rgba(255,255,255,.08)}
.rail-logo{width:48px;height:48px;border-radius:16px;background:#654ef0;color:#fff;display:grid;place-items:center;margin-bottom:2px}
.rail-logo svg{width:28px;height:28px;fill:currentColor}
.rail-avatar{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:#6e58eb;color:#fff;font-weight:800;font-size:18px;margin:2px 0 4px}
.rail-btn{width:46px;height:40px;border-radius:14px;background:#4e5362;color:#fff;display:grid;place-items:center;padding:0;opacity:.95}
.rail-btn svg{width:21px;height:21px;fill:currentColor}
.rail-btn.active{background:#694ff0;box-shadow:0 6px 18px rgba(69,51,168,.22)}
.rail-btn:hover{background:#606477;filter:none}
.rail-btn.active:hover{background:#694ff0}
.rail-online-dot{width:7px;height:7px;border-radius:50%;background:#27be56;margin-top:6px;box-shadow:0 0 0 2px rgba(39,190,86,.12)}
.app-shell{background:#fff}
.topbar{height:78px;flex:0 0 78px;border-bottom:1px solid #f0edf2;background:#fff;padding:0 28px 0 40px}
.brand{gap:0;min-width:160px}
.brand b{display:none}
.brand span{font-size:16px;font-weight:700;color:#39353e;letter-spacing:.2px}
.top-actions{gap:12px}
.status-chip{font-size:11px;padding:5px 11px;border-radius:7px;font-weight:700;border:0}
.status-chip.on{background:#e9f8ee;color:#12a649}
.status-chip.off{background:#f1eff3;color:#8e8898}
.top-link-btn{height:31px;padding:0 12px;border:0;border-radius:10px;background:#fff;color:#8c8696;font-size:12px;font-weight:700;cursor:pointer}
.top-link-btn:hover{background:#f4f0ff;color:#6650d8}
.top-link-btn.primary{background:#eee9ff;color:#6b54de}
.seat{padding-left:2px;gap:8px}
.seat-avatar{width:38px;height:38px;background:#7058e9;font-size:16px}
.seat b{font-size:14px}.seat small{font-size:10px;color:#7058e9;background:#eee9ff;border-radius:8px;padding:2px 5px;width:max-content}
#logoutBtn{height:34px;border-radius:10px;padding:0 15px;color:#605b68;border-color:#e4e0e7;background:#fff}
.three-col{grid-template-columns:292px minmax(520px,1fr) 302px;background:#fff}
.conversation-panel{border-right:1px solid var(--ui-border);background:#fff}
.session-list-head{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 16px 0 15px}
.panel-title{padding:0;font-size:15px;font-weight:800;color:#26232b}
.chat-ws-state{font-size:11px;font-weight:700;color:#1eae50;white-space:nowrap}.chat-ws-state.reconnecting,.chat-ws-state.connecting{color:#8a8493}.chat-ws-state.offline{color:#dc5b5b}
.tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 12px 10px}
.tabs:has(#sendAnomalyTab){grid-template-columns:repeat(3,minmax(0,1fr))}
.tab{height:34px;padding:0 8px;border-radius:8px;font-size:12px;color:#6f6978;font-weight:700;background:#fff}
.tab.active{background:#e9dcff;color:#7056e5}
.reminder-control{margin:0 12px 7px;min-height:31px;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 6px;color:#8e8897;font-size:11px}
.reminder-control select{border:1px solid #e2dee7;background:#fff;border-radius:8px;height:29px;padding:0 7px;color:#6e6878;font-size:11px;outline:none}
.search-wrap{padding:0 14px 10px}
.search-wrap input{height:39px;padding:0 14px;border:1px solid #d7d2dc;border-radius:11px;background:#fff;font-size:12px;color:#4f4958;box-shadow:0 1px 0 rgba(0,0,0,.01)}
.search-wrap input:focus{border-color:#b5a7ef;box-shadow:0 0 0 2px rgba(112,86,229,.08)}
.sessions{padding:0 7px 14px;scrollbar-width:thin;scrollbar-color:#d8d2df transparent}
.session{min-height:82px;margin:0 0 4px;padding:11px 10px 11px 8px;border-radius:13px;gap:10px;transition:background .15s ease,transform .15s ease}
.session:hover{background:#f8f4ff}.session.active{background:#eae1ff}.session.needs-reply{box-shadow:none}
.session-check input{width:14px;height:14px;accent-color:#7659e7}
.session .avatar{width:39px;height:39px;flex:0 0 39px;background:var(--ui-cyan);font-size:15px}
.srow b{font-size:13px;color:#2f2a34;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow>span{font-size:10px;color:#8f8998}.preview{font-size:12px;color:#6f6978;margin-top:4px}
.session i{right:9px;bottom:11px;min-width:20px;height:20px;font-size:10px;background:#d43e3e}
.blocked-badge{font-size:9px;margin-left:4px;padding:2px 5px;background:#f7e5e5;color:#c25252}
.reply-reminder{margin-top:5px;font-size:10px!important;color:#b3752e!important;background:transparent!important;padding:0!important;border:0!important}.reply-reminder.critical{color:#c54c4c!important}
.session-tags{margin-top:5px}.session-tags span{font-size:9px;padding:2px 5px;border-radius:8px;background:#f0ecfa;color:#756a91}
.chat-panel{background:var(--ui-chat)}
.chat-head{height:70px;flex:0 0 70px;padding:0 16px;border-bottom:1px solid #ece7f0;background:#fff}
.chat-user{gap:10px}.chat-avatar{width:38px;height:38px;border-radius:0;background:var(--ui-cyan);font-size:15px}.chat-user b{font-size:14px}.subtle{font-size:11px;color:#a09aaa}
.chat-head-actions{gap:6px}.sync-history-btn{height:31px;padding:0 10px;font-size:11px;border-color:#e4dfeb;color:#7660d9;border-radius:9px}.pin-btn{width:32px;height:32px;border-radius:9px;font-size:17px}.pin-btn:hover{background:#f0ebff}
.messages{padding:24px 16px 18px;background:#fbf7ff}
.msg{margin:13px 0}.msg-line{max-width:78%;gap:8px}.bubble{padding:10px 14px;border-radius:16px;background:#e8e6eb;color:#302d34;font-size:14px;line-height:1.5;box-shadow:none}.msg.in .bubble{border-top-left-radius:8px}.msg.out .bubble{background:#6e55e9;color:#fff;border-top-right-radius:8px}
.mini-avatar,.agent-tag{width:36px;height:36px;border-radius:5px;font-size:14px}.mini-avatar{background:var(--ui-cyan)}.agent-tag{background:#d6f8df;color:#15914a}
.msg time{margin:4px 44px 0;font-size:10px;color:#938d9d}.msg.out time{margin-right:44px}.delivery-state{color:#928c9b}.msg.send-failed .delivery-state{color:#d45151}
.composer-area{background:#fff;border-top:1px solid #ece7f0;padding:10px 14px 12px}
.composer-tools{height:39px;display:flex;align-items:center;gap:12px;padding:0 3px 7px}
.composer-tools button{width:25px;height:25px;display:grid;place-items:center;padding:0;font-size:17px;color:#5e5965;border-radius:7px}
.composer-tools button:hover{background:#f3eff9;color:#6e55e9}
.voice-record-status,.media-send-status{font-size:10px;color:#8e8798}
.composer{grid-template-columns:1fr 54px;gap:9px;align-items:center}
.composer textarea{min-height:44px;height:44px;max-height:112px;padding:11px 14px;border-radius:17px;border:1px solid #b8aaec;background:#fff;font-size:13px;line-height:20px;box-shadow:inset 0 0 0 1px rgba(112,86,229,.04)}
.composer textarea:focus{border-color:#8068e9;box-shadow:0 0 0 2px rgba(112,86,229,.08)}
.send-btn{width:52px;height:44px;border-radius:14px;background:#e9ddff;color:#4d36b9;font-size:22px;box-shadow:0 4px 12px rgba(96,70,196,.18)}
.send-btn:hover{background:#dfd0ff}
.empty-state{background:#fbf7ff;color:#aaa3b2;font-size:13px}.empty-icon{font-size:46px;opacity:.65}
.profile-panel{border-left:1px solid var(--ui-border);background:#fff}
.profile-tabs{padding:14px 13px 8px;gap:8px}.profile-tab{height:38px;padding:0;border-radius:9px;font-size:12px;color:#948e9d}.profile-tab.active{background:#ece8ff;color:#7159df}
.profile-body{padding:0 16px 20px}.profile-hero{padding:14px 0 18px}.profile-avatar{width:64px;height:64px;background:var(--ui-cyan);border-radius:0;font-size:26px;margin-bottom:10px}.profile-hero h3{font-size:15px;margin:5px 0}.profile-type{font-size:11px}
.profile-list{border-top:0}.profile-list>div{min-height:36px;grid-template-columns:92px 1fr;align-items:center;padding:8px 2px;border-bottom:1px solid #eeeaf1;font-size:11px}.profile-list span{color:#8f8998}.profile-list strong{font-size:11px;color:#4d4853}.online-dot{color:#21ad51!important}.online-dot:before{content:'●';font-size:9px;margin-right:5px}
.customer-tags-box{border-top:1px solid #eeeaf1;border-bottom:1px solid #eeeaf1;padding:9px 1px}.customer-tags-head{font-size:11px;color:#8f8998}.customer-tags-head button{border:0;background:none;color:#7259df;font-size:11px;cursor:pointer}.customer-tags{margin-top:6px;display:flex;flex-wrap:wrap;gap:5px}.customer-tag{border:0;border-radius:10px;padding:3px 7px;background:#ece8ff;color:#6a54d6;font-size:10px}.tags-empty{font-size:10px;color:#aaa4b1}
.wide{height:38px;padding:0 10px;border-radius:11px;margin-top:9px;font-size:12px}.purple{background:#6f55e7}.danger-soft{background:#fee6e4;color:#5e4746}.detail-soft{background:#f0edff;color:#6651d2}
.profile-empty{font-size:12px;padding-top:70px}
/* Dashboard */
.dashboard-page,.visitor-page{background:#fbf9fc;overflow:auto;padding:22px 25px 30px}.dashboard-head,.visitor-page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.dashboard-head h2,.visitor-page-head h2{font-size:17px;margin:0}.visitor-page-head p{font-size:11px;color:#9993a2;margin:4px 0 0}
.dashboard-cards{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px}.dashboard-cards article{min-height:142px;background:#fff;border:1px solid #eeeaf1;border-radius:20px;padding:20px;box-shadow:0 3px 10px rgba(43,34,59,.05);display:flex;flex-direction:column;align-items:flex-start;gap:12px}.dashboard-cards article:nth-child(n+5){min-height:132px}.dashboard-cards article>div{display:flex;flex-direction:column;gap:9px}.dashboard-cards article span:not(.dash-icon){font-size:13px;color:#595460}.dashboard-cards article b{font-size:17px}.dash-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;font-size:20px}.dash-icon.blue{background:#d9efff;color:#4197d2}.dash-icon.green{background:#dff3e2;color:#37a454}.dash-icon.orange{background:#fff0d4;color:#e69127}.dash-icon.purple{background:#e9e0ff;color:#7059df}.trend-card{background:#fff;border:1px solid #eeeaf1;border-radius:20px;margin-top:18px;min-height:260px;padding:22px}.trend-title{font-size:14px;font-weight:700}.trend-chart{height:190px;margin-top:14px}
/* Visitors */
.visitor-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.visitor-stats article{background:#fff;border:1px solid #eeeaf1;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:8px}.visitor-stats span{font-size:11px;color:#938d9e}.visitor-stats b{font-size:20px}.visitor-filters{display:flex;gap:8px;margin:18px 0 10px}.visitor-filter{border:0;background:#fff;border-radius:9px;padding:8px 14px;color:#77717f;cursor:pointer}.visitor-filter.active{background:#ece5ff;color:#6b54da}.visitor-table-wrap{background:#fff;border:1px solid #eeeaf1;border-radius:15px;overflow:hidden}.visitor-table{width:100%;border-collapse:collapse}.visitor-table th,.visitor-table td{padding:12px 14px;border-bottom:1px solid #f0edf2;text-align:left;font-size:11px}.visitor-table th{color:#8e8896;background:#fbfafc}.visitor-empty{padding:40px;text-align:center;color:#aaa4b1}
/* Modal parity */
.modal{background:rgba(34,30,39,.46);backdrop-filter:blur(1px)}.modal-card{border-radius:16px;box-shadow:0 16px 50px rgba(30,22,43,.22)}.modal-card h2{font-size:18px}.x{color:#7c7584}.btn.orange,.purple-mini{background:#6f55e7;color:#fff}.entry-card img{border-radius:10px}.entry-url{background:#f7f4fb}.modal-actions .btn{min-width:92px}
/* Media */
.chat-image{border-radius:10px;max-width:min(340px,58vw)}.chat-video{border-radius:10px}.voice-card{background:#e8e6eb}.msg.out .voice-card,.msg.out .file-card{background:#5f49d6;color:#fff}.file-card{background:#e8e6eb}
/* Scrollbars */
.messages,.sessions,.profile-panel{scrollbar-width:thin;scrollbar-color:#d5cfdb transparent}.messages::-webkit-scrollbar,.sessions::-webkit-scrollbar,.profile-panel::-webkit-scrollbar{width:7px}.messages::-webkit-scrollbar-thumb,.sessions::-webkit-scrollbar-thumb,.profile-panel::-webkit-scrollbar-thumb{background:#d7d1dd;border-radius:20px}
/* Responsive */
@media(max-width:1280px){.three-col{grid-template-columns:280px minmax(460px,1fr) 270px}.topbar{padding-left:24px}.dashboard-cards{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1080px){.three-col{grid-template-columns:280px 1fr}.profile-panel{display:none}.top-link-btn{display:none!important}.dashboard-cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){body{overflow:hidden}.rail{width:60px;flex-basis:60px}.rail-logo{width:40px;height:40px}.rail-avatar{width:36px;height:36px}.rail-btn{width:40px;height:38px}.topbar{height:64px;flex-basis:64px;padding:0 10px}.brand span{font-size:14px}.status-chip{display:none}.three-col{grid-template-columns:104px 1fr}.conversation-panel .session-list-head,.conversation-panel .tabs,.conversation-panel .search-wrap,.conversation-panel .reminder-control,.session-check,.sbody{display:none}.session{justify-content:center;padding:8px}.messages{padding:14px 9px}.msg-line{max-width:92%}.composer-area{padding:8px}.seat{display:none}.dashboard-page,.visitor-page{padding:14px}.dashboard-cards,.visitor-stats{grid-template-columns:1fr 1fr}}
.date-separator{display:flex;justify-content:center;align-items:center;margin:6px 0 18px}.date-separator span{font-size:10px;color:#9d97a6;background:#f0edf3;padding:4px 9px;border-radius:10px}


/* ===== Single QR WeChat Entry v2 ===== */
.wechat-entry-page{flex:1;min-height:0;overflow:auto;background:#fbf8ff;padding:24px 26px 34px}
.wechat-entry-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.wechat-entry-head h2{margin:0 0 5px;font-size:22px}.wechat-entry-head p{margin:0;color:var(--muted);font-size:13px}
.single-wechat-state{padding:7px 12px;border-radius:10px;background:#f2f1f5;color:#777;font-size:12px;font-weight:800;white-space:nowrap}
.single-wechat-state.online{background:#e9f9ef;color:#16964a}.single-wechat-state.offline{background:#fff1e9;color:#d46c28}
.wechat-entry-grid{display:grid;grid-template-columns:minmax(300px,360px) minmax(480px,1fr);gap:24px;align-items:start;max-width:1180px}
.single-qr-card,.single-bind-panel{background:#fff;border:1px solid #e8e4ed;border-radius:18px;box-shadow:0 4px 14px #2d21400a}
.single-qr-card{padding:22px;text-align:center}.single-qr-badge{display:inline-block;background:#eee9ff;color:#7156e8;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:800}
.single-qr-card h3{font-size:22px;margin:14px 0 3px}.single-qr-card>p{margin:0 0 16px;color:#9a95a1;font-size:12px}
.single-qr-box{width:300px;height:300px;max-width:100%;margin:0 auto 16px;border:1px solid #e5e1ea;border-radius:15px;background:#fff;display:grid;place-items:center;position:relative;overflow:hidden}
.single-qr-box img{width:280px;height:280px;max-width:94%;max-height:94%;object-fit:contain}.single-qr-box.loading img{display:none!important}
.single-qr-spinner{display:none;width:32px;height:32px;border:4px solid #eee9ff;border-top-color:#7156e8;border-radius:50%;animation:single-spin .8s linear infinite}.single-qr-box.loading .single-qr-spinner{display:block}
@keyframes single-spin{to{transform:rotate(360deg)}}
.single-qr-success{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#17a654}.single-qr-success b{width:84px;height:84px;border-radius:50%;background:#e9f9ef;display:grid;place-items:center;font-size:52px}.single-qr-success span{font-size:16px;font-weight:800}
.single-primary-btn,.single-secondary-btn{width:100%;border:0;border-radius:12px;padding:12px 14px;font:inherit;font-weight:800;cursor:pointer}.single-primary-btn{background:#7156e8;color:#fff}.single-secondary-btn{margin-top:9px;background:#fff;border:1px solid #ddd8e5;color:#54505b}
.single-bind-panel{padding:22px}.single-field{padding:2px 0 20px}.single-field+.single-field{border-top:1px solid #efecf2;padding-top:20px}.single-field-title{font-weight:800;margin-bottom:10px}.single-field-title small{font-weight:500;color:#9993a0;margin-left:5px}.single-count-badge{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:12px;background:#dceeff;color:#4b78c8;font-size:12px;margin-left:6px}
.single-link-row{display:grid;grid-template-columns:1fr auto;gap:9px}.single-link-box{min-width:0;border:1px solid #ddd8e5;background:#faf9fb;border-radius:10px;padding:10px 12px;color:#797482;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.single-status-line{display:flex;align-items:center;justify-content:space-between;gap:10px}.single-status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800}.single-status-pill.wait{background:#fff0dd;color:#ce7b13}.single-status-pill.scan{background:#e9f1ff;color:#4777cf}.single-status-pill.ok{background:#e7f8ed;color:#15974a}.single-status-pill.expired{background:#ffe8e8;color:#cc4c4c}.single-countdown{font-size:12px;color:#8d8795}.single-verify{display:flex;gap:8px;margin-top:12px}.single-verify input{flex:1;border:1px solid #dcd7e3;border-radius:10px;padding:9px 11px;font:inherit}
.single-binding-list{max-height:330px;overflow:auto}.single-binding-empty{padding:30px 10px;text-align:center;color:#9a95a1;font-size:13px}
.single-binding-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px 4px;border-bottom:1px solid #f0edf3}.single-binding-item:last-child{border-bottom:0}.single-bind-avatar{width:40px;height:40px;border-radius:50%;background:#1cc15a;color:#fff;display:grid;place-items:center;font-weight:800}.single-bind-info{min-width:0}.single-bind-info>div{display:flex;align-items:center;gap:6px}.single-bind-info b{font-size:13px}.single-bind-info small{display:block;color:#95909e;font-size:11px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.single-bind-dot{width:8px;height:8px;border-radius:50%;background:#c7c3cc}.single-bind-dot.online{background:#20b95a}.single-bind-side{text-align:right}.single-bind-side>span{display:block;font-size:11px;color:#8d8795;margin-bottom:6px}.single-unbind-btn{border:0;background:transparent;color:#e45757;cursor:pointer;font-weight:700}
@media(max-width:960px){.wechat-entry-grid{grid-template-columns:1fr}.single-qr-card{max-width:420px}.wechat-entry-page{padding:18px}.single-qr-box{width:280px;height:280px}}

/* ===== 2026-09-21 Workbench parity v3 ===== */
:root{
  --wb-bg:#fbf7ff;
  --wb-panel:#fff;
  --wb-rail:#7b7d8e;
  --wb-purple:#7158e8;
  --wb-purple-soft:#eee7ff;
  --wb-cyan:#12bdd2;
  --wb-green:#4acb75;
  --wb-line:#ece7f1;
  --wb-muted:#9993a2;
}
body{background:var(--wb-bg)}
.workspace{background:var(--wb-bg)}
.rail{width:80px;flex-basis:80px;background:var(--wb-rail);padding:18px 0 12px;gap:12px}
.rail-logo{width:52px;height:52px;border-radius:18px;background:#6651e7;box-shadow:0 8px 18px rgba(70,52,160,.18)}
.rail-avatar{width:44px;height:44px;border-radius:50%;background:#6557e6;color:#fff;font-weight:800;display:grid;place-items:center}
.rail-btn{width:48px;height:42px;border-radius:14px;background:#585a6a;display:grid;place-items:center}
.rail-btn svg{width:22px;height:22px;fill:currentColor}
.rail-btn.active{background:#6f56eb;box-shadow:0 6px 16px rgba(78,57,170,.22)}
.rail-online-dot{width:8px;height:8px;background:#24bd55;border-radius:50%;display:block;margin:8px 0 0}
.topbar{height:70px;flex-basis:70px;background:#fff;padding:0 28px;border-bottom:1px solid #f0edf4}
.brand{gap:10px}.brand b{font-size:18px}.brand span{font-size:11px;color:#b0aab5}
.top-actions{gap:10px}.ui-hidden-action{display:none!important}
.status-chip{border-radius:7px;padding:6px 11px;font-size:11px}.status-chip.on{background:#eaf8ef;color:#18a84b}.status-chip.off{background:#fff0f1;color:#db555b}
.top-link-btn{height:34px;border:0;border-radius:9px;padding:0 13px;font-size:12px;font-weight:800;background:#f1ecff;color:#6a52d8;cursor:pointer}.top-link-btn.primary{background:#7259e8;color:#fff}
.seat-avatar{width:34px;height:34px}.seat b{font-size:13px}.seat small{font-size:10px}
.three-col{grid-template-columns:300px minmax(520px,1fr) 285px;background:var(--wb-bg)}
.conversation-panel,.profile-panel{background:#fff}
.conversation-panel{border-right:1px solid var(--wb-line)}
.session-list-head{height:58px;padding:0 14px 0 15px}.panel-title{padding:0;font-size:16px}
.chat-ws-state{font-size:11px}.tabs{grid-template-columns:1fr 1fr;padding:0 12px 12px;gap:6px}.tab{padding:8px 0;border-radius:8px;font-size:12px}.tab.active{background:#e9ddff;color:#6f57de}
.search-wrap{padding:0 12px 12px}.search-wrap input{height:38px;border-radius:11px;padding:0 13px;font-size:12px;background:#fff}
.sessions{padding-bottom:10px}.session{margin:0 8px 4px;padding:11px 9px;border-radius:14px;gap:9px}.session:hover,.session.active{background:#e9e1fb}.session.active{box-shadow:inset 3px 0 0 #7258e7}
.avatar{width:40px;height:40px;font-size:14px;background:var(--wb-cyan)}
.srow b{font-size:13px}.srow span,.preview{font-size:11px}.preview{margin-top:4px}.session i{right:9px;bottom:9px;background:#c72f34;min-width:18px;height:18px;font-size:10px}
.chat-panel{background:#fbf7ff}.empty-state{background:#fbf7ff}
.chat-head{height:70px;flex-basis:70px;padding:0 16px;background:#fff;border-bottom:1px solid var(--wb-line)}
.chat-avatar{width:40px;height:40px;border-radius:0;background:var(--wb-cyan);font-size:16px}.chat-user b{font-size:14px}.subtle{font-size:10px;color:#aaa4b0}
.chat-head-actions{gap:5px}.sync-history-btn{border:0;background:#f6f2ff;color:#6d57d8}.pin-btn{font-size:16px;color:#dc3e74}
.messages{padding:18px 16px 22px;background:#fbf7ff}.msg{margin:12px 0}.msg-line{max-width:88%;gap:7px}.bubble{border-radius:15px;padding:9px 12px;background:#ececef;box-shadow:none;font-size:13px}.msg.out .bubble{background:#7157e7;color:#fff}.mini-avatar,.agent-tag{width:30px;height:30px;border-radius:5px;font-size:12px}.mini-avatar{background:var(--wb-cyan)}.agent-tag{background:#d7f9df;color:#169544}.msg time{font-size:10px;margin:4px 38px;color:#a29ca9}
.composer-area{padding:7px 14px 12px;background:#fff;border-top:1px solid var(--wb-line)}.composer-tools{gap:11px;padding:2px 2px 7px}.composer-tools button{font-size:17px;color:#6a6570}.composer{grid-template-columns:1fr 48px;gap:9px}.composer textarea{min-height:46px;max-height:120px;border-radius:22px;padding:12px 15px;font-size:12px;background:#fff}.send-btn{width:46px;height:46px;border-radius:13px;background:#775cea;font-size:21px;box-shadow:0 6px 16px rgba(93,70,195,.20)}
.profile-panel{border-left:1px solid var(--wb-line);background:#fff}.profile-tabs{padding:14px 12px 10px;gap:4px}.profile-tab{padding:9px 4px;font-size:12px}.profile-tab.active{background:#eee9ff;color:#7058e1}
.profile-body{padding:0 14px 18px}.profile-hero{padding:14px 0 18px}.profile-avatar{width:64px;height:64px;font-size:27px;background:var(--wb-cyan);border-radius:0}.profile-hero h3{font-size:15px}.profile-type{font-size:11px}.profile-list>div{grid-template-columns:94px 1fr;padding:11px 0;font-size:12px}.profile-list strong{font-size:11px}.wide{padding:10px;margin-top:10px;border-radius:10px;font-size:12px}.purple{background:#7057e5}.danger-soft{background:#ffe5df;color:#6b3838}
.chat-image{max-width:min(320px,55vw);max-height:360px}.chat-video{max-width:min(380px,62vw);max-height:360px}
@media(max-width:1250px){.three-col{grid-template-columns:280px minmax(460px,1fr) 260px}}
@media(max-width:1050px){.three-col{grid-template-columns:280px 1fr}.profile-panel{display:none}}


/* ===== 2026-09-21 Workbench parity v4: cleaner normal-system layout ===== */
/* Keep diagnostic/productivity logic in JS, but remove those controls from the primary chat surface. */
#sendAnomalyTab,#reminderControl,#messageSoundControl,#visitorDetailBtn,#disconnectBtn,#syncHistoryBtn,#entryBtn{display:none!important}

/* Top bar mirrors the reference workbench: status + seat + exit only. */
.topbar{height:68px;flex-basis:68px;padding:0 24px}
.brand b{font-size:15px;font-weight:700;color:#36313a}.brand span{display:none}
.top-actions{gap:10px}
.status-chip{font-size:11px;padding:5px 10px;border-radius:7px}
.seat{padding-left:4px}.seat-avatar{width:34px;height:34px}.seat b{font-size:13px}.seat small{font-size:10px}

/* Main three-column proportions closer to the reference. */
.three-col{grid-template-columns:330px minmax(560px,1fr) 300px;min-height:0;height:calc(100vh - 68px)}
.conversation-panel,.chat-panel,.profile-panel{min-height:0}
.session-list-head{height:58px;flex:0 0 58px;padding:0 15px}
.panel-title{font-size:16px}
.chat-ws-state{font-size:11px;color:#15984a}
.conversation-panel .tabs{grid-template-columns:1fr 1fr!important;padding:0 12px 11px}
.search-wrap{padding:0 12px 11px}
.search-wrap input{height:37px}
.sessions{min-height:0;flex:1;overflow:auto;padding:0 7px 10px}
.session{min-height:74px;padding:9px 9px;margin-bottom:3px;border-radius:13px}
.session .avatar{width:38px;height:38px;flex-basis:38px}
.srow b{max-width:185px}.preview{margin-top:3px}
.reply-reminder{margin-top:3px}

/* Chat header and scroll area. */
.chat{min-height:0;height:100%}
.chat-head{height:68px;flex:0 0 68px;padding:0 16px}
.chat-head-actions{min-width:32px;justify-content:flex-end}
.pin-btn{display:grid;place-items:center;width:32px;height:32px}
.messages{min-height:0;flex:1;overflow:auto;padding:20px 16px 16px}
.msg{margin:11px 0}.msg-line{max-width:82%}.bubble{font-size:13px;padding:9px 13px}
.msg time{font-size:10px;margin-top:3px}

/* Ensure the whole composer is always visible in a viewport; this fixes the input row falling below the fold. */
.composer-area{flex:0 0 auto;padding:8px 14px 10px}
.composer-tools{height:34px;padding:0 3px 5px;gap:10px}
.composer-tools button{width:25px;height:25px;font-size:16px;color:#69636f}
.composer-tools button svg{display:block}
#cameraRecordBtn{display:none!important}
.composer{grid-template-columns:minmax(0,1fr) 50px;gap:9px;align-items:center}
.composer textarea{height:43px;min-height:43px;max-height:100px;border-radius:20px;padding:10px 14px}
.send-btn{width:48px;height:43px;border-radius:13px;font-size:20px;background:#e5d8ff;color:#4027ae}

/* Reference-like right-side customer profile. */
.profile-panel{overflow:auto}
.profile-tabs{height:58px;padding:12px 12px 8px}
.profile-tab{height:38px}
.profile-body{padding:0 14px 16px}
.profile-hero{padding:12px 0 15px}
.profile-avatar{width:62px;height:62px;font-size:25px}
.customer-tags-box{padding:8px 1px}
.profile-list>div{min-height:34px;padding:7px 2px}
.wide{height:36px;margin-top:8px}

/* Make diagnostics less visually dominant while retaining them. */
.blocked-badge{font-size:9px;padding:1px 5px}
.session-tags{display:none}

@media(max-width:1320px){.three-col{grid-template-columns:300px minmax(500px,1fr) 280px}}
@media(max-width:1120px){.three-col{grid-template-columns:290px 1fr}.profile-panel{display:none}}
