/* Familiar light conversation theme; CRM views retain their existing layout. */
.app{color:#111b21;font-family:'Segoe UI',Helvetica,Arial,sans-serif}
.rail{background:#f0f2f5;border-right:1px solid #d9dfe3;padding-top:20px;gap:16px}
.rail-logo{color:#075e54}
.rail-logo span{color:#00a884}
.rail-button{color:#54656f;border-radius:50%}
.rail-button.active,.rail-button:hover{background:#d9dbdf;color:#075e54}
.rail-button svg{width:24px;height:24px}
.rail-button:focus-visible{outline:2px solid #075e54;outline-offset:3px}
.app:not(.funnel-mode):not(.reports-mode){grid-template-columns:64px 380px minmax(0,1fr)}
.app:not(.funnel-mode):not(.reports-mode).details-open{grid-template-columns:64px 340px minmax(0,1fr) 320px}
.inbox-panel{background:#fff;border-color:#d9dfe3}
.panel-head{height:92px;padding:20px 24px 12px;align-items:center}
.panel-head .eyebrow{font-size:10px;letter-spacing:.08em;color:#667781}
.panel-head .gold-dot{color:#00a884}
.panel-head h2{font-size:25px;font-weight:650;letter-spacing:-.03em;margin:5px 0 0;color:#111b21}
.count-pill{background:#e9edef;color:#54656f}
.search-wrap{height:36px;border:0;border-radius:8px;background:#f0f2f5;margin:4px 12px 12px;padding:0 16px;gap:24px;color:#54656f}
.search-wrap input{font-size:13px;color:#3b4a54}
.search-wrap input::placeholder{color:#667781}
.filter-row{padding:0 12px 12px;gap:8px;border:0}
.filter{font-size:13px;font-weight:400;background:#f0f2f5;color:#54656f;padding:7px 12px;border-radius:18px}
.filter.active{background:#d9fdd3;color:#008069}
.conversation-item{padding:14px 16px;gap:14px;min-height:92px;border-bottom:1px solid #f0f2f5}
.conversation-item.active{background:#f0f2f5;border-left:0;padding-left:16px}
.conversation-item:hover{background:#f5f6f6}
.conversation-item .avatar{width:49px;height:49px;font-size:16px;font-weight:500;background:#dfe5e7;color:#54656f}
.conversation-item:nth-child(4n+2) .avatar,.conversation-item:nth-child(4n+3) .avatar{background:#dfe5e7;color:#54656f}
.conversation-top strong{font-size:16px;font-weight:500;color:#111b21}
.conversation-time{font-size:12px;color:#667781}
.conversation-preview{margin:5px 0 6px}
.conversation-preview span{font-size:13px;color:#667781}
.conversation-meta{gap:5px}
.conversation-meta small{font-size:10px;color:#667781}
.conversation-meta .stage-tag{padding:2px 5px;font-size:10px;font-weight:500;background:#e9edef;color:#54656f}
.unread-count{background:#25d366;color:#111b21;font-size:12px;min-width:21px;height:21px}
.panel-foot{font-size:11px;color:#667781;background:#f0f2f5;border-color:#e9edef}
.chat-panel,.chat-content{background:#efeae2}
.chat-head{height:64px;background:#f0f2f5;border-color:#d9dfe3;padding:0 20px;gap:14px}
.chat-head .avatar{background:#dfe5e7;color:#54656f;width:40px;height:40px;font-weight:500}
.chat-title strong{font-size:16px;font-weight:500;color:#111b21}
.chat-title span{font-size:12px;color:#667781}
.chat-head .icon-button{color:#54656f;background:transparent}
.chat-head .icon-button svg{height:23px;width:23px}
.messages{padding:20px clamp(24px,5vw,80px);gap:6px;background-color:#efeae2;background-image:url('/chat-pattern.svg');background-size:360px 240px;scrollbar-color:#c3c5c5 transparent}
.message{position:relative;max-width:min(78%,560px);min-width:80px;padding:7px 9px 5px;border-radius:8px;line-height:1.45;box-shadow:0 1px 1px #0b141a21}
.message.in{background:#fff;border-top-left-radius:0}
.message.out{background:#d9fdd3;border-top-right-radius:0}
.message::before{content:'';position:absolute;top:0;width:8px;height:12px;clip-path:polygon(0 0,100% 0,100% 100%)}
.message.in::before{left:-7px;background:#fff}
.message.out::before{right:-7px;background:#d9fdd3;transform:scaleX(-1)}
.message-text{font-size:14px;color:#111b21}
.message-type{font-size:11px;font-weight:500;color:#54656f;margin-bottom:5px}
.message-footer,.message.out .message-footer{font-size:11px;color:#667781;gap:5px;margin-top:3px;line-height:1.2}
.message-footer span[title='read']{color:#53bdeb}
.day-divider{font-size:12px;font-weight:400;letter-spacing:0;text-transform:none;background:#ffffffeb;color:#54656f;border-radius:7px;padding:6px 12px;margin:8px auto 12px;box-shadow:0 1px 2px #0b141a18}
.message-image,.message video{max-width:min(320px,100%);max-height:360px;border-radius:6px;margin-bottom:4px}
.message audio{width:270px;max-width:100%;margin-bottom:4px}
.location-card{background:#c8e9c3;border-radius:5px;padding:12px;font-size:13px}
.location-card small{color:#075e54}
.composer{background:#f0f2f5;border:0;align-items:center;gap:12px;padding:10px 16px 4px}
.composer textarea{background:#fff;border:0;border-radius:8px;min-height:44px;max-height:120px;font-size:15px;padding:12px 16px;line-height:20px;color:#111b21}
.composer textarea:focus{outline:2px solid #00a884;outline-offset:-2px}
.composer textarea::placeholder{color:#667781}
.composer #attach-media{width:40px;height:40px;background:transparent;color:#54656f;border-radius:50%;display:grid;place-items:center}
.composer #attach-media:hover,.composer #attach-media[aria-expanded='true']{background:#d9dbdf;color:#075e54}
.composer #attach-media svg{width:26px;height:26px}
.composer #send-button{background:#008069;border-radius:50%;width:40px;height:40px;display:grid;place-items:center}
.composer #send-button:hover{background:#075e54}
.composer #send-button svg{width:21px;height:21px}
.composer-hint{background:#f0f2f5;color:#667781;font-size:10px;padding:2px 16px 7px;text-align:center}
.composer .attachment-menu button{color:#3b4a54}
.composer .attachment-menu button:hover,.composer .attachment-menu button:focus-visible{background:#f0f2f5;outline-color:#c4eac0}
.empty-chat{max-width:380px;color:#41525d}
.empty-chat .empty-icon{color:#008069}
.empty-chat h2{font-size:28px;font-weight:400;letter-spacing:-.025em}
.empty-chat p{font-size:14px;color:#667781}
@media(max-width:1150px){.app:not(.funnel-mode):not(.reports-mode),.app:not(.funnel-mode):not(.reports-mode).details-open{grid-template-columns:60px 320px minmax(0,1fr)}.details-panel{position:absolute;right:0;top:0;bottom:0;width:320px;z-index:20;box-shadow:-8px 0 24px #0b141a20}}
@media(max-width:900px){.app:not(.funnel-mode):not(.reports-mode),.app:not(.funnel-mode):not(.reports-mode).details-open{grid-template-columns:56px 300px minmax(0,1fr)}.messages{padding:16px 22px}.message{max-width:90%}}
@media(max-width:640px){.app:not(.funnel-mode):not(.reports-mode),.app:not(.funnel-mode):not(.reports-mode).details-open{display:block;min-height:0}.rail{border-right:0;border-top:1px solid #d9dfe3;padding:0 8px}.inbox-panel{height:calc(100dvh - 55px)}.chat-panel{inset:0 0 55px}.chat-head{height:60px;padding:0 12px;gap:10px}.chat-title strong{font-size:16px}.messages{padding:14px 16px}.message{max-width:88%}.message-text{font-size:14px}.composer{padding:8px 8px 4px;gap:6px}.composer textarea{font-size:14px;padding:12px;min-width:0}.composer-hint{font-size:9px;padding:0 8px 6px}.details-panel{inset:0 0 55px auto;width:min(100%,340px)}.message audio{width:240px}.message-image,.message video{max-width:100%}.attachment-menu{width:190px}.panel-head{height:84px;padding:16px 20px}}

.loss-button{margin-top:10px;color:#b42318}.loss-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.loss-filters label{font-size:12px;display:grid;gap:6px}.loss-filters select{width:100%;min-width:0;padding:9px;border:1px solid #dce5e6;border-radius:8px;background:white}.loss-list article{margin-top:14px;padding:14px;background:#f0f2f5;border-radius:10px;overflow-wrap:anywhere}.loss-list small{display:block;color:#667781;margin:8px 0}.loss-list p{font-size:13px}.loss-list .secondary{margin-top:8px}#loss-report{margin-top:24px}#loss-report>p{font-size:13px;color:#667781}@media(max-width:640px){.loss-filters{grid-template-columns:1fr}}

@media(max-width:640px){.rail .rail-logo{display:none}}

.filter-row{overflow-x:auto;flex-shrink:0}.filter-row .filter{flex-shrink:0;white-space:nowrap}
@media(max-width:640px){.filter-row{gap:6px;padding-left:12px;padding-right:12px}.filter-row .filter{padding:8px 10px}}
