*{margin:0;padding:0;box-sizing:border-box}body{font-family:Poppins,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background-color:#f7fafd;color:#0e314c;overflow:hidden}#root{width:100vw;height:100vh;display:flex;flex-direction:column}.navbar{background:linear-gradient(135deg,#0e314c,#163b5c);color:#fff;padding:0 24px;display:flex;align-items:center;justify-content:space-between;height:64px;box-shadow:0 4px 12px #0e314c26;flex-shrink:0}.navbar-brand{font-size:18px;font-weight:600;letter-spacing:.3px;font-family:Poppins,sans-serif}.navbar-tabs{display:flex;gap:0;flex:1;margin-left:40px}.navbar-tab{background:none;border:none;color:#ffffffb3;font-size:14px;font-weight:500;padding:20px;cursor:pointer;transition:all .3s ease;border-bottom:3px solid transparent;height:60px;display:flex;align-items:center}.navbar-tab:hover{color:#fff}.navbar-tab.active{color:#fff;border-bottom-color:#44ce6f}.navbar-right{display:flex;align-items:center;gap:15px}.device-count{font-size:13px;padding:4px 8px;background:#ffffff1a;border-radius:12px;min-width:100px;text-align:center}.btn-new-chat{background:linear-gradient(135deg,#23bdb8,#43e794);color:#fff;border:none;border-radius:20px;padding:8px 18px;font-size:13px;font-weight:500;font-family:Poppins,sans-serif;cursor:pointer;transition:all .3s;box-shadow:0 2px 8px #44ce6f4d}.btn-new-chat:hover{transform:translateY(-1px);box-shadow:0 4px 12px #44ce6f66}.main-content{flex:1;display:flex;overflow:hidden}.messages-page{display:flex;width:100%;height:100%}.messages-sidebar{width:380px;background:#fff;border-right:1px solid #ddd;display:flex;flex-direction:column;overflow:hidden}.sidebar-header{padding:15px;border-bottom:1px solid #eee;flex-shrink:0}.search-input{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:20px;font-size:13px;outline:none;transition:border-color .2s}.search-input:focus{border-color:#44ce6f;box-shadow:0 0 0 3px #44ce6f1a}.conversations-list{flex:1;overflow-y:auto;list-style:none}.conversation-item{padding:12px 15px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background-color .2s;display:flex;gap:12px;align-items:center;position:relative}.conversation-item:hover{background-color:#f5f5f5}.conversation-item.active{background-color:#ede7e1}.conversation-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#23bdb8,#43e794);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:18px;flex-shrink:0}.conversation-info{flex:1;min-width:0}.conversation-header{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.conversation-name{font-weight:500;font-size:13px;color:#000}.conversation-time{font-size:12px;color:#999}.conversation-preview{font-size:12px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread-badge{position:absolute;right:15px;top:50%;transform:translateY(-50%);background:linear-gradient(135deg,#23bdb8,#44ce6f);color:#fff;border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600}.chat-view{flex:1;display:flex;flex-direction:column;background:#e5ddd5}.chat-header{background:#fff;padding:12px 20px;border-bottom:1px solid #ddd;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.chat-header-info h3{font-size:15px;font-weight:500;margin-bottom:2px}.chat-header-info p{font-size:12px;color:#999}.chat-header-actions{display:flex;gap:10px}.btn-icon{background:none;border:none;cursor:pointer;padding:6px;color:#0e314c;font-size:18px;transition:color .2s}.btn-icon:hover{color:#23bdb8}.window-indicator{background:#fff3cd;border-bottom:1px solid #ffc107;padding:8px 20px;font-size:12px;text-align:center;color:#856404;flex-shrink:0}.window-indicator.open{background:#d4edda;border-bottom-color:#28a745;color:#155724}.messages-container{flex:1;overflow-y:auto;padding:15px 20px;display:flex;flex-direction:column;gap:8px}.message-group{display:flex;margin-bottom:4px}.message-group.outbound{justify-content:flex-end}.message-bubble{max-width:55%;padding:8px 12px;border-radius:18px;word-wrap:break-word;font-size:13px;line-height:1.4;display:flex;flex-direction:column;gap:4px}.message-bubble.inbound{background:#fff;color:#000}.message-bubble.outbound{background:#dcf8c6;color:#000}.message-media{max-width:100%;border-radius:12px;cursor:pointer;transition:opacity .2s}.message-media:hover{opacity:.9}.message-buttons{display:flex;flex-direction:column;gap:4px;margin-top:4px}.message-button{background:#0000001a;border:1px solid rgba(0,0,0,.2);padding:6px 10px;border-radius:6px;font-size:12px;cursor:pointer;transition:background .2s;text-align:left}.message-button:hover{background:#00000026}.message-status{font-size:11px;color:#999;display:inline-block;margin-left:4px}.message-status.delivered{color:#23bdb8}.message-status.read{color:#0084ff}.message-link{color:#0084ff;text-decoration:underline;cursor:pointer}.input-area{background:#fff;padding:12px 20px;border-top:1px solid #ddd;display:flex;gap:10px;align-items:flex-end;flex-shrink:0}.input-actions{display:flex;gap:8px}.btn-attach{background:none;border:none;cursor:pointer;padding:6px;color:#0e314c;font-size:22px;transition:color .2s}.btn-attach:hover{color:#23bdb8}.attach-menu{position:absolute;bottom:60px;left:20px;background:#fff;border-radius:12px;box-shadow:0 2px 12px #00000026;z-index:1000;min-width:200px}.attach-item{padding:12px 16px;cursor:pointer;transition:background .2s;border-bottom:1px solid #f0f0f0;font-size:13px;display:flex;align-items:center;gap:10px}.attach-item:last-child{border-bottom:none}.attach-item:hover{background:#f5f5f5}.message-input{flex:1;border:1px solid #ddd;border-radius:20px;padding:10px 16px;font-size:13px;font-family:inherit;resize:none;max-height:100px;outline:none;transition:border-color .2s}.message-input:focus{border-color:#44ce6f;box-shadow:0 0 0 3px #44ce6f1a}.btn-send{background:none;border:none;cursor:pointer;padding:6px;color:#0e314c;font-size:20px;transition:color .2s}.btn-send:hover{color:#23bdb8}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#999;gap:10px}.empty-state-icon{font-size:64px;opacity:.5}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000}.modal{background:#fff;border-radius:12px;padding:24px;max-width:500px;width:90%;max-height:90vh;overflow-y:auto;box-shadow:0 8px 32px #00000026}.modal-header{font-size:18px;font-weight:600;margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.modal-close{background:none;border:none;font-size:24px;cursor:pointer;color:#999;padding:0;width:24px;height:24px}.form-group{margin-bottom:16px}.form-label{display:block;font-size:12px;font-weight:600;margin-bottom:6px;color:#333;text-transform:uppercase;letter-spacing:.5px}.form-input,.form-select,.form-textarea{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:6px;font-size:13px;font-family:inherit;outline:none;transition:border-color .2s}.form-input:focus,.form-select:focus,.form-textarea:focus{border-color:#128c7e}.form-textarea{resize:vertical;min-height:80px}.form-hint{font-size:11px;color:#999;margin-top:4px}.btn-primary{background:#128c7e;color:#fff;border:none;padding:10px 20px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;width:100%}.btn-primary:hover{background:#075e54}.btn-secondary{background:#f0f0f0;color:#333;border:none;padding:10px 20px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:background .2s}.btn-secondary:hover{background:#e0e0e0}.toast-container{position:fixed;bottom:20px;right:20px;z-index:3000;display:flex;flex-direction:column;gap:10px}.toast{background:#333;color:#fff;padding:12px 16px;border-radius:6px;font-size:13px;box-shadow:0 4px 12px #00000026;animation:slideIn .3s ease}.toast.success{background:#28a745}.toast.error{background:#dc3545}.toast.info{background:#17a2b8}@keyframes slideIn{0%{transform:translate(400px);opacity:0}to{transform:translate(0);opacity:1}}.templates-page{display:flex;width:100%;height:100%;gap:0}.templates-form-section{width:55%;background:#fff;padding:20px;overflow-y:auto;border-right:1px solid #ddd}.templates-preview-section{width:45%;background:#f5f5f5;overflow-y:auto;padding:20px;display:flex;flex-direction:column}.phone-mockup{background:#000;border-radius:40px;border:12px solid #000;width:280px;height:500px;display:flex;flex-direction:column;position:relative;box-shadow:0 8px 32px #0000004d;margin:0 auto 20px;overflow:hidden}.phone-notch{background:#000;height:25px;border-radius:0 0 20px 20px;z-index:10}.phone-screen{flex:1;background:#e5ddd5;display:flex;flex-direction:column;overflow:hidden}.phone-header{background:#075e54;color:#fff;padding:8px 12px;font-size:11px;display:flex;justify-content:space-between;align-items:center}.phone-messages{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:6px}.phone-message{max-width:85%;padding:8px 10px;border-radius:12px;font-size:11px;line-height:1.3;word-wrap:break-word}.phone-message.inbound{background:#fff;align-self:flex-start}.phone-message.outbound{background:#dcf8c6;align-self:flex-end}.templates-list{margin-top:20px}.templates-list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.templates-search{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:6px;font-size:13px;margin-bottom:12px}.template-card{background:#fff;border:1px solid #ddd;border-radius:8px;padding:12px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.template-card-info{flex:1}.template-card-name{font-weight:600;font-size:13px;margin-bottom:4px}.template-card-meta{font-size:11px;color:#999;margin-bottom:6px}.template-card-preview{font-size:11px;color:#666;line-height:1.3;max-height:40px;overflow:hidden;text-overflow:ellipsis}.template-status{display:inline-block;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;text-transform:uppercase;margin-bottom:4px}.template-status.approved{background:#d4edda;color:#155724}.template-status.pending{background:#fff3cd;color:#856404}.template-status.rejected{background:#f8d7da;color:#721c24}.template-card-actions{display:flex;gap:6px}.btn-delete{background:#dc3545;color:#fff;border:none;padding:4px 10px;border-radius:4px;font-size:11px;cursor:pointer;transition:background .2s}.btn-delete:hover{background:#c82333}.button-section{background:#f5f5f5;border:1px solid #ddd;border-radius:8px;padding:12px;margin-bottom:12px}.button-item{background:#fff;border:1px solid #ddd;border-radius:6px;padding:10px;margin-bottom:8px;display:flex;gap:10px;align-items:flex-start}.button-item:last-child{margin-bottom:0}.button-fields{flex:1;display:flex;gap:8px;flex-wrap:wrap}.button-fields>*{flex:1;min-width:120px}.btn-remove{background:#e74c3c;color:#fff;border:none;padding:6px 10px;border-radius:4px;cursor:pointer;font-size:12px}.btn-remove:hover{background:#c0392b}.btn-add-button{background:#27ae60;color:#fff;border:none;padding:8px 16px;border-radius:6px;cursor:pointer;font-size:13px;width:100%;margin-top:8px}.btn-add-button:hover{background:#229954}.lightbox{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2500;cursor:pointer}.lightbox-content{max-width:90%;max-height:90%;border-radius:8px;box-shadow:0 8px 32px #0000004d}.lightbox-close{position:absolute;top:20px;right:20px;background:#fff3;border:none;color:#fff;width:40px;height:40px;border-radius:50%;cursor:pointer;font-size:24px;transition:background .2s}.lightbox-close:hover{background:#ffffff4d}@media(max-width:768px){.desktop-tabs,.desktop-actions,.desktop-only-btn{display:none!important}.mobile-actions{display:flex!important}.mobile-bottom-bar{display:block!important}.desktop-navbar{height:50px!important;padding:0 12px!important}.messages-sidebar{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;border-right:none}.messages-sidebar.hidden{display:none}.chat-view{position:absolute;right:0;top:0;width:100%;height:100%}.chat-view.hidden{display:none}.templates-page{flex-direction:column}.templates-form-section{width:100%;border-right:none;border-bottom:1px solid #ddd}.templates-preview-section{width:100%}.message-bubble{max-width:90%}h2{font-size:16px!important}table{font-size:12px!important}.card-style{padding:12px!important}}@media(max-width:400px){.desktop-navbar{height:44px!important}.mobile-bottom-bar button span:last-child{font-size:9px!important}}
