*{box-sizing:border-box;margin:0;padding:0}
:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#17202a;background:#eef1f5}
body{min-height:100vh;background:#eef1f5}
button,input{font:inherit}
button{border:0;background:none;cursor:pointer}
.app{width:100%;height:100vh;display:flex;overflow:hidden;background:#fff}
.sidebar{width:360px;min-width:300px;border-right:1px solid #e5e7eb;display:flex;flex-direction:column;background:#fff}
.profile{height:74px;display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #eee}
.profile strong{display:block;font-size:15px}.profile small{color:#16a34a;font-size:12px}
.profile .icon-btn{margin-left:auto}
.avatar{width:48px;height:48px;min-width:48px;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#2563eb;font-weight:700}
.avatar.me{background:#e0e7ff;color:#4338ca}.avatar.group{font-size:12px;background:#dcfce7;color:#15803d}
.icon-btn,.tool-btn{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#667085;font-size:22px}
.icon-btn:hover,.tool-btn:hover{background:#f2f4f7}
.search{margin:12px 14px;display:flex;align-items:center;gap:8px;background:#f3f5f7;border-radius:12px;padding:0 12px;color:#667085}
.search input{height:42px;border:0;outline:0;background:transparent;width:100%;font-size:14px}
.chat-list{overflow:auto;padding-bottom:10px}.chat-item{width:100%;display:flex;gap:12px;text-align:left;padding:12px 16px}
.chat-item:hover{background:#f7f8fa}.chat-item.active{background:#eef4ff}
.chat-info{min-width:0;flex:1}.chat-info>div{display:flex;justify-content:space-between;gap:8px}
.chat-info strong{font-size:14px}.chat-info time{font-size:11px;color:#98a2b3}.chat-info div+div{margin-top:5px;color:#667085;font-size:13px}
.chat-info span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:#2563eb;color:white;border-radius:10px;min-width:20px;height:20px;text-align:center;font-size:11px;padding:3px 5px}
.conversation{flex:1;min-width:0;display:flex;flex-direction:column;background:#f8fafc}
.chat-header{height:74px;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;gap:12px;padding:10px 20px}
.contact{flex:1}.contact strong{display:block;font-size:15px}.contact small{font-size:12px;color:#16a34a}
.header-actions{display:flex;gap:2px}.mobile-back{display:none;font-size:30px;color:#667085}
.messages{flex:1;overflow:auto;padding:25px 7%;background:radial-gradient(circle at 20% 20%,#fff 0,#f8fafc 42%,#f1f5f9 100%)}
.date-divider{text-align:center;margin:4px 0 22px}.date-divider span{background:#e8edf3;color:#667085;border-radius:10px;padding:5px 12px;font-size:11px}
.message{display:flex;margin:9px 0;max-width:75%}.message.sent{margin-left:auto;justify-content:flex-end}.bubble{position:relative;padding:10px 12px 7px;border-radius:14px;background:#fff;box-shadow:0 1px 2px #0000000d;font-size:14px;line-height:1.4}
.received .bubble{border-top-left-radius:4px}.sent .bubble{background:#dbeafe;border-top-right-radius:4px}
.bubble time{font-size:10px;color:#98a2b3;margin-left:10px;white-space:nowrap}.message-meta{font-size:10px;color:#98a2b3;align-self:flex-end;margin:0 4px 2px}.checks{color:#2563eb;margin-left:3px}
.typing{height:24px;padding-left:7%;font-size:11px;color:#667085;font-style:italic;visibility:hidden}
.typing.show{visibility:visible}
.composer{min-height:68px;background:#fff;border-top:1px solid #e5e7eb;padding:12px 20px;display:flex;align-items:center;gap:7px}
.composer input{flex:1;height:44px;border:1px solid #e1e5ea;border-radius:22px;padding:0 17px;outline:0;background:#f8fafc;font-size:14px}
.composer input:focus{border-color:#93c5fd;background:#fff}
.send-btn{width:44px;height:44px;border-radius:50%;background:#2563eb;color:#fff;font-size:18px;display:grid;place-items:center}.send-btn:hover{background:#1d4ed8}

@media(max-width:760px){
 .sidebar{width:100%;min-width:0}.conversation{display:none}.app.chat-open .sidebar{display:none}.app.chat-open .conversation{display:flex}
 .chat-header{padding:10px 12px}.mobile-back{display:block}
 .messages{padding:20px 14px}.typing{padding-left:14px}.composer{padding:10px}
 .message{max-width:88%}
}
