:root{--app-bg: #eff2f5;--panel-bg: #ffffff;--panel-header-bg: #f0f2f5;--border: #e9edef;--accent: #00a884;--accent-dark: #008069;--unread-badge: #25d366;--chat-bg: #efeae2;--bubble-out: #d9fdd3;--bubble-in: #ffffff;--bubble-shadow: 0 1px .5px rgba(11, 20, 26, .13);--text-primary: #111b21;--text-secondary: #667781;--text-bubble-meta: rgba(17, 27, 33, .6);--tick-read: #53bdeb;--composer-bg: #f0f2f5;--input-bg: #ffffff;--hover: #f5f6f6;--active-chat: #f0f2f5;--icon: #54656f;--date-chip-bg: #ffffff;--system-chip-bg: #ffeecd;--sidebar-width: 30%;--sidebar-min: 340px;--sidebar-max: 480px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;font-family:var(--font);color:var(--text-primary);background:var(--app-bg);overscroll-behavior:none}button{font-family:inherit;border:none;background:none;cursor:pointer;color:inherit;padding:0}input,textarea{font-family:inherit;border:none;outline:none;background:transparent;color:var(--text-primary)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background:#0b141a33;border-radius:3px}::-webkit-scrollbar-track{background:transparent}.app-frame{display:flex;height:100%;max-width:1600px;margin:0 auto;box-shadow:0 6px 18px #0b141a0d}.sidebar{width:var(--sidebar-width);min-width:var(--sidebar-min);max-width:var(--sidebar-max);display:flex;flex-direction:column;background:var(--panel-bg);border-right:1px solid var(--border)}.chat-panel{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--chat-bg)}.icon-btn.mobile-back{display:none}@media(max-width:768px){.icon-btn.mobile-back{display:inline-flex}}@media(max-width:768px){.app-frame{display:block}.sidebar{width:100%;max-width:none;min-width:0;height:100%}.chat-panel{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20}.app-frame.mobile-list .chat-panel,.app-frame.mobile-thread .sidebar{display:none}}.panel-header{display:flex;align-items:center;gap:12px;height:59px;padding:10px 16px;background:var(--panel-header-bg);flex-shrink:0}.panel-header .grow{flex:1;min-width:0}.header-title{font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-subtitle{font-size:13px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-btn{width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--icon);flex-shrink:0}.icon-btn:hover{background:#0b141a14}.search-bar{padding:8px 12px;background:var(--panel-bg);border-bottom:1px solid var(--border)}.search-input{display:flex;align-items:center;gap:12px;background:var(--panel-header-bg);border-radius:8px;padding:0 12px;height:35px}.search-input input{flex:1;font-size:14px}.search-input svg{color:var(--icon);flex-shrink:0}.chat-list{flex:1;overflow-y:auto}.chat-row{display:flex;align-items:center;width:100%;text-align:left;padding:0 16px 0 13px;height:72px;gap:15px}.chat-row:hover{background:var(--hover)}.chat-row.active{background:var(--active-chat)}.chat-row-lines{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;border-top:1px solid var(--border);gap:3px}.chat-row:first-child .chat-row-lines{border-top:none}.chat-row-top{display:flex;align-items:baseline;gap:8px}.chat-row-title{flex:1;min-width:0;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-row-time{font-size:12px;color:var(--text-secondary);flex-shrink:0}.chat-row-time.unread{color:var(--unread-badge);font-weight:600}.chat-row-bottom{display:flex;align-items:center;gap:6px}.chat-row-preview{flex:1;min-width:0;font-size:14px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:3px}.unread-pill{background:var(--unread-badge);color:#fff;font-size:12px;font-weight:600;border-radius:999px;min-width:20px;height:20px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.avatar{border-radius:50%;background:#dfe5e7;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:500;flex-shrink:0;overflow:hidden;-webkit-user-select:none;user-select:none}.avatar img{width:100%;height:100%;object-fit:cover}.messages-scroll{flex:1;overflow-y:auto;padding:12px 6% 8px;background-color:var(--chat-bg);background-image:url("data:image/svg+xml,%3Csvg width='140' height='140' viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23111b21' fill-opacity='0.04'%3E%3Ccircle cx='18' cy='20' r='3'/%3E%3Cpath d='M60 10c4 0 7 3 7 7s-3 7-7 7-7-3-7-7 3-7 7-7zm0 2.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z'/%3E%3Cpath d='M104 24l6-6M104 18l6 6' stroke='%23111b21' stroke-opacity='0.04' stroke-width='2' stroke-linecap='round'/%3E%3Crect x='24' y='68' width='10' height='10' rx='2' transform='rotate(12 29 73)'/%3E%3Cpath d='M80 62c6 2 6 10 0 12' stroke='%23111b21' stroke-opacity='0.04' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='122' cy='78' r='4'/%3E%3Cpath d='M14 116c3-5 9-5 12 0' stroke='%23111b21' stroke-opacity='0.04' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3Cpath d='M64 108l8 8M72 108l-8 8' stroke='%23111b21' stroke-opacity='0.04' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='108' cy='120' r='3'/%3E%3C/g%3E%3C/svg%3E")}.date-chip-row,.system-chip-row{display:flex;justify-content:center;padding:10px 0 6px}.date-chip{background:var(--date-chip-bg);color:var(--text-secondary);font-size:12.5px;padding:5px 12px;border-radius:8px;box-shadow:var(--bubble-shadow);text-transform:uppercase}.msg-row{display:flex;padding:1px 0}.msg-row.out{justify-content:flex-end}.msg-row.first-of-group{margin-top:10px}.bubble{position:relative;max-width:min(65%,560px);border-radius:8px;padding:6px 7px 8px 9px;box-shadow:var(--bubble-shadow);font-size:14.2px;line-height:19px;word-wrap:break-word;white-space:pre-wrap}.msg-row.in .bubble{background:var(--bubble-in)}.msg-row.out .bubble{background:var(--bubble-out)}.msg-row.first-of-group .bubble:before{content:"";position:absolute;top:0;width:8px;height:13px}.msg-row.in.first-of-group .bubble{border-top-left-radius:0}.msg-row.in.first-of-group .bubble:before{left:-8px;background:radial-gradient(circle at bottom left,transparent 13px,var(--bubble-in) 0)}.msg-row.out.first-of-group .bubble{border-top-right-radius:0}.msg-row.out.first-of-group .bubble:before{right:-8px;background:radial-gradient(circle at bottom right,transparent 13px,var(--bubble-out) 0)}.bubble .sender-name{font-size:12.8px;font-weight:600;margin-bottom:2px;display:block}.bubble .meta{float:right;margin:6px 0 -4px 8px;display:inline-flex;align-items:center;gap:3px;font-size:11px;color:var(--text-bubble-meta);white-space:nowrap;-webkit-user-select:none;user-select:none}.bubble img.media,.bubble video.media{max-width:330px;width:100%;border-radius:6px;display:block;margin-bottom:4px;cursor:pointer}.bubble audio{width:260px;display:block}.doc-chip{display:flex;align-items:center;gap:10px;background:#0b141a0a;border-radius:6px;padding:10px 12px;margin-bottom:4px;color:inherit;text-decoration:none;max-width:300px}.doc-chip .doc-name{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transcript{font-size:13px;color:var(--text-secondary);font-style:italic;margin-top:4px}.media-unavailable{font-size:13px;color:var(--text-secondary);font-style:italic;padding:6px 2px}.composer{display:flex;align-items:flex-end;gap:8px;padding:8px 16px;background:var(--composer-bg);flex-shrink:0}.composer-input{flex:1;background:var(--input-bg);border-radius:8px;padding:9px 12px;min-height:20px;max-height:120px;overflow-y:auto;font-size:15px;line-height:20px;resize:none}.send-btn{color:var(--icon)}.send-btn.active{color:var(--accent)}.landing{height:100%;display:flex;flex-direction:column;align-items:center;background:var(--app-bg);overflow-y:auto}.landing:before{content:"";width:100%;height:220px;background:var(--accent);flex-shrink:0}.landing-card{background:var(--panel-bg);border-radius:3px;box-shadow:0 1px 1px #0b141a0f,0 2px 5px #0b141a33;width:min(1000px,calc(100% - 40px));margin:-160px auto 40px;padding:48px 64px}@media(max-width:640px){.landing-card{padding:28px 20px}}.landing-title{font-size:26px;font-weight:300;margin:0 0 28px}.qr-layout{display:flex;gap:40px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}.qr-steps{flex:1;min-width:260px;font-size:16px;line-height:28px;color:var(--text-primary)}.qr-steps ol{padding-left:20px;margin:0}.qr-steps li{margin-bottom:12px}.qr-box{width:264px;height:264px;display:flex;align-items:center;justify-content:center;position:relative}.qr-box canvas{width:264px!important;height:264px!important}.form-field{display:block;width:100%;border:1px solid var(--border);border-radius:6px;padding:12px 14px;font-size:15px;margin-bottom:14px;background:var(--panel-bg)}.form-field:focus{border-color:var(--accent)}.primary-btn{background:var(--accent);color:#fff;font-size:15px;font-weight:500;border-radius:24px;padding:11px 26px}.primary-btn:hover{background:var(--accent-dark)}.primary-btn:disabled{opacity:.5;cursor:default}.error-text{color:#ea0038;font-size:14px;margin:10px 0}.sender-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 10px;border-bottom:1px solid var(--border);font-size:15px}.sender-row:hover{background:var(--hover)}.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--panel-header-bg);border-bottom:6px solid var(--accent);color:var(--text-secondary);text-align:center;padding:20px}.empty-state h2{font-weight:300;font-size:32px;color:#41525d;margin:0}.conn-banner{display:flex;align-items:center;gap:12px;background:var(--system-chip-bg);padding:10px 16px;font-size:13.5px;cursor:pointer}.scroll-bottom-fab{position:absolute;right:20px;bottom:80px;width:42px;height:42px;border-radius:50%;background:var(--panel-bg);box-shadow:0 1px 3px #0b141a66;display:flex;align-items:center;justify-content:center;color:var(--icon);z-index:5}.spinner{width:28px;height:28px;border:3px solid rgba(0,168,132,.25);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
