:root{--bg: #0e1621;--bg-sidebar: #17212b;--bg-chat: #0e1621;--bg-input: #242f3d;--bg-bubble-me: #2b5278;--bg-bubble-them: #182533;--text: #f5f5f5;--text-secondary: #8b9bab;--accent: #6ab2f2;--accent-hover: #5a9ed4;--border: #1e2c3a;--online: #4dcd5e;--danger: #e53935}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}.app{display:flex;height:100vh;overflow:hidden}@keyframes bubbleIn{0%{opacity:0;transform:translateY(16px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes bubbleInMe{0%{opacity:0;transform:translateY(16px) scale(.92) translate(8px)}to{opacity:1;transform:translateY(0) scale(1) translate(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translate(-24px)}to{opacity:1;transform:translate(0)}}@keyframes slideInRight{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes scaleIn{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes dotBounce{0%,80%,to{transform:translateY(0)}40%{transform:translateY(-6px)}}@keyframes sendFly{0%{opacity:0;transform:translateY(20px) scale(.8)}50%{transform:translateY(-4px) scale(1.04)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes ripple{0%{transform:scale(0);opacity:.4}to{transform:scale(4);opacity:0}}@keyframes checkIn{0%{opacity:0;transform:scale(.5) rotate(-20deg)}to{opacity:1;transform:scale(1) rotate(0)}}@keyframes headerSlide{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes shake{0%,to{transform:translate(0)}20%{transform:translate(-3px)}40%{transform:translate(3px)}60%{transform:translate(-2px)}80%{transform:translate(2px)}}@keyframes emptyFloat{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.sidebar{width:360px;min-width:360px;background:var(--bg-sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100%;transition:transform .3s cubic-bezier(.4,0,.2,1)}.sidebar__header{padding:12px 16px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;height:56px;animation:headerSlide .3s ease}.sidebar__brand{display:flex;align-items:center;gap:10px;color:var(--accent)}.sidebar__title{font-size:18px;font-weight:700;letter-spacing:-.02em}.sidebar__search{padding:8px 12px;animation:fadeIn .4s ease .1s both}.search-input{width:100%;background:var(--bg-input);border:none;border-radius:20px;padding:8px 16px;color:var(--text);font-size:14px;outline:none;transition:background .2s,box-shadow .2s}.search-input::placeholder{color:var(--text-secondary)}.search-input:focus{background:#2c3a4a;box-shadow:0 0 0 2px #6ab2f233}.sidebar__list{flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--bg-input) transparent}.empty-list{text-align:center;color:var(--text-secondary);padding:2rem 1rem;font-size:14px;animation:fadeIn .4s ease}.chat-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;border:none;background:transparent;cursor:pointer;text-align:left;color:var(--text);transition:background .15s,transform .1s;border-bottom:1px solid var(--border);position:relative;overflow:hidden;animation:slideInLeft .3s ease both}.chat-item:nth-child(1){animation-delay:.02s}.chat-item:nth-child(2){animation-delay:.04s}.chat-item:nth-child(3){animation-delay:.06s}.chat-item:nth-child(4){animation-delay:.08s}.chat-item:nth-child(5){animation-delay:.1s}.chat-item:nth-child(6){animation-delay:.12s}.chat-item:nth-child(7){animation-delay:.14s}.chat-item:nth-child(8){animation-delay:.16s}.chat-item:active{transform:scale(.98)}.chat-item:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle,rgba(255,255,255,.12) 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:scale(0);opacity:0;transition:transform .4s,opacity .6s;pointer-events:none}.chat-item:active:after{transform:scale(4);opacity:0;transition:0s}.chat-item:hover{background:#ffffff0a}.chat-item--active{background:var(--accent)!important;color:#fff;animation:none}.chat-item--active .chat-item__time,.chat-item--active .chat-item__preview{color:#fffc}.chat-item__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.chat-item__row{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-item__name{font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item__time{font-size:12px;color:var(--text-secondary);white-space:nowrap}.chat-item__preview{font-size:13px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.badge{background:var(--accent);color:#fff;font-size:11px;font-weight:700;min-width:20px;height:20px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 6px;animation:scaleIn .3s cubic-bezier(.34,1.56,.64,1)}.chat-item--active .badge{background:#ffffff4d}.ticket-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:10px;white-space:nowrap;animation:scaleIn .3s cubic-bezier(.34,1.56,.64,1)}.chat-item--active .ticket-badge{color:#ffffffe6!important;background:#fff3!important}.avatar{width:48px;height:48px;min-width:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px;color:#fff;position:relative;transition:transform .2s}.chat-item:hover .avatar{transform:scale(1.05)}.online-dot{position:absolute;bottom:1px;right:1px;width:12px;height:12px;background:var(--online);border:2px solid var(--bg-sidebar);border-radius:50%;animation:pulse 2s ease-in-out infinite}.chat-view{flex:1;display:flex;flex-direction:column;background:var(--bg-chat);height:100%;animation:fadeIn .25s ease}.chat-header{display:flex;align-items:center;gap:12px;padding:10px 16px;background:var(--bg-sidebar);border-bottom:1px solid var(--border);height:56px;animation:headerSlide .3s ease}.back-btn{display:none;background:none;border:none;color:var(--accent);cursor:pointer;padding:4px;border-radius:50%;transition:background .2s,transform .15s}.back-btn:active{transform:scale(.85)}.chat-header__info{flex:1;animation:slideInRight .3s ease}.chat-header__name{font-size:15px;font-weight:600;margin:0}.chat-header__status{font-size:13px;color:var(--text-secondary);transition:color .3s}.chat-header__status--online{color:var(--online)}.messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:4px;scrollbar-width:thin;scrollbar-color:var(--bg-input) transparent}.bubble-row{display:flex;justify-content:flex-start;animation:bubbleIn .35s cubic-bezier(.34,1.2,.64,1) both}.bubble-row--me{justify-content:flex-end;animation:bubbleInMe .35s cubic-bezier(.34,1.2,.64,1) both}.bubble-row--new{animation:sendFly .4s cubic-bezier(.34,1.2,.64,1) both}.bubble{max-width:65%;padding:8px 12px;border-radius:12px 12px 12px 4px;background:var(--bg-bubble-them);position:relative;word-wrap:break-word;transition:transform .15s}.bubble:hover{transform:scale(1.01)}.bubble--them:before{content:"";position:absolute;bottom:0;left:-6px;width:12px;height:12px;background:var(--bg-bubble-them);clip-path:polygon(100% 0,100% 100%,0 100%)}.bubble--me{background:var(--bg-bubble-me);border-radius:12px 12px 4px}.bubble--me:before{content:"";position:absolute;bottom:0;right:-6px;width:12px;height:12px;background:var(--bg-bubble-me);clip-path:polygon(0 0,100% 100%,0 100%)}.bubble__text{margin:0;font-size:14px;line-height:1.45}.bubble__meta{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:4px}.bubble__time{font-size:11px;color:#ffffff73}.bubble__checks{display:inline-flex;color:#ffffff73;animation:checkIn .3s ease both}.bubble__checks--read{color:var(--accent)}.checks{display:inline-flex;color:#ffffff73;animation:checkIn .3s ease both}.checks--read{color:var(--accent)}.bubble__edited{font-size:10px;color:#ffffff59;font-style:italic}.typing-indicator{display:flex;justify-content:flex-start;animation:bubbleIn .3s ease both}.typing-bubble{background:var(--bg-bubble-them);border-radius:12px 12px 12px 0;padding:12px 16px;display:flex;align-items:center;gap:4px}.typing-dot{width:7px;height:7px;background:var(--text-secondary);border-radius:50%;animation:dotBounce 1.4s ease-in-out infinite}.typing-dot:nth-child(2){animation-delay:.16s}.typing-dot:nth-child(3){animation-delay:.32s}.input-bar{display:flex;align-items:center;gap:8px;padding:10px 16px;background:var(--bg-sidebar);border-top:1px solid var(--border);animation:slideInRight .3s ease .1s both}.msg-input{flex:1;background:var(--bg-input);border:none;border-radius:20px;padding:10px 16px;color:var(--text);font-size:14px;outline:none;transition:background .2s,box-shadow .2s,transform .15s}.msg-input::placeholder{color:var(--text-secondary)}.msg-input:focus{background:#2c3a4a;box-shadow:0 0 0 2px #6ab2f233}.send-btn{width:40px;height:40px;border:none;border-radius:50%;background:var(--accent);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s,opacity .2s,box-shadow .2s}.send-btn:hover:not(:disabled){background:var(--accent-hover);transform:scale(1.08);box-shadow:0 4px 16px #6ab2f24d}.send-btn:active:not(:disabled){transform:scale(.9)}.send-btn:disabled{opacity:.35;cursor:default;transform:scale(.9)}.file-input-hidden{display:none}.upload-btn{width:40px;height:40px;border:none;border-radius:50%;background:var(--bg-input);color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .15s,color .2s;flex-shrink:0}.upload-btn:hover{background:#2c3a4a;color:var(--accent);transform:scale(1.08)}.upload-btn:active{transform:scale(.9)}.send-btn--pulse{animation:sendPulse .4s ease}@keyframes sendPulse{0%{transform:scale(1)}30%{transform:scale(.85)}60%{transform:scale(1.15);box-shadow:0 4px 20px #6ab2f280}to{transform:scale(1)}}.empty-chat{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-secondary);animation:fadeIn .5s ease}.empty-chat h2{font-size:24px;color:var(--text);animation:slideInRight .4s ease .2s both}.empty-chat p{font-size:14px;animation:slideInRight .4s ease .3s both}.empty-chat svg{opacity:.3;animation:emptyFloat 3s ease-in-out infinite}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-input);border-radius:3px}.shake{animation:shake .4s ease}@media(max-width:768px){.sidebar{position:absolute;top:0;left:0;width:100%;min-width:100%;z-index:10;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.sidebar--show{transform:translate(0)}.chat-view{width:100%}.back-btn{display:flex}.bubble{max-width:85%}}@media(max-width:480px){.sidebar__header{padding:10px 12px}.chat-item{padding:8px 12px}.messages{padding:12px}.input-bar{padding:8px 12px}}
