body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #121212;
    color: #f0f0f0;
  }
  
  .login-body, .chat-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
  }
  
  .login-container {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 15px #333;
    text-align: center;
    width: 300px;
  }
  
  .login-container input, .login-container button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
  }
  
  .login-container input {
    background-color: #2c2c2c;
    color: #fff;
  }
  
  .login-container button {
    background-color: #4caf50;
    color: white;
    cursor: pointer;
  }
  
  .chat-container {
    width: 80%;
    max-width: 900px;
    background: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .chat-box {
    background: #2b2b2b;
    padding: 10px;
    border-radius: 8px;
    height: 400px;
    overflow-y: scroll;
    border: 1px solid #444;
  }
  
  .chat-message {
    margin-bottom: 10px;
  }
  
  #message-form, .upload-form {
    display: flex;
    gap: 10px;
  }
  
  #message, input[type="file"] {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #2c2c2c;
    color: #fff;
  }
  
  button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
  }
  
  .badge {
    background-color: #ff4b4b;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    min-width: 14px;
    text-align: center;
    margin-right: 5px;
    display: none; /* O JS mudará para inline-block/inline se houver mensagens */
    flex-shrink: 0; /* Impede que o badge seja esmagado se o nome for longo */
}


  #dmModal input[type="text"] {
    background: #3a3a5a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
  }

  #dmModal button {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
  }

  .conversa-item {
    display: flex;
    align-items: center;
    width: 100%;
}

  /* 2. ADICIONE ISSO: Garante que o nome empurre o badge para a direita */
  .channel-name {
    flex-grow: 1; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}