*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:#f3f5f8;color:#172033}button,input,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:10px;padding:10px 14px;font-weight:600}.hidden{display:none!important}.muted{color:#788397}.small{font-size:12px}.primary{background:#315fe8;color:#fff}.primary:hover{background:#244dcc}.secondary{background:#edf1f8;color:#34415b}.secondary:hover{background:#e1e7f1}.full{width:100%}.error{color:#c03945;font-size:13px;min-height:18px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{background:#fff;width:min(100%,400px);padding:36px;border:1px solid #e7eaf0;border-radius:20px;box-shadow:0 18px 55px #25365b12}.brand-mark{width:48px;height:48px;display:grid;place-items:center;background:#eaf0ff;color:#315fe8;border-radius:14px;font-size:25px}.login-card h1{margin:20px 0 4px;font-size:25px}.login-card form{display:grid;gap:10px;margin-top:28px}.login-card label,dialog label{font-size:13px;font-weight:650;margin-top:8px}.login-card input,dialog input{width:100%;padding:12px;border:1px solid #dce2ec;border-radius:9px;outline:none}.login-card input:focus,dialog input:focus,textarea:focus{border-color:#6687ef;box-shadow:0 0 0 3px #315fe81a}.login-card button{margin-top:10px}.app-shell{height:100vh;display:grid;grid-template-columns:320px 1fr;overflow:hidden}.sidebar{background:#fff;border-right:1px solid #e4e8ef;display:flex;flex-direction:column;min-height:0}.side-header{padding:22px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0f5}.brand-name{font-weight:750;font-size:17px}.icon-btn{background:transparent;color:#657087;font-size:22px;padding:5px 10px}.side-actions{display:flex;gap:8px;padding:14px}.side-actions button{flex:1;font-size:12px;padding:10px 6px}.section-label{font-size:10px;font-weight:800;letter-spacing:1.1px;color:#9aa4b5;padding:12px 18px 8px}.conversation-list{overflow:auto;flex:1;padding:0 9px}.conversation-item{display:flex;align-items:center;gap:11px;padding:12px;border-radius:11px;cursor:pointer;margin:2px 0}.conversation-item:hover,.conversation-item.active{background:#eef3ff}.avatar{width:37px;height:37px;border-radius:50%;background:#e6ecfa;color:#3558b8;display:grid;place-items:center;font-weight:750;flex:none}.conv-copy{min-width:0;flex:1}.conv-title{font-size:14px;font-weight:700}.conv-preview{font-size:12px;color:#8a94a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.admin-panel{padding:8px 14px 18px;border-top:1px solid #edf0f5}.admin-panel .section-label{padding-left:4px}.chat-area{min-width:0;display:flex;flex-direction:column;background:#f8f9fc}.empty-state{margin:auto;text-align:center;padding:24px}.empty-icon{font-size:42px;color:#9aaddc}.empty-state h2{font-size:21px}.chat-view{height:100%;display:flex;flex-direction:column;min-height:0}.chat-header{background:#fff;padding:18px 26px;border-bottom:1px solid #e9edf3;display:flex;align-items:center;justify-content:space-between}.chat-header h2{font-size:17px;margin:0 0 4px}.online-label{font-size:11px;color:#29976b}.messages{flex:1;overflow:auto;padding:24px clamp(14px,5vw,70px);display:flex;flex-direction:column;gap:12px}.message{max-width:min(70%,620px);align-self:flex-start;background:#fff;padding:11px 14px;border-radius:4px 14px 14px 14px;box-shadow:0 2px 8px #1827470a;overflow-wrap:anywhere}.message.mine{align-self:flex-end;background:#315fe8;color:#fff;border-radius:14px 4px 14px 14px}.message-meta{font-size:10px;color:#929bad;margin-bottom:5px}.mine .message-meta{color:#dce5ff}.message-body{font-size:14px;white-space:pre-wrap;line-height:1.45}.composer{background:#fff;padding:16px 24px;display:flex;gap:12px;border-top:1px solid #e9edf3}.composer textarea{flex:1;resize:none;max-height:130px;border:1px solid #dce2ec;border-radius:12px;padding:12px;outline:none}.send-btn{align-self:flex-end}.online-dot{width:7px;height:7px;border-radius:50%;background:#29ad78;display:inline-block;margin-right:5px}dialog{border:0;border-radius:16px;padding:22px;width:min(92vw,440px);box-shadow:0 25px 80px #0c193b35;color:#172033;max-height:85vh}dialog::backdrop{background:#14213a66;backdrop-filter:blur(2px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.dialog-head h2{font-size:18px;margin:0}.choice-list{max-height:280px;overflow:auto}.choice-row{display:flex;align-items:center;justify-content:space-between;padding:11px 4px;border-bottom:1px solid #eff1f5;font-size:14px}.choice-row button{font-size:12px}.choice-row label{display:flex;align-items:center;gap:8px;font-weight:500;margin:0}.choice-row input{width:auto}.create-user-form{display:grid;gap:8px;padding-bottom:16px;margin-bottom:8px;border-bottom:1px solid #edf0f5}.create-user-form button{margin-top:8px}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#18243b;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}@media(max-width:700px){.app-shell{grid-template-columns:1fr;grid-template-rows:42vh 58vh}.sidebar{border-right:0;border-bottom:1px solid #e4e8ef}.side-header{padding:10px 16px}.side-actions{padding:8px 12px}.conversation-list{display:flex;overflow-x:auto;overflow-y:hidden;flex:none}.conversation-item{min-width:165px}.admin-panel{display:none}.chat-header{padding:12px 16px}.messages{padding:14px}.message{max-width:88%}.composer{padding:10px}.login-card{padding:26px}}
