/* AVORERXML — lightweight styles for legacy Safari */
* { box-sizing: border-box; }
html, body { width:100%; height:100%; margin:0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; background:#e9edf2; color:#202a35; overflow:hidden; -webkit-text-size-adjust:100%; }
button, input, textarea { font:inherit; }
button { cursor:pointer; -webkit-appearance:none; }
.hidden { display:none !important; }
.app { width:100%; height:100%; }
.login-screen { width:100%; height:100%; display:table; background:#e9edf2; }
.login-card { display:table-cell; vertical-align:middle; width:320px; max-width:90%; margin:auto; }
.login-card { background:#fff; padding:30px; border-radius:14px; box-shadow:0 8px 35px rgba(20,40,65,.12); }
.brand-mark, .empty-logo { width:54px; height:54px; line-height:54px; border-radius:16px; text-align:center; color:#fff; background:#2678d8; font-size:30px; font-weight:bold; margin:0 auto 15px; }
.login-card h1 { text-align:center; font-size:22px; margin:0 0 5px; letter-spacing:1px; }
.muted, .login-foot { color:#8a96a4; text-align:center; font-size:13px; }
.login-card label { display:block; font-size:13px; margin:18px 0 7px; color:#566272; }
.login-card input, .search-wrap input { width:100%; border:1px solid #dce2e9; border-radius:9px; padding:12px; outline:none; background:#f8fafc; color:#202a35; }
.login-card input:focus, .search-wrap input:focus, .composer textarea:focus { border-color:#2678d8; }
.primary-button { border:0; border-radius:9px; padding:12px 16px; background:#2678d8; color:white; font-weight:600; margin-top:22px; }
.primary-button:active, .send-button:active { opacity:.8; }
.full { width:100%; }
.error-text { color:#d64b4b; font-size:13px; min-height:18px; margin-top:10px; text-align:center; }
.login-foot { margin-top:12px; font-size:11px; }

.messenger { height:100%; width:100%; display:table; table-layout:fixed; background:#fff; }
.sidebar { display:table-cell; width:330px; min-width:260px; height:100%; vertical-align:top; border-right:1px solid #dfe5ec; background:#fff; }
.chat-panel { display:table-cell; height:100%; vertical-align:top; position:relative; background:#e9eff5; }
.side-header, .chat-header { height:62px; display:block; padding:10px 14px; background:#fff; border-bottom:1px solid #e5e9ef; }
.side-header:after, .chat-header:after { content:""; display:block; clear:both; }
.side-brand { display:inline-block; line-height:40px; font-weight:bold; letter-spacing:.6px; font-size:16px; }
.side-brand span { color:#2678d8; }
.icon-button { border:0; background:transparent; color:#718093; font-size:24px; width:38px; height:40px; border-radius:8px; float:left; }
#newChatButton, #chatMoreButton { float:right; }
.blue-icon { color:#2678d8; font-size:29px; }
.search-wrap { padding:10px 12px 6px; }
.search-wrap input { padding:9px 12px; border-radius:18px; background:#f0f3f7; border:1px solid transparent; }
.side-tabs { padding:0 12px 8px; border-bottom:1px solid #edf0f3; white-space:nowrap; }
.tab { border:0; background:transparent; color:#8995a3; padding:8px 12px; font-size:13px; border-bottom:2px solid transparent; }
.tab.active { color:#2678d8; border-bottom-color:#2678d8; }
.chat-list { overflow-y:auto; -webkit-overflow-scrolling:touch; height:calc(100% - 170px); }
.chat-item { padding:11px 13px; height:72px; border-bottom:1px solid #f0f2f5; display:block; overflow:hidden; cursor:pointer; }
.chat-item:active, .chat-item.selected { background:#edf5ff; }
.avatar { width:42px; height:42px; line-height:42px; border-radius:50%; text-align:center; background:#dcecff; color:#2678d8; font-weight:bold; float:left; margin-right:11px; }
.chat-item .avatar { width:46px; height:46px; line-height:46px; }
.chat-item-text { overflow:hidden; }
.chat-item-name { font-size:14px; font-weight:600; padding-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-item-preview { color:#8b96a3; font-size:12px; margin-top:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-footer { position:absolute; bottom:0; left:0; width:330px; max-width:100%; background:#fff; border-top:1px solid #edf0f3; padding:12px; color:#8b96a3; font-size:12px; }
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background:#c5ccd4; }
.status-dot.online { background:#36b779; }
.text-button { float:right; border:0; color:#2678d8; background:transparent; font-size:12px; padding:0; }
.chat-header { height:62px; }
.chat-header .avatar { margin-left:6px; }
.chat-heading { display:inline-block; padding:4px 0; max-width:65%; overflow:hidden; }
.chat-title { font-size:15px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-subtitle { color:#8b96a3; font-size:12px; margin-top:3px; }
.back-button { display:none; }
.empty-state { position:absolute; top:50%; left:50%; width:90%; max-width:360px; text-align:center; color:#7f8c9a; margin-left:-180px; margin-top:-95px; }
.empty-state .empty-logo { width:65px; height:65px; line-height:65px; opacity:.9; }
.empty-state h2 { color:#445263; font-size:18px; font-weight:500; }
.empty-state p { font-size:13px; }
.message-area { position:absolute; top:62px; bottom:66px; left:0; right:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:14px 5%; }
.messages { max-width:850px; margin:0 auto; }
.message { clear:both; max-width:78%; margin:5px 0; padding:9px 12px 7px; background:#fff; border-radius:12px 12px 12px 3px; box-shadow:0 1px 1px rgba(0,0,0,.04); word-wrap:break-word; overflow-wrap:break-word; font-size:14px; line-height:1.4; }
.message.mine { float:right; background:#d9edff; border-radius:12px 12px 3px 12px; }
.message-author { color:#2678d8; font-size:11px; font-weight:bold; margin-bottom:3px; }
.message-time { color:#99a4b0; font-size:10px; text-align:right; margin-top:3px; }
.load-older { display:block; margin:0 auto 12px; border:0; background:#fff; color:#2678d8; border-radius:15px; padding:7px 14px; font-size:12px; }
.composer { position:absolute; bottom:0; left:0; right:0; min-height:66px; padding:10px 14px; background:#fff; border-top:1px solid #e0e6ed; }
.composer textarea { display:block; width:calc(100% - 52px); height:42px; max-height:100px; resize:none; border:1px solid #e0e5eb; border-radius:20px; padding:11px 14px; outline:none; background:#f7f9fb; font-size:14px; float:left; }
.send-button { float:right; width:42px; height:42px; border:0; border-radius:50%; background:#2678d8; color:#fff; font-size:19px; }
.modal-layer { position:fixed; z-index:20; left:0; top:0; right:0; bottom:0; background:rgba(15,28,44,.45); text-align:center; padding:20px; }
.modal-layer:before { content:""; display:inline-block; height:100%; vertical-align:middle; }
.modal-card { display:inline-block; vertical-align:middle; position:relative; text-align:left; width:100%; max-width:380px; background:#fff; border-radius:13px; padding:24px; box-shadow:0 10px 35px rgba(0,0,0,.2); }
.modal-close { position:absolute; right:12px; top:8px; border:0; background:transparent; font-size:25px; color:#8b96a3; }
.modal-card h3 { margin:0 25px 16px 0; font-size:18px; }
.modal-card label { display:block; font-size:13px; color:#687687; margin:12px 0 6px; }
.modal-card input, .modal-card select { width:100%; border:1px solid #dce2e9; border-radius:8px; padding:11px; background:#f8fafc; color:#25313e; }
.modal-card .primary-button { margin-top:16px; }
.modal-action { display:block; width:100%; text-align:left; border:0; border-bottom:1px solid #edf0f3; background:#fff; padding:13px 0; color:#344252; }
.member-line { padding:8px 0; border-bottom:1px solid #edf0f3; font-size:14px; }
body.dark { background:#17212b; color:#e7edf3; }
body.dark .login-screen { background:#17212b; }
body.dark .login-card, body.dark .sidebar, body.dark .side-header, body.dark .chat-header, body.dark .side-footer, body.dark .composer, body.dark .modal-card { background:#202c38; color:#e7edf3; }
body.dark .login-card input, body.dark .search-wrap input, body.dark .composer textarea, body.dark .modal-card input { background:#17212b; border-color:#344454; color:#e7edf3; }
body.dark .messenger { background:#202c38; }
body.dark .chat-panel { background:#17212b; }
body.dark .message { background:#263747; color:#e7edf3; }
body.dark .message.mine { background:#244b68; }
body.dark .chat-item { border-color:#293744; }
body.dark .chat-item:active, body.dark .chat-item.selected { background:#263d51; }
body.dark .empty-state h2 { color:#d8e2eb; }
body.dark .side-footer, body.dark .chat-header, body.dark .side-header, body.dark .composer { border-color:#344454; }
body.dark .modal-action { background:#202c38; color:#e7edf3; border-color:#344454; }
body.dark .tab { color:#9cabb9; }
body.dark .tab.active { color:#66adff; border-color:#66adff; }

@media (max-width: 700px) {
  .messenger { display:block; position:relative; }
  .sidebar { display:block; width:100%; height:100%; border:0; }
  .chat-panel { display:none; position:absolute; left:0; top:0; width:100%; height:100%; }
  .messenger.chat-open .sidebar { display:none; }
  .messenger.chat-open .chat-panel { display:block; }
  .back-button { display:block; }
  .side-footer { width:100%; }
  .message-area { padding:12px 3%; }
  .message { max-width:88%; }
}
@media (min-width:701px) and (max-width:900px) {
  .sidebar { width:285px; min-width:250px; }
  .side-footer { width:285px; }
}
@media (max-height:420px) {
  .login-card { padding:18px; }
  .login-card label { margin-top:10px; }
  .primary-button { margin-top:12px; }
}
