#root{max-width:1280px;margin:0 auto;min-height:100vh;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}.app{display:flex;flex-direction:column;min-height:100vh}.app-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:20px}.spinner{width:50px;height:50px;border:5px solid #f3f3f3;border-top:5px solid #3498db;border-radius:50%;animation:spin 1s linear infinite}.app-main{flex:1;padding:2rem;background:#f8f9fa}@media (max-width: 768px){#root{padding:0}.app-main{padding:1rem}}.login-container{display:flex;justify-content:center;align-items:center;min-height:100vh;background:linear-gradient(135deg,#667eea,#764ba2);padding:1rem}.login-card{width:100%;max-width:400px;background:#fff;border-radius:12px;box-shadow:0 10px 25px #0000001a;overflow:hidden}.login-header{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:2rem;text-align:center}.login-header h1{margin:0;font-size:1.8rem;font-weight:600}.login-header p{margin:.5rem 0 0;opacity:.9;font-size:.95rem}.login-tabs{display:flex;background:#f8f9fa;border-bottom:1px solid #dee2e6}.tab{flex:1;padding:1rem;border:none;background:transparent;font-size:1rem;font-weight:500;color:#6c757d;cursor:pointer;transition:all .2s}.tab:hover{background:#e9ecef}.tab.active{background:#fff;color:#007bff;border-bottom:2px solid #007bff}.login-form{padding:2rem}.form-group{margin-bottom:1.5rem}.form-group label{display:block;margin-bottom:.5rem;font-weight:500;color:#495057}.form-group input{width:100%;padding:.75rem;border:1px solid #ced4da;border-radius:6px;font-size:1rem;transition:border-color .2s}.form-group input:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.form-group input:disabled{background-color:#e9ecef;cursor:not-allowed}.alert{padding:.75rem 1rem;border-radius:6px;margin-bottom:1rem;font-size:.9rem}.alert-success{background-color:#d4edda;color:#155724;border:1px solid #c3e6cb}.btn{padding:.75rem 1.5rem;border:none;border-radius:6px;font-size:1rem;font-weight:500;cursor:pointer;transition:all .2s;display:inline-flex;align-items:center;justify-content:center;gap:.5rem}.btn-primary:hover:not(:disabled){background:#0056b3}.btn-primary:disabled{opacity:.6;cursor:not-allowed}.btn-block{width:100%}.spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-top:2px solid white;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.login-links{margin-top:1rem;text-align:center}.btn-link{background:none;border:none;color:#007bff;font-size:.9rem;cursor:pointer;padding:0;text-decoration:underline}.btn-link:hover{color:#0056b3}.login-footer{padding:1.5rem 2rem;border-top:1px solid #dee2e6;text-align:center;background:#f8f9fa}.login-footer p{margin:0;color:#6c757d;font-size:.9rem}@media (max-width: 480px){.login-card{max-width:100%}.login-form,.login-header{padding:1.5rem}.login-header h1{font-size:1.5rem}}.zalo-account-list{width:100%;background:#fff;border-radius:10px;padding:2rem;box-shadow:0 2px 4px #0000001a}.list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem;padding-bottom:1rem;border-bottom:2px solid #e9ecef}.list-header h2{margin:0;color:#333;font-size:1.8rem}.list-stats{display:flex;align-items:center;gap:1.5rem}.total-count{font-size:1rem;color:#666;font-weight:500}.alert{padding:1rem;border-radius:6px;margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:center}.alert-error{background-color:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.btn-retry{background:#dc3545;color:#fff;border:none;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:background .2s}.btn-retry:hover{background:#c82333}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem;gap:1rem}.loading-container .spinner{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:spin 1s linear infinite}.empty-state{text-align:center;padding:4rem;background:#f8f9fa;border-radius:8px;border:2px dashed #dee2e6}.empty-state p{margin-bottom:1.5rem;color:#6c757d;font-size:1.1rem}.table-responsive{overflow-x:auto;border-radius:8px;border:1px solid #dee2e6}.accounts-table{width:100%;border-collapse:collapse;background:#fff}.accounts-table thead{background:#f8f9fa}.accounts-table th{padding:1rem;text-align:left;font-weight:600;color:#495057;border-bottom:2px solid #dee2e6;white-space:nowrap}.accounts-table td{padding:1rem;border-bottom:1px solid #e9ecef;vertical-align:middle}.accounts-table tbody tr:hover{background-color:#f8f9fa}.accounts-table .phone-number{font-family:Courier New,monospace;font-weight:600;color:#2c3e50}.status-badge{display:inline-block;padding:.25rem .75rem;border-radius:20px;font-size:.85rem;font-weight:500;text-transform:uppercase;letter-spacing:.5px}.status-success{background-color:#d4edda;color:#155724;border:1px solid #c3e6cb}.status-secondary{background-color:#e2e3e5;color:#383d41;border:1px solid #d6d8db}.status-warning{background-color:#fff3cd;color:#856404;border:1px solid #ffeaa7}.status-danger{background-color:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.action-buttons{display:flex;gap:.5rem}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.9rem;font-weight:500;transition:all .2s;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem}.btn-sm{padding:.25rem .5rem;font-size:.8rem}.btn-primary{background:#007bff;color:#fff}.btn-primary:hover{background:#0056b3}.btn-info{background:#17a2b8;color:#fff}.btn-info:hover{background:#117a8b}.btn-warning{background:#ffc107;color:#212529}.btn-warning:hover{background:#e0a800}.btn:disabled{opacity:.5;cursor:not-allowed}.pagination{display:flex;justify-content:center;align-items:center;gap:.5rem;margin-top:2rem;padding-top:1.5rem;border-top:1px solid #dee2e6}.page-numbers{display:flex;gap:.25rem}.btn-pagination{background:#fff;color:#495057;border:1px solid #dee2e6;min-width:40px;height:40px}.btn-pagination:hover{background:#f8f9fa;border-color:#adb5bd}.btn-pagination.active{background:#007bff;color:#fff;border-color:#007bff}@media (max-width: 992px){.list-header{flex-direction:column;align-items:flex-start;gap:1rem}.list-stats{width:100%;justify-content:space-between}.accounts-table{font-size:.9rem}.accounts-table th,.accounts-table td{padding:.75rem .5rem}}@media (max-width: 768px){.action-buttons{flex-direction:column}.btn-sm{width:100%;margin-bottom:.25rem}}.inbox-page{display:flex;flex-direction:column;gap:.5rem;width:100%;height:calc(100vh - 130px);min-height:480px}.inbox-alerts{list-style:none;display:flex;flex-direction:column;gap:.35rem;margin:0;padding:0}.inbox-alert{padding:.5rem .8rem;border-radius:8px;font-size:.88rem}.inbox-alert.warning{background:#fff3cd;color:#664d03}.inbox-alert.danger{background:#f8d7da;color:#721c24}.inbox{display:flex;width:100%;flex:1;min-height:0;background:#fff;border-radius:10px;box-shadow:0 2px 4px #0000001a;overflow:hidden;color:#333}.inbox.inbox-busy,.inbox.inbox-busy button{cursor:progress}.inbox-conversations{width:340px;flex-shrink:0;display:flex;flex-direction:column;border-right:1px solid #e9ecef;background:#fff}.inbox-toolbar{display:flex;gap:.5rem;padding:.75rem;border-bottom:1px solid #e9ecef}.inbox-toolbar select{flex:1;min-width:0;padding:.45rem .5rem;border:1px solid #ced4da;border-radius:6px;background:#fff;color:#333;font-size:.9rem}.inbox-btn{padding:.45rem .8rem;border:none;border-radius:6px;background:#667eea;color:#fff;font-size:.85rem;cursor:pointer;white-space:nowrap;transition:background .2s}.inbox-btn:hover:not(:disabled){background:#5a6fd6}.inbox-btn:disabled{opacity:.6;cursor:not-allowed}.inbox-more{align-self:center;margin:.75rem;background:#e9ecef;color:#495057}.inbox-more:hover:not(:disabled){background:#dee2e6}.inbox-error{margin:.75rem;padding:.6rem .8rem;border-radius:6px;background:#f8d7da;color:#721c24;font-size:.9rem}.inbox-hint{padding:1rem;color:#888;font-size:.9rem;text-align:center}.inbox-conversation-list{list-style:none;flex:1;overflow-y:auto}.inbox-conversation{display:flex;gap:.75rem;width:100%;padding:.75rem;border:none;border-bottom:1px solid #f1f3f5;background:#fff;text-align:left;cursor:pointer;color:inherit;font:inherit}.inbox-conversation:hover{background:#f8f9fa}.inbox-conversation.selected{background:#eef0ff}.inbox-avatar{width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-weight:600}.inbox-conversation-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}.inbox-conversation-top{display:flex;justify-content:space-between;gap:.5rem}.inbox-conversation-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inbox-conversation-time{flex-shrink:0;color:#888;font-size:.75rem}.inbox-conversation-preview{color:#666;font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inbox-conversation-account{color:#667eea;font-size:.75rem}.inbox-messages{flex:1;min-width:0;display:flex;flex-direction:column;background:#f4f5f9}.inbox-placeholder{margin:auto;color:#888}.inbox-messages-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem 1rem;background:#fff;border-bottom:1px solid #e9ecef}.inbox-messages-header h3{margin:0;font-size:1.1rem}.inbox-messages-account{color:#888;font-size:.8rem}.inbox-message-list{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.35rem}.inbox-day{align-self:center;margin:.75rem auto .5rem;padding:.15rem .7rem;border-radius:999px;background:#dee2e6;color:#555;font-size:.75rem;text-align:center;width:fit-content}.inbox-message{display:flex}.inbox-message.outbound{justify-content:flex-end}.inbox-bubble{max-width:70%;padding:.5rem .75rem;border-radius:12px;background:#fff;box-shadow:0 1px 1px #00000014;display:flex;flex-direction:column;gap:.15rem}.inbox-message.outbound .inbox-bubble{background:#dfe5ff}.inbox-sender{color:#667eea;font-size:.72rem;font-weight:600}.inbox-text{white-space:pre-wrap;word-break:break-word}.inbox-attachment{font-style:italic;color:#555}.inbox-sticker{width:130px;height:130px;object-fit:contain}.inbox-sticker-loading{display:block;border-radius:12px;background:#0000000d}.inbox-image{display:block;max-width:260px;max-height:320px;border-radius:8px;object-fit:contain;cursor:zoom-in}.inbox-image-loading{width:160px;height:120px;cursor:default;background:#0000000d}.inbox-audio{width:240px;max-width:100%}.inbox-video{width:320px;max-width:100%;border-radius:8px}.inbox-card{display:flex;flex-direction:column;gap:.15rem;min-width:0}.inbox-card-title{font-weight:600;word-break:break-word}.inbox-card-detail{color:#777;font-size:.78rem}.inbox-time{align-self:flex-end;color:#999;font-size:.7rem}@media (max-width: 768px){.inbox-page{height:auto}.inbox{flex-direction:column;flex:none}.inbox-conversations{width:100%;max-height:40vh;border-right:none;border-bottom:1px solid #e9ecef}.inbox-messages{min-height:60vh}}.inbox-bubble.inbox-command{border:1px dashed #adb5bd;background:#fff;opacity:.95}.inbox-bubble.inbox-command.wait .inbox-command-status{color:#495057}.inbox-bubble.inbox-command.ok .inbox-command-status{color:#2f9e44}.inbox-bubble.inbox-command.bad{border-color:#e03131}.inbox-bubble.inbox-command.bad .inbox-command-status{color:#c92a2a}.inbox-command-status{font-size:.75rem;font-style:italic}.inbox-link{align-self:flex-start;padding:0;border:none;background:none;color:#667eea;font-size:.78rem;text-decoration:underline;cursor:pointer}.inbox-link:disabled{color:#adb5bd;cursor:not-allowed;text-decoration:none}.inbox-composer{border-top:1px solid #e9ecef;background:#fff;padding:.6rem .75rem}.inbox-composer-warning{margin-bottom:.5rem;padding:.45rem .7rem;border-radius:6px;background:#fff3cd;color:#664d03;font-size:.82rem}.inbox-composer .inbox-error{margin:0 0 .5rem}.inbox-composer-row{display:flex;gap:.5rem;align-items:flex-end}.inbox-composer-row textarea{flex:1;min-width:0;resize:none;padding:.5rem .6rem;border:1px solid #ced4da;border-radius:6px;font:inherit;color:#333}.inbox-command-actions{display:flex;gap:.9rem}.inbox-link-danger{color:#c92a2a}.inbox-link-danger:disabled{color:#adb5bd}.inbox-composer-side{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:.35rem;align-self:stretch}.inbox-file-input{display:none}.inbox-icon-btn{width:2rem;height:2rem;padding:0;border:1px solid transparent;border-radius:6px;background:none;font-size:1.15rem;line-height:1;cursor:pointer}.inbox-icon-btn:hover:not(:disabled){background:#eef1ff;border-color:#cfd6ff}.inbox-icon-btn:disabled{opacity:.5;cursor:not-allowed}.inbox-attachment-chip{display:flex;align-items:center;gap:.6rem;margin-bottom:.5rem;padding:.35rem .5rem;border:1px solid #dde1ff;border-radius:8px;background:#f4f6ff}.inbox-attachment-thumb{width:48px;height:48px;border-radius:6px;object-fit:cover;flex:none}.inbox-attachment-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;font-size:1.6rem;flex:none}.inbox-attachment-info{display:flex;flex-direction:column;min-width:0;flex:1}.inbox-attachment-name{font-weight:600;font-size:.88rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inbox-attachment-remove{border:none;background:none;color:#868e96;font-size:1rem;cursor:pointer;padding:.25rem .4rem;border-radius:4px}.inbox-attachment-remove:hover:not(:disabled){color:#c92a2a;background:#ffe3e3}.app-header{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:.4rem 2rem;box-shadow:0 2px 10px #0000001a;position:relative;z-index:1000}.header-content{display:flex;justify-content:space-between;align-items:center;max-width:1280px;margin:0 auto}.header-left .logo h1{margin:0;font-size:1.2rem;font-weight:600;white-space:nowrap}.header-live{margin-right:1rem;padding:.2rem .65rem;border-radius:999px;background:#ffffff29;font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:28rem}.header-live.ok{color:#b2f2bb}.header-live.error{background:#c92a2ad9;color:#fff}.user-info{display:flex;align-items:center;gap:.6rem;padding:.2rem .4rem;border-radius:8px;cursor:pointer;transition:background-color .2s;position:relative}.user-info:hover{background-color:#ffffff1a}.user-avatar{width:32px;height:32px;background:#fff3;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:1rem}.user-details{display:flex;flex-direction:column}.user-name{font-weight:500;font-size:.85rem;line-height:1.2}.user-role{font-size:.72rem;line-height:1.2;opacity:.8}.dropdown-arrow{font-size:.8rem;opacity:.7}.user-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border-radius:8px;box-shadow:0 4px 20px #00000026;min-width:280px;z-index:1001;overflow:hidden}.dropdown-header{display:flex;align-items:center;gap:1rem;padding:1rem;background:#f8f9fa;border-bottom:1px solid #e9ecef}.dropdown-avatar{width:48px;height:48px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:1.3rem}.dropdown-user-info{flex:1}.dropdown-name{font-weight:600;color:#333;margin-bottom:.25rem}.dropdown-email{font-size:.85rem;color:#666}.dropdown-divider{height:1px;background:#e9ecef}.dropdown-items{padding:.5rem 0}.dropdown-item{display:flex;align-items:center;gap:.75rem;width:100%;padding:.75rem 1rem;border:none;background:none;text-align:left;cursor:pointer;color:#333;font-size:.95rem;transition:background-color .2s}.dropdown-item:hover{background-color:#f8f9fa}.dropdown-item:disabled{opacity:.6;cursor:not-allowed}.item-icon{font-size:1.1rem;width:24px;text-align:center}.item-text{flex:1}.logout-item{color:#dc3545}.logout-item:hover{background-color:#f8d7da;color:#721c24}.dropdown-overlay{position:fixed;inset:0;z-index:1000;background:transparent}@media (max-width: 768px){.app-header{padding:.4rem 1rem}.header-left .logo h1{font-size:1.1rem}.header-live{display:none}.user-info{padding:.25rem}.user-name{display:none}.user-dropdown{position:fixed;inset:auto 0 0;min-width:auto;border-radius:12px 12px 0 0;max-height:80vh;overflow-y:auto}}.header-nav{display:flex;gap:.5rem;margin:0 1.5rem;flex:1}.header-nav .nav-link{padding:.3rem .8rem;border-radius:8px;color:#ffffffd9;text-decoration:none;font-size:.95rem;transition:background-color .2s}.header-nav .nav-link:hover{background-color:#ffffff1f}.header-nav .nav-link.active{background-color:#ffffff38;color:#fff;font-weight:600}@media (max-width: 768px){.header-nav{margin:0 .5rem}}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{margin:0;padding:0;box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}}
