/* Working inbox: a single 40px summary line; keep all operator actions. */
.inbox-page main{box-shadow:0 5px 18px #173f3210}
.inbox-page .inbox-heading{background:radial-gradient(ellipse at top right,#d8eee76b,transparent 75%)}
.inbox-page .conversation{transition:background .15s,border-color .15s;box-shadow:inset 0 1px 0 #ffffff90}
.inbox-page .conversation:hover{background:#f0f8f4}
.inbox-page .conversation.active{background:linear-gradient(120deg,#e4f4ec,#f0faf5)!important;box-shadow:inset 3px 0 0 #249b79,0 2px 6px #184e3310}
.inbox-page #messages p{box-shadow:0 2px 6px #173f320b!important}
.inbox-page #reply-form{box-shadow:0 3px 12px #173f320b;border-radius:12px}
.inbox-page #send{background:linear-gradient(135deg,#218772,#176859);box-shadow:0 2px 5px #17685924}
@media(prefers-reduced-motion:reduce){.inbox-page .conversation{transition:none}}
.inbox-page .inbox-heading .section-label{font-size:9px;letter-spacing:1.4px;color:#668478;margin-bottom:8px}
body.inbox-page .inbox-heading h1.inbox-channel-heading{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:13px!important;line-height:24px;letter-spacing:0}
.inbox-channel-heading .heading-channel{display:inline-flex;align-items:center;justify-content:center;padding:3px 12px;border-radius:999px;color:#fff;line-height:20px;font-size:11px;font-weight:700;letter-spacing:.6px;box-shadow:0 2px 5px #204e3410,inset 0 1px 0 #ffffff30}
.inbox-channel-heading .heading-telegram{background:linear-gradient(135deg,#299ddf,#0878b8);border:1px solid #167eb7}
.inbox-channel-heading .heading-web{background:linear-gradient(135deg,#16a368,#087a47);border:1px solid #0a8050}
.inbox-channel-heading .heading-plus{font-size:16px;font-weight:400;color:#729486}
.inbox-page .inbox-heading #connection{display:inline-block;background:#edf6f1;border:1px solid #dcebe2;border-radius:6px;color:#42725f;padding:3px 7px;font-size:11px;line-height:1.5}
.inbox-page .channel-tag.channel-badge-group{display:inline-flex;align-items:center;gap:6px;background:transparent!important;padding:0;border:0;margin-right:4px;max-width:100%;min-width:0;vertical-align:middle}
.inbox-page .channel-pill{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:3px 10px;border-radius:999px;font-size:10px;line-height:15px;font-weight:700;letter-spacing:.35px;color:#fff;background:#168954;box-shadow:inset 0 1px 0 #ffffff35;white-space:nowrap}
.inbox-page .telegram .channel-pill{background:linear-gradient(135deg,#2699df,#0877b6);border:1px solid #147db7;box-shadow:0 2px 5px #1c8bce20,inset 0 1px 0 #ffffff40}
.inbox-page .web .channel-pill{background:linear-gradient(135deg,#17a66a,#087a47);border:1px solid #0e8552}
.inbox-page .line .channel-pill{background:#087e37;border:1px solid #067432}
.inbox-page .channel-account-name{font-size:11px;line-height:1.5;color:#507565;max-width:145px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox-page .thread-header .channel-account-name{max-width:210px;color:#416b5c}
.inbox-page{background:#eff6f3;color:#163f39}
.inbox-page .side-rail{background:#123d32}.side-rail a[aria-current]{background:#246452}
.inbox-page .topbar{height:40px;min-height:40px;padding:0 12px;background:#edf6f2;color:#164b40;border-bottom:1px solid #d5e6de;gap:12px;flex-wrap:nowrap}
.inbox-page .workspace-title{min-width:0;flex:1;display:flex;align-items:center;gap:18px;font-size:13px;letter-spacing:0;overflow-x:auto;scrollbar-width:none}
.inbox-page .workspace-title::-webkit-scrollbar{display:none}
#workspace-host{flex-shrink:0;color:#397265;font-weight:500}
#audience-summary{display:flex;align-items:center;gap:16px;white-space:nowrap;font-size:13px;line-height:20px;font-weight:400;flex-shrink:0}
#audience-summary .audience-item{display:inline-flex;align-items:center;gap:5px;margin:0;color:#214c42;font-weight:400}
#audience-summary svg{width:16px;height:16px;flex-shrink:0;color:#177b68}
#audience-summary #audience-telegram{border-left:1px solid #bed6cb;padding-left:16px}
#audience-summary #audience-telegram svg{color:#328aca}
#audience-summary b{font-size:13px;font-weight:650;color:#163f39}
#audience-summary #audience-web-today{color:#137047}
#audience-summary[data-state=unavailable]{opacity:.7}
.inbox-page .account{flex-wrap:nowrap;flex-shrink:0;gap:8px}
.inbox-page #admin-email{color:#4b7465;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox-page #logout{color:#235e4d;background:#fff;border:1px solid #d1e2d9;padding:4px 8px;border-radius:7px}
.inbox-page main{height:calc(100dvh - 48px);margin:0 8px 8px 0;grid-template-columns:300px minmax(0,1fr);border:1px solid #d9e8df;border-radius:10px}
.inbox-page main>.customer-panel{display:none}
.inbox-page #profile-toggle{display:block}
.inbox-page.profile-open main>.customer-panel{display:block;position:fixed;right:8px;top:40px;bottom:8px;width:280px;z-index:25;background:#fff;box-shadow:-10px 0 30px #183e2522;border-radius:10px}
.inbox-page #profile-close{display:block}
.inbox-page #transcript,.inbox-page #welcome{background-color:#f0f7f3;background-image:url('/assets/platalay-sea-pattern.svg');background-repeat:repeat;background-size:300px 240px}
.inbox-page #messages p{background:#fff;color:#173f36;border:1px solid #e0ece5;box-shadow:0 2px 4px #163f3905}
.inbox-page #messages .admin p{background:#e1f3e4;color:#183f32;border-color:#d4e9d8}
.inbox-page .thread-header{background:#fcfefd}
.inbox-page .thread-header h2,.inbox-page .thread-header #customer-info,.inbox-page .thread-header #thread-state,.inbox-page .thread-header #edit-name{color:#214e45}
.inbox-page .conversation.active{background:#e4f3eb;border-color:#abd4be}
.inbox-page #send{background:#176859;color:#fff;border-radius:9px}
.inbox-page #reply-form{background:#fff}
@media(max-width:1100px){.inbox-page #admin-email{display:none}.inbox-page main{grid-template-columns:270px minmax(0,1fr)}}
@media(max-width:800px){#workspace-host{display:none}.inbox-page main{grid-template-columns:235px minmax(0,1fr)}#audience-summary{gap:10px}#audience-summary #audience-telegram{padding-left:10px}}
@media(max-width:600px){.inbox-page main{height:auto}.inbox-page .workspace{min-height:500px}.inbox-page .topbar{gap:6px;padding:0 7px}.inbox-page.profile-open main>.customer-panel{width:min(280px,calc(100vw - 76px))}}

/* Override the older desktop's injected theme without a binary update. */
body.inbox-page.desk-web-mode .topbar{height:40px!important;min-height:40px!important;background:#edf6f2!important;padding:0 12px!important}
body.inbox-page.desk-web-mode main{grid-template-columns:300px minmax(0,1fr)!important}
body.inbox-page.desk-web-mode .workspace{padding:8px!important}
body.inbox-page.desk-web-mode .thread-header{background:#fcfefd!important;color:#214e45!important;padding:8px 16px!important}
body.inbox-page.desk-web-mode #customer-name{color:#214e45!important;font-size:17px!important}
body.inbox-page.desk-web-mode #customer-info,body.inbox-page.desk-web-mode #edit-name{color:#416b5c!important}
body.inbox-page.desk-web-mode .thread-header button{color:#214e45!important;background:#f2f8f4!important;border-color:#c4d8ce!important}
body.inbox-page.desk-web-mode .assignment-bar{padding:5px 16px!important;gap:5px!important}
body.inbox-page.desk-web-mode #transcript,body.inbox-page.desk-web-mode #welcome{background:#f0f7f3 url('/assets/platalay-sea-pattern.svg') repeat!important;background-size:300px 240px!important}
body.inbox-page.desk-web-mode #messages .admin>p{background:#e1f3e4!important;color:#183f32!important;border-color:#d4e9d8!important}
body.inbox-page.desk-web-mode #reply-form{margin:0 10px 8px!important;padding:8px 12px!important}
body.inbox-page.desk-web-mode .image-controls button{padding:5px 8px!important}
@media(max-width:1100px){body.inbox-page.desk-web-mode main{grid-template-columns:270px minmax(0,1fr)!important}}

.line-reply-notice:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 14px;font-size:12px;background:#fff8e9;border-top:1px solid #eadfca;color:#715623}
.line-reply-notice p{margin:0}.line-reply-notice a{color:#14695b;font-weight:600;white-space:nowrap}

/* Set 5: detail stays in the existing drawer, not above the conversation. */
#case-history{border-top:1px solid #dbe8e1;padding:12px 0;margin-top:14px;font-size:12px}#case-history summary{cursor:pointer;font-weight:650}#case-history button{margin-top:10px;font-size:12px}#history-items{padding-left:18px;line-height:1.8}#history-items li{margin:8px 0}#history-status{color:#617c70;line-height:1.7}
.inbox-page .assignment-bar{flex-wrap:wrap}.inbox-page .assignment-bar select{min-width:0;max-width:220px}.inbox-page .thread-actions{flex-wrap:wrap;justify-content:flex-end}.inbox-page #assignment-status:empty{display:none}
