/* Chat Page Specific Styles */
body.chat-page {
    background-color: #f0f2f5;
    height: 100vh;
    overflow: hidden;
  }
  
  .chat-container-wrapper {
    display: flex;
    height: calc(100vh - 80px);
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
  }
  
  /* Chat Sidebar */
  .chat-sidebar {
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .chat-search {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
  }
  
  .chat-search input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background: #f5f5f5;
    transition: all 0.3s;
  }
  
  .chat-search input:focus {
    outline: none;
    background: white;
    border-color: #4e73df;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.1);
  }
  
  .chat-search i {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
  }
  
  .chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
  }
  
  .chat-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
  }
  
  .chat-list-item:hover {
    background: #f8f9fa;
  }
  
  .chat-list-item.active {
    background: #e9eeff;
  }
  
  .chat-info {
    flex: 1;
    margin-left: 15px;
    overflow: hidden;
  }
  
  .chat-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #2d3748;
  }
  
  .chat-info p {
    margin: 0;
    font-size: 14px;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }
  
  .time {
    font-size: 12px;
    color: #a0aec0;
  }
  
  .unread-count {
    background: #4e73df;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
  }
  
  /* Chat Main Area */
  .chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }
  
  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
    background: white;
    z-index: 10;
  }
  
  .chat-header h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #2d3748;
  }
  
  .chat-header p {
    margin: 0;
    font-size: 14px;
    color: #718096;
  }
  
  .whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
  }
  
  .whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
  }
  
  /* Messages Container */
  .messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
  }
  
  .message p {
    margin: 0 0 5px 0;
    line-height: 1.4;
  }
  
  .message .time {
    font-size: 11px;
    text-align: right;
  }
  
  .received {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  }
  
  .sent {
    align-self: flex-end;
    background: #4e73df;
    color: white;
    border-bottom-right-radius: 4px;
  }
  
  .sent .time {
    color: rgba(255, 255, 255, 0.7);
  }
  
  /* Message Input */
  .message-input {
    display: flex;
    padding: 20px;
    gap: 10px;
    border-top: 1px solid #eaeaea;
    background: white;
  }
  
  .message-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
  }
  
  .message-input input:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.1);
  }
  
  .message-input button {
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: 500;
  }
  
  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Responsive Design */
  @media (max-width: 992px) {
    .chat-container-wrapper {
      flex-direction: column;
      height: auto;
      min-height: calc(100vh - 80px);
    }
    
    .chat-sidebar {
      width: 100%;
      height: 300px;
    }
    
    .chat-main {
      height: calc(100vh - 420px);
    }
  }
  
  @media (max-width: 576px) {
    .chat-container-wrapper {
      padding: 10px;
      gap: 10px;
    }
    
    .chat-header {
      padding: 15px;
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
    
    .whatsapp-btn {
      align-self: stretch;
      justify-content: center;
    }
    
    .message {
      max-width: 85%;
    }
    
    .messages-container {
      padding: 15px;
    }
    
    .message-input {
      padding: 15px;
    }
  }
  
  /* Custom Scrollbar */
  .chat-list::-webkit-scrollbar,
  .messages-container::-webkit-scrollbar {
    width: 6px;
  }
  
  .chat-list::-webkit-scrollbar-track,
  .messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }
  
  .chat-list::-webkit-scrollbar-thumb,
  .messages-container::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
  }
  
  .chat-list::-webkit-scrollbar-thumb:hover,
  .messages-container::-webkit-scrollbar-thumb:hover {
    background: #a5a5a5;
  }